Skip to content

Commit 314f7d7

Browse files
committed
🧪 Bring maximum strictness to MyPy
1 parent 185fb45 commit 314f7d7

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

‎pyproject.toml

+19-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,25 @@ 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+
extra_checks = true
205+
206+
ignore_missing_imports = false
207+
208+
no_implicit_reexport = true
209+
210+
# `strict` will pick up any future strictness-related settings:
211+
strict = true
212+
strict_equality = true
213+
strict_optional = true
214+
215+
warn_no_return = true
216+
201217
[tool.pyright]
202218
pythonVersion = "3.9"
203219
reportUnnecessaryTypeIgnoreComment = true

0 commit comments

Comments
 (0)