-
Notifications
You must be signed in to change notification settings - Fork 12
/
mypy.ini
88 lines (71 loc) · 2.62 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
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
80
81
82
83
84
85
86
87
88
[mypy]
warn_unused_configs = True
warn_redundant_casts = True
plugins = pydantic.mypy
# networkx doesn't ship type annotations
[mypy-networkx.*]
ignore_missing_imports = True
# astropy doesn't ship type annotations
[mypy-astropy.*]
ignore_missing_imports = True
# colorama doesn't ship type annotations
[mypy-colorama.*]
ignore_missing_imports = True
# Don't check LSST packages generally or even try to import them, since most
# don't have type annotations.
[mypy-lsst.*]
ignore_missing_imports = True
ignore_errors = True
# Do expect to import type annotations from LSST middleware dependencies that
# should have them, but don't re-check them as they have their own mypy.ini
# files with their own exceptions.
[mypy-lsst.utils.*]
ignore_missing_imports = False
ignore_errors = True
[mypy-lsst.resources.*]
ignore_missing_imports = False
ignore_errors = True
[mypy-lsst.daf.butler.*]
ignore_missing_imports = False
ignore_errors = True
# Check all of pipe.base...
[mypy-lsst.pipe.base.*]
ignore_missing_imports = False
ignore_errors = False
disallow_untyped_defs = True
disallow_incomplete_defs = True
strict_equality = True
warn_unreachable = True
warn_unused_ignores = True
# ...except the modules and subpackages below (can't find a way to do line
# breaks in the lists of modules).
# These module contains metaprogramming that mypy can't handle.
[mypy-lsst.pipe.base._datasetQueryConstraints.*]
# This one contains some annotations, but they're either wrong or mypy can't
# tell that they're right.
ignore_errors = True
[mypy-lsst.pipe.base.connections.*]
# This one contains some annotations that are good, but some metaclass methods
# (e.g. __prepare__) that seem to be fundamentally incompatible with mypy, and
# yet also can't be individually ignored because we also have to do a noqa for
# flake8 on the same line.
disallow_untyped_defs = False
[mypy-lsst.pipe.base.connectionTypes.*]
# Again, some good annotations, but annotating the descriptor metaprogramming
# is just not worth the effort.
disallow_untyped_defs = False
# These modules are deprecated (maybe implicitly, as being Gen2-only). Not
# worth adding new annotations to them.
[mypy-lsst.pipe.base.argumentParser.*]
disallow_untyped_defs = False
[mypy-lsst.pipe.base.shims.*]
disallow_untyped_defs = False
# ConfigOverrides uses the Python built-in ast module, and figuring out how
# to correctly type its visitation interface doesn't seem worth the effort
# right now.
[mypy-lsst.pipe.base.configOverrides.*]
disallow_untyped_defs = False
# version.py is added by scons and may not exist when we run mypy.
[mypy-lsst.pipe.base.version]
ignore_errors = True
ignore_missing_imports = True