-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmypy.ini
68 lines (60 loc) · 1.96 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
[mypy]
python_version = 3.7
files = ['lib/spack/llnl/**/*.py', 'lib/spack/spack/**/*.py', './var/spack/repos/builtin/packages/*/package.py']
mypy_path = ['bin', 'lib/spack', 'lib/spack/external', 'var/spack/repos/builtin']
allow_redefinition = true
# This and a generated import file allows supporting packages
namespace_packages = true
# To avoid re-factoring all the externals, ignore errors and missing imports
# globally, then turn back on in spack and spack submodules
ignore_errors = true
ignore_missing_imports = true
[[mypy.overrides]]
module = 'spack.*'
ignore_errors = false
ignore_missing_imports = false
[[mypy.overrides]]
module = 'packages.*'
ignore_errors = false
ignore_missing_imports = false
# we can't do this here, not a module scope option, in spack style instead
# disable_error_code = 'no-redef'
[[mypy.overrides]]
module = 'llnl.*'
ignore_errors = false
ignore_missing_imports = false
[[mypy.overrides]]
module = 'spack.test.packages'
ignore_errors = true
# ignore errors in fake import path for packages
[[mypy.overrides]]
module = 'spack.pkg.*'
ignore_errors = true
ignore_missing_imports = true
# Spack imports a number of external packages, and they *may* require Python 3.8 or
# higher in recent versions. This can cause mypy to fail because we check for 3.7
# compatibility. We could restrict mypy to run for the oldest supported version (3.7),
# but that means most developers won't be able to run mypy, which means it'll fail
# more in CI. Instead, we exclude these imported packages from mypy checking.
[[mypy.overrides]]
module = [
'IPython',
'altgraph',
'attr',
'boto3',
'botocore',
'distro',
'importlib.metadata',
'jinja2',
'jsonschema',
'macholib',
'markupsafe',
'numpy',
'pkg_resources',
'pyristent',
'pytest',
'ruamel.yaml',
'six',
]
follow_imports = 'skip'
follow_imports_for_stubs = true