Repository navigation
Expand file tree
/
Copy pathmypy-gpl.ini
More file actions
73 lines (65 loc) · 2.01 KB
/
Copy pathmypy-gpl.ini
File metadata and controls
73 lines (65 loc) · 2.01 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
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
# NOTE: Keep this in sync with mypy.ini!
[mypy]
# Global options.
# Add per-module options as [mypy-<module patterns>] sections.
explicit_package_bases = True
mypy_path =
$MYPY_CONFIG_FILE_DIR/omd/packages/omd:
$MYPY_CONFIG_FILE_DIR/tests/typeshed
plugins = pydantic.mypy
python_version = 3.15
scripts_are_modules = True
# do not descend into 3rd party dependencies
follow_imports = silent
follow_imports_for_stubs = True
# hidden flags for PEP 688 compat, see https://github.com/python/mypy/issues/15313
disable_bytearray_promotion = True
disable_memoryview_promotion = True
# checks enabled via --strict
check_untyped_defs = True
disallow_any_generics = True
disallow_incomplete_defs = True
disallow_subclassing_any = True
disallow_untyped_calls = True
disallow_untyped_decorators = True
disallow_untyped_defs = True
extra_checks = True
no_implicit_reexport = True
strict_bytes = True
strict_equality = True
warn_redundant_casts = True
warn_return_any = True
warn_unused_configs = True
warn_unused_ignores = True
# additional checks not enabled via --strict
disallow_any_decorated = True
disallow_any_explicit = True
# both: lots of findings all over the place
disallow_any_expr = False
disallow_any_unimported = False
strict_equality_for_none = True
warn_unreachable = True
# error codes which are not enabled by default
enable_error_code =
deprecated,
exhaustive-match,
explicit-override,
ignore-without-code,
mutable-override,
possibly-undefined,
redundant-expr,
redundant-self,
truthy-bool,
truthy-iterable,
unimported-reveal,
unused-awaitable,
unused-ignore
# meraki has no type annotations; with explicit_package_bases=true and mypy 1.19+, following it
# silently triggers "Source file found twice under different module names". Skip it entirely —
# all meraki types remain Any either way since the package ships no py.typed or stubs.
[mypy-meraki,meraki.*]
follow_imports = skip
[pydantic-mypy]
init_forbid_extra = True
init_typed = True
warn_required_dynamic_aliases = True