Skip to content

Commit 2a8c841

Browse files
committed
🧪 Bring maximum strictness to MyPy
1 parent 185fb45 commit 2a8c841

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

‎pyproject.toml

+20-3
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,6 @@ fixture-parentheses = false
176176
python_version = "3.9"
177177
files = ["src/trio/", "docs/source/*.py"]
178178

179-
# Be flexible about dependencies that don't have stubs yet (like pytest)
180-
ignore_missing_imports = true
181-
182179
# Be strict about use of Mypy
183180
local_partial_types = true
184181
warn_unused_ignores = true
@@ -198,6 +195,26 @@ disallow_untyped_decorators = true
198195
disallow_untyped_defs = true
199196
check_untyped_defs = true
200197

198+
# Below are the originally missing strictness settings:
199+
disallow_any_expr = true
200+
201+
enable_error_code = [
202+
"ignore-without-code",
203+
]
204+
205+
extra_checks = true
206+
207+
ignore_missing_imports = false
208+
209+
no_implicit_reexport = true
210+
211+
# `strict` will pick up any future strictness-related settings:
212+
strict = true
213+
strict_equality = true
214+
strict_optional = true
215+
216+
warn_no_return = true
217+
201218
[tool.pyright]
202219
pythonVersion = "3.9"
203220
reportUnnecessaryTypeIgnoreComment = true

0 commit comments

Comments
 (0)