-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmypy.ini
More file actions
45 lines (37 loc) · 1.14 KB
/
mypy.ini
File metadata and controls
45 lines (37 loc) · 1.14 KB
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
# In setup.cfg or mypy.ini:
[mypy]
python_version = 3.13
exclude = .venv
strict_equality=True
disallow_untyped_defs = True
plugins =
mypy.plugins.proper_plugin,
returns.contrib.mypy.returns_plugin,
enable_error_code =
truthy-bool,
truthy-iterable,
redundant-expr,
# We don't want "Are you missing an await?" errors,
# because we can't disable them for tests only.
# It is passed as a CLI arg in CI.
# unused-awaitable,
# ignore-without-code,
possibly-undefined,
redundant-self,
disable_error_code = empty-body, no-untyped-def
# We cannot work without explicit `Any` types and plain generics:
disallow_any_explicit = false
disallow_any_generics = false
follow_imports = silent
ignore_missing_imports = true
strict = true
strict_bytes = true
warn_unreachable = true
# TODO: Enable this later, it's disabled temporarily while we don't discover why
# the explicit restriction on `typeshed.stdlib.unittest.mock`,
# which is the next section, is not working properly when running
# with `pytest`.
disallow_subclassing_any = False
exclude = ['.*test_.*pattern_matching']
[mypy-typeshed.stdlib.unittest.mock]
disallow_subclassing_any = False