Skip to content

Commit

Permalink
Improve MyPy configuration
Browse files Browse the repository at this point in the history
Some improvments flagged by Repo-Review: https://learn.scientific-python.org/development/guides/repo-review/

1. Remove now-default show_error_codes.
2. Enable some optional error codes with extra checks.
  • Loading branch information
adamchainz committed Jun 19, 2024
1 parent 3b952a4 commit 992ec6c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,18 @@ source = [
show_missing = true

[tool.mypy]
enable_error_code = [
"ignore-without-code",
"redundant-expr",
"truthy-bool",
]
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
mypy_path = "src/"
namespace_packages = false
no_implicit_optional = true
show_error_codes = true
warn_unreachable = true
warn_unused_ignores = true

Expand Down

0 comments on commit 992ec6c

Please sign in to comment.