|
| 1 | +[mypy] |
| 2 | +# start with an ideal: enable strict type-checking, then loosen in module-specific config |
| 3 | +# see https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options |
| 4 | +strict = True |
| 5 | +## BEGIN aspects of `strict` that could be loosened: |
| 6 | +# disallow_subclassing_any = False |
| 7 | +# warn_unused_configs = False |
| 8 | +# warn_redundant_casts = False |
| 9 | +# warn_unused_ignores = False |
| 10 | +# strict_equality = False |
| 11 | +# strict_concatenate = False |
| 12 | +# check_untyped_defs = False |
| 13 | +# disallow_untyped_decorators = False |
| 14 | +# disallow_any_generics = False |
| 15 | +# disallow_untyped_calls = False |
| 16 | +# disallow_incomplete_defs = False |
| 17 | +# disallow_untyped_defs = False |
| 18 | +# no_implicit_reexport = False |
| 19 | +# warn_return_any = False |
| 20 | +## END aspects of `strict` |
| 21 | + |
| 22 | +# prefer types that can be understood by reading code in only one place |
| 23 | +local_partial_types = True |
| 24 | +# avoid easily-avoidable dead code |
| 25 | +warn_unreachable = True |
| 26 | + |
| 27 | +### |
| 28 | +# module-specific config |
| 29 | + |
| 30 | +[mypy-addon_toolkit.*] |
| 31 | +## loosen strict: |
| 32 | +disallow_any_generics = False |
| 33 | +disallow_untyped_calls = False |
| 34 | +disallow_incomplete_defs = False |
| 35 | +disallow_untyped_defs = False |
| 36 | + |
| 37 | +[mypy-addon_service.*,app.*,manage] |
| 38 | +# got untyped dependencies -- this is fine |
| 39 | +ignore_missing_imports = True |
| 40 | +disable_error_code = import-untyped,import-not-found |
| 41 | +## loosen strict: |
| 42 | +disallow_subclassing_any = False |
| 43 | +disallow_untyped_decorators = False |
| 44 | +disallow_any_generics = False |
| 45 | +disallow_untyped_calls = False |
| 46 | +disallow_incomplete_defs = False |
| 47 | +disallow_untyped_defs = False |
| 48 | +warn_return_any = False |
| 49 | + |
| 50 | +[mypy-addon_service.migrations.*] |
| 51 | +strict = False |
| 52 | +disable_error_code = var-annotated |
0 commit comments