This repository was archived by the owner on May 14, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyrightconfig.json
More file actions
122 lines (100 loc) · 5.04 KB
/
pyrightconfig.json
File metadata and controls
122 lines (100 loc) · 5.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
// Project-specific Pyright configuration
// Extends the base configuration from .toolchain
{
"extends": "./.toolchain/python/pyright/base.json",
// Project-specific overrides
"include": [
"core",
"tests"
],
"exclude": [
"**/__pycache__",
"**/node_modules",
"**/.venv",
".git",
"dist",
"build"
],
"pythonVersion": "3.13",
"pythonPlatform": "All",
// Ensure we're using the virtual environment
"venvPath": ".",
"venv": ".venv",
// Add project root to Python path so core module can be imported
"extraPaths": ["."],
// Global overrides with reasoning
"reportMissingTypeStubs": "warning",
// REASONING: pandas, geopandas, contextily, and other geospatial libraries
// don't have complete type stubs. This is a known limitation in the ecosystem.
// We keep as warning to be aware of missing stubs but don't fail builds.
"executionEnvironments": [
{
"root": "core",
"pythonVersion": "3.13",
"pythonPlatform": "All",
// Core code maintains strict type checking, but pandas/geopandas have complex types
"reportUnknownVariableType": "warning",
// REASONING: pandas Series/DataFrame types are complex and dynamic, making static analysis challenging
"reportUnknownMemberType": "warning",
// REASONING: pandas methods like .notna(), .get(), .copy() have complex overloads that pyright struggles with
"reportArgumentType": "warning",
// REASONING: pandas method arguments often have complex type signatures that are difficult to statically analyze
"reportGeneralTypeIssues": "warning",
// REASONING: pandas type assignments and operations often involve complex type interactions
"reportUnknownLambdaType": "warning",
// REASONING: pandas lambda functions often have complex type signatures that are difficult to infer
"reportIncompatibleVariableOverride": "warning",
// REASONING: pandas type assignments often involve complex type hierarchies that pyright struggles with
"reportMissingTypeArgument": "warning",
// REASONING: pandas generic types often have complex type arguments that are difficult to specify
"reportUnnecessaryComparison": "warning",
// REASONING: pandas comparisons often involve complex type interactions that pyright flags unnecessarily
"reportUnnecessaryTypeIgnoreComment": "warning",
// REASONING: When we set rules to warning level, pyright flags ignore comments as unnecessary
"reportIncompatibleMethodOverride": "warning",
// REASONING: pandas method overrides often have complex type signatures
"reportIncompatibleReturnType": "warning",
// REASONING: pandas return types often involve complex type hierarchies
"reportIncompatibleTypeVar": "warning",
// REASONING: pandas type variables often have complex constraints
"reportIncompatibleTypeVarAssignment": "warning"
// REASONING: pandas type variable assignments often involve complex type relationships
},
{
"root": "tests",
"pythonVersion": "3.13",
"pythonPlatform": "All",
// Test-specific overrides with reasoning
"reportUnknownMemberType": "warning",
// REASONING: Test fixtures and mock objects often have dynamic attributes
// that Pyright can't infer. This is acceptable in test code.
"reportUnknownArgumentType": "warning",
// REASONING: Test functions often receive dynamic arguments from fixtures
// and parametrized tests. Type inference is challenging in test contexts.
"reportUnknownVariableType": "warning",
// REASONING: Test variables often come from external data sources (APIs,
// files) where types can't be fully determined at static analysis time.
"reportUnknownParameterType": "warning",
// REASONING: Pytest fixtures and parametrized tests create parameters
// with types that are difficult to statically infer.
"reportMissingParameterType": "warning",
// REASONING: Test functions often have parameters from pytest fixtures
// where adding explicit types would be verbose and not add much value.
"reportOptionalMemberAccess": "warning",
// REASONING: Test code often needs to access optional attributes of
// mock objects and test data where the optional nature is expected.
"reportAttributeAccessIssue": "warning",
// REASONING: Test code frequently accesses attributes on dynamic objects
// (mocks, fixtures) where Pyright can't verify attribute existence.
"reportGeneralTypeIssues": "warning",
// REASONING: Test code often has complex type interactions that are
// acceptable in test contexts but would be problematic in production.
"reportReturnType": "warning",
// REASONING: Test functions often return complex objects or None where
// explicit return types would be verbose without much benefit.
"reportUnknownLambdaType": "warning"
// REASONING: Test code uses lambdas for assertions and data transformations
// where explicit typing would be overly verbose.
}
]
}