-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathmypy.ini
More file actions
79 lines (67 loc) · 2.15 KB
/
mypy.ini
File metadata and controls
79 lines (67 loc) · 2.15 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
74
75
76
77
78
79
[mypy]
python_version = 3.13
# display options
show_column_numbers = True
pretty = True
# start with an ideal: enable strict type-checking, then loosen in module-specific config
# see https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options
strict = True
## BEGIN possible loosenings from `strict`:
# disallow_subclassing_any = False
# warn_unused_configs = False
# warn_redundant_casts = False
# warn_unused_ignores = False
# strict_equality = False
# strict_concatenate = False
# check_untyped_defs = False
# disallow_untyped_decorators = False
# disallow_any_generics = False
# disallow_untyped_calls = False
# disallow_incomplete_defs = False
# disallow_untyped_defs = False
# no_implicit_reexport = False
# warn_return_any = False
## END loosenings of `strict`
# prefer types that can be understood by reading code in only one place
local_partial_types = True
# avoid easily-avoidable dead code
warn_unreachable = True
# prefer direct imports
implicit_reexport = False
# got untyped dependencies -- this is fine
ignore_missing_imports = True
disable_error_code = import-untyped,import-not-found
###
# module-specific config
## sharev2 code; largely unannotated
[mypy-share.*,api.*,project.*,osf_oauth2_adapter.*,manage]
# loosen strict:
disallow_subclassing_any = False
disallow_untyped_decorators = False
disallow_any_generics = False
disallow_untyped_calls = False
disallow_incomplete_defs = False
disallow_untyped_defs = False
warn_return_any = False
disable_error_code = var-annotated,attr-defined
## django migrations are whatever
[mypy-*.migrations.*]
strict = False
disallow_subclassing_any = False
## tests are looser
[mypy-tests.*]
disallow_untyped_defs = False
## trove code aiming to someday be well-annotated (except for the django...)
[mypy-trove.*]
disallow_untyped_decorators = False
disallow_any_generics = False
warn_return_any = False
[mypy-trove.views.*,trove.admin,trove.apps]
disallow_subclassing_any = False
disallow_untyped_defs = False
disallow_incomplete_defs = False
[mypy-trove.models.*]
disallow_subclassing_any = False
disallow_untyped_defs = False
disallow_incomplete_defs = False
disable_error_code = var-annotated,attr-defined