forked from Aiven-Open/astacus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mypy.ini
84 lines (58 loc) · 1.88 KB
/
mypy.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
[mypy]
python_version = 3.11
plugins = pydantic.mypy
show_error_codes = True
# Dead code is bad
warn_unreachable = True
# Re-export is bit bad - __all__ should be used if we really want re-export
no_implicit_reexport = True
# casting is bad, unnecessary casting worse
warn_redundant_casts = True
# unused type disables are confusing
warn_unused_ignores = True
# Replacing typing with non-typing is bad
# (This is quite painful to do though, TBD later)
#disallow_untyped_decorators = True
# Any subclassing is probably an error
disallow_subclassing_any = true
# This codebase should be typed
#disallow_incomplete_defs = true
#disallow_untyped_defs = true
# configure pydantic.mypy plugin
[pydantic-mypy]
# even if Config.extra != forbid, prevent extra args
init_forbid_extra = True
# validate types on __init__, do not go for type coercion
init_typed = True
# We don't want use of indirect population without explicit alias
warn_required_dynamic_aliases=True
# We want types for all fields
# (but some hacks like validators do not work with this well, sadly)
#warn_untyped_fields=True
# Ignores start here (toml format would be nicer but guess this works)
[mypy-astacus.proto.*]
ignore_errors = True
[mypy-cassandra.*]
ignore_missing_imports = True
[mypy-google.protobuf.*]
ignore_errors = True
[mypy-graphlib.*]
ignore_missing_imports = True
# types-kazoo does not unfortunately fix this
[mypy-kazoo.*]
ignore_missing_imports = True
# httpcore dependency
[mypy-h11.*]
ignore_missing_imports = True
[mypy-systemd.*]
ignore_missing_imports = True
# TBD: When someone has time, implement these for whole codebase
[mypy-astacus.common.cassandra.*]
disallow_incomplete_defs = true
disallow_untyped_defs = true
[mypy-astacus.coordinator.plugins.cassandra.*]
disallow_incomplete_defs = true
disallow_untyped_defs = true
[mypy-astacus.node.cassandra]
disallow_incomplete_defs = true
disallow_untyped_defs = true