Skip to content

Commit b95dc61

Browse files
authored
feat: improve, clean up, and stricten the mypy configuration (#641)
1 parent c856f33 commit b95dc61

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ repos:
8686
language: python
8787
files: ^src/package/|^tests/
8888
types: [text, python]
89-
args: [--show-traceback, --config-file, pyproject.toml]
89+
args: [--config-file, pyproject.toml]
9090

9191
# Check for potential security issues.
9292
- repo: https://github.com/PyCQA/bandit

pyproject.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,23 +140,27 @@ skip_gitignore = true
140140

141141
# https://mypy.readthedocs.io/en/stable/config_file.html#using-a-pyproject-toml
142142
[tool.mypy]
143-
mypy_path = "src/package/:tests/"
144-
# exclude=
143+
# mypy_path =
144+
# exclude =
145145
show_error_codes = true
146146
show_column_numbers = true
147+
pretty = true
148+
show_traceback = true
147149
check_untyped_defs = true
148150
incremental = false
149-
strict_equality = true
151+
strict = true
150152
warn_return_any = true
151153
warn_redundant_casts = true
152154
warn_unreachable = true
153155
warn_unused_configs = true
154156
warn_unused_ignores = true
157+
disallow_any_explicit = true
155158
disallow_untyped_calls = true
156159
disallow_untyped_defs = true
157160
disallow_incomplete_defs = true
158161
disallow_untyped_decorators = true
159-
disable_error_code = []
162+
# disable_error_code =
163+
# allow_redefinition =
160164

161165
[[tool.mypy.overrides]]
162166
module = [

0 commit comments

Comments
 (0)