Skip to content

Commit f90d4a1

Browse files
committed
📦 exclude the @test dirs from the sdist and wheel
1 parent 36c8841 commit f90d4a1

File tree

1 file changed

+17
-43
lines changed

1 file changed

+17
-43
lines changed

‎pyproject.toml

Lines changed: 17 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -95,21 +95,19 @@ dev = [
9595

9696

9797
[tool.hatch.build]
98-
packages = ["src/_numtype", "src/numtype", "src/numpy-stubs"]
99-
100-
[tool.hatch.build.targets.sdist]
101-
exclude = [
102-
"/.github",
103-
"/.vscode",
104-
"/dist",
105-
"/doc",
106-
"/test",
107-
"/tool",
108-
".mypyignore",
109-
".mypyignore-todo",
110-
"CONTRIBUTING.md",
111-
"uv.lock",
112-
]
98+
exclude = [
99+
"**/@test",
100+
"**/*.yml",
101+
"**/.*",
102+
"/docs",
103+
"/tool",
104+
"CONTRIBUTING.md",
105+
"uv.lock",
106+
]
107+
skip-excluded-dirs = true
108+
109+
[tool.hatch.build.targets.wheel]
110+
packages = ["src/_numtype", "src/numtype", "src/numpy-stubs"]
113111

114112

115113
[tool.mypy]
@@ -137,11 +135,9 @@ disable_memoryview_promotion = true
137135

138136

139137
[tool.pyright]
140-
include = ["src", "test", "tool"]
138+
include = ["src", "tool"]
141139
ignore = [".venv"]
142140
stubPath = "src"
143-
venvPath = "."
144-
venv = ".venv"
145141
pythonPlatform = "All"
146142
typeCheckingMode = "strict"
147143

@@ -152,7 +148,7 @@ enableReachabilityAnalysis = false
152148
reportCallInDefaultInitializer = true
153149
reportImportCycles = true
154150
reportImplicitOverride = true
155-
reportInvalidStubStatement = false # see execution environments
151+
reportInvalidStubStatement = false # required for type-testing
156152
reportMissingSuperCall = false
157153
reportPrivateUsage = false
158154
reportPropertyTypeMismatch = false
@@ -162,7 +158,7 @@ reportUninitializedInstanceVariable = true
162158
reportUnnecessaryTypeIgnoreComment = true
163159
reportUnusedExpression = false
164160
reportUnusedParameter = false
165-
reportUnusedVariable = false
161+
reportUnusedVariable = true
166162
# basedpyright only
167163
failOnWarnings = true
168164
reportIgnoreCommentWithoutRule = true
@@ -174,30 +170,8 @@ reportPrivateLocalImportUsage = true
174170
reportUnannotatedClassAttribute = false
175171
strictGenericNarrowing = true
176172

177-
[[executionEnvironments]]
178-
root = "src"
179-
reportInvalidStubStatement = true
180-
reportUnusedCallResult = true
181-
reportUnusedVariable = true
182-
183-
[[executionEnvironments]]
184-
root = "test"
185-
reportAny = true
186-
reportPrivateUsage = true
187-
reportUnreachable = true
188-
# basedpyright only
189-
reportExplicitAny = true
190-
reportUnsafeMultipleInheritance = true
191-
192-
[[executionEnvironments]]
193-
root = "tool"
194-
reportImplicitOverride = true
195-
reportInvalidStubStatement = true
196-
reportUnusedCallResult = true
197-
198-
199173
[tool.ruff]
200-
src = ["src", "test", "tool"]
174+
src = ["src", "tool"]
201175
extend-exclude = [".git", ".mypy_cache", ".tox", ".venv"]
202176
force-exclude = true
203177
# https://typing.python.org/en/latest/guides/writing_stubs.html#maximum-line-length

0 commit comments

Comments
 (0)