summaryrefslogtreecommitdiff
path: root/mypy.ini
blob: 3d394885976da9679a3ef4908bf8aed429946f86 (plain)
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
[mypy]
files = lib/**/*.py,tests/**/*.py

# We use class properties, which mypy considers an error, probably because it's going to be deprecated.
# Ignore that for now.
disable_error_code = misc

# A handful of strictness increases we can pass as it is
warn_unused_configs = True
warn_redundant_casts = True
warn_unused_ignores = True

strict_equality = True
extra_checks = True
disallow_subclassing_any = True
disallow_untyped_decorators = True

# An example of increased strictness: We can increase the strictness of parts of the code as we go.
[mypy-lib.elements.clone]
check_untyped_defs = True
disallow_incomplete_defs = True
disallow_untyped_defs = True

# This part of the code will need some work before it'll start passing.
[mypy-lib.tartan.*]
ignore_errors = True

[mypy-lib.sew_stack.*]
ignore_errors = True

[mypy-tests.*]
# The tests should be typechecked because they're all new code, and because they're tests we don't really care if they have perfect annotations.
check_untyped_defs = True

# These libraries are missing type information
[mypy-colormath2.*]
ignore_missing_imports = True

[mypy-winutils.*]
ignore_missing_imports = True

# ... And this one is ours but is missing type information for now anyway...
[mypy-pystitch.*]
ignore_missing_imports = True
follow_imports = skip