Skip to content

Commit 06f89ec

Browse files
authored
🔧 fix pyright execution environment config (#696)
2 parents 20f2ea5 + f0f77d3 commit 06f89ec

File tree

4 files changed

+540
-371
lines changed

4 files changed

+540
-371
lines changed

‎pyproject.toml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ disallow_subclassing_any = false
117117
always_true = ["NP125", "NP126", "NP20", "NP21", "NP22", "NP23"]
118118

119119
[tool.pyright]
120-
include = ["scipy-stubs", "scripts", "tests"]
121120
ignore = [".venv"]
122121
stubPath = "."
123122
pythonPlatform = "All"
@@ -133,10 +132,7 @@ reportPropertyTypeMismatch = false
133132
reportShadowedImports = true
134133
reportUninitializedInstanceVariable = true
135134
reportUnnecessaryTypeIgnoreComment = true
136-
reportUnusedExpression = false
137-
138-
# overridden in the execution environments
139-
reportInvalidStubStatement = false
135+
reportUnusedCallResult = true
140136

141137
# type-checkers should type-check; linters should lint
142138
reportImplicitStringConcatenation = false
@@ -153,19 +149,11 @@ reportPrivateLocalImportUsage = true
153149
reportUnannotatedClassAttribute = false
154150
strictGenericNarrowing = false
155151

156-
[[executionEnvironments]]
157-
root = "scipy-stubs"
158-
reportInvalidStubStatement = true
159-
reportUnusedCallResult = true
160-
reportUnusedExpression = true
161-
162-
[[executionEnvironments]]
152+
[[tool.pyright.executionEnvironments]]
163153
root = "tests"
164-
reportAny = true
165-
reportExplicitAny = true
166-
reportPrivateUsage = true
167-
reportUnreachable = true
168-
reportUnsafeMultipleInheritance = true # base
154+
reportInvalidStubStatement = false
155+
reportUnusedCallResult = false
156+
reportUnusedExpression = false
169157

170158
[tool.pyright.defineConstant]
171159
# optype.numpy compat

0 commit comments

Comments
 (0)