-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmypy.ini
44 lines (40 loc) · 1.69 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
[mypy]
# Source: https://github.com/pydantic/pydantic/blob/v2.6.3/docs/integrations/mypy.md#enabling-the-plugin
plugins = pydantic.mypy
files = src/glone
python_version = 3.10
# Source:
# - https://github.com/pydantic/pydantic/blob/v2.6.3/docs/integrations/mypy.md#configuring-the-plugin
# - https://github.com/FlorianWilhelm/the-hatchlor/blob/v0.3/%7B%7Bcookiecutter.project_slug%7D%7D/pyproject.toml#L81
# - https://github.com/python/mypy/blob/v1.8.0/docs/source/config_file.rst
# - https://github.com/python/mypy/blob/v1.8.0/docs/source/config_file.rst#example-mypyini
# - https://github.com/python/mypy/blob/v1.8.0/docs/source/existing_code.rst#introduce-stricter-options
# - https://github.com/python/mypy/issues/16189: `Warning: --strict-concatenate is deprecated; use --extra-checks instead`
follow_imports = normal
disallow_any_generics = True
disallow_subclassing_any = True
disallow_untyped_defs = True
check_untyped_defs = True
disallow_untyped_decorators = True
warn_redundant_casts = True
warn_unused_ignores = True
warn_no_return = True
warn_return_any = True
warn_unreachable = True
strict_concatenate = True
strict_equality = True
show_error_context = True
show_column_numbers = True
pretty = True
error_summary = True
warn_incomplete_stub = True
incremental = True
# Source:
# - https://github.com/python/mypy/blob/v1.8.0/docs/source/config_file.rst#config-file-format: "The warn_unused_configs flag may be useful to debug misspelled section names."
# incremental = False
# warn_unused_configs = True
# Source: https://github.com/pydantic/pydantic/blob/v2.6.3/docs/integrations/mypy.md#configuring-the-plugin
[pydantic-mypy]
init_forbid_extra = True
init_typed = True
warn_required_dynamic_aliases = True