Skip to content

Commit

Permalink
🧪 Bring maximum strictness to MyPy
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Dec 23, 2024
1 parent 185fb45 commit 2a8c841
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,6 @@ fixture-parentheses = false
python_version = "3.9"
files = ["src/trio/", "docs/source/*.py"]

# Be flexible about dependencies that don't have stubs yet (like pytest)
ignore_missing_imports = true

# Be strict about use of Mypy
local_partial_types = true
warn_unused_ignores = true
Expand All @@ -198,6 +195,26 @@ disallow_untyped_decorators = true
disallow_untyped_defs = true
check_untyped_defs = true

# Below are the originally missing strictness settings:
disallow_any_expr = true

enable_error_code = [
"ignore-without-code",
]

extra_checks = true

ignore_missing_imports = false

no_implicit_reexport = true

# `strict` will pick up any future strictness-related settings:
strict = true
strict_equality = true
strict_optional = true

warn_no_return = true

[tool.pyright]
pythonVersion = "3.9"
reportUnnecessaryTypeIgnoreComment = true
Expand Down

0 comments on commit 2a8c841

Please sign in to comment.