Skip to content

Commit 9ff42f2

Browse files
committed
Improve mypy
1 parent 6eadea7 commit 9ff42f2

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
run: echo ::add-matcher::./.github/python_matcher.json
2727
- name: Running mypy
2828
run: |
29-
mypy --check-untyped-defs --no-color-output --install-types --non-interactive --ignore-missing-imports scaaml
29+
mypy --no-color-output --install-types --non-interactive scaaml tests

mypy.ini

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[mypy]
2+
plugins = pydantic.mypy
3+
show_error_codes = True
4+
follow_imports = silent
5+
local_partial_types = true
6+
strict_equality = true
7+
no_implicit_optional = true
8+
warn_incomplete_stub = true
9+
warn_redundant_casts = true
10+
warn_unused_configs = true
11+
warn_unused_ignores = true
12+
enable_error_code = ignore-without-code, redundant-self, truthy-iterable
13+
disable_error_code = annotation-unchecked, import-not-found, import-untyped
14+
extra_checks = false
15+
check_untyped_defs = true
16+
disallow_incomplete_defs = true
17+
disallow_subclassing_any = true
18+
disallow_untyped_calls = true
19+
disallow_untyped_decorators = true
20+
disallow_untyped_defs = true
21+
warn_return_any = true
22+
warn_unreachable = true
23+
allow_redefinition = false
24+
strict_optional = true
25+
26+
[pydantic-mypy]
27+
init_forbid_extra = true
28+
init_typed = true
29+
warn_required_dynamic_aliases = true
30+
warn_untyped_fields = true
31+
32+
[mypy-scaaml.*]
33+
no_implicit_reexport = true
34+
disallow_untyped_calls = true
35+
disallow_any_unimported = true
36+
disallow_untyped_decorators = true
37+
strict = true
38+
enable_error_code = ignore-without-code, redundant-self, truthy-iterable, possibly-undefined, truthy-bool, truthy-iterable, unused-ignore, mutable-override
39+
40+
[mypy-tests.*]
41+
disallow_untyped_defs = false
42+
disallow_untyped_calls = false
43+
disallow_untyped_decorators = false

0 commit comments

Comments
 (0)