Skip to content

Commit c99faf4

Browse files
committed
Move mypy options to pyproject.toml
In addition to being the more modern approach, this lets us start to consolidate tool options into a single well-known locadtion instead of burying them in a nonstandard location like `dev_tools/conf/`.
1 parent 5e4855e commit c99faf4

2 files changed

Lines changed: 39 additions & 39 deletions

File tree

dev_tools/conf/mypy.ini

Lines changed: 0 additions & 39 deletions
This file was deleted.

pyproject.toml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,42 @@ skip-magic-trailing-comma = true
2222
# Speed up pytest-cov on Python 3.12+ by enabling sys.monitoring if possible.
2323
core = "sysmon"
2424
disable_warnings = ["no-sysmon"]
25+
26+
[tool.mypy]
27+
implicit_optional = true
28+
# TODO: this is temporary for 1.7.0 release. Remove this & fix the errors.
29+
ignore_errors = true
30+
31+
[[tool.mypy.overrides]]
32+
module = "__main__"
33+
follow_imports = "silent"
34+
ignore_missing_imports = true
35+
36+
[[tool.mypy.overrides]]
37+
module = [
38+
"apiclient.*",
39+
"numpy.*",
40+
"pytest.*",
41+
"scipy.*",
42+
"_pytest.*",
43+
"h5py",
44+
"pyscf.*",
45+
"pubchempy",
46+
"pybtas",
47+
"absl",
48+
"tensorflow_docs"
49+
]
50+
follow_imports = "silent"
51+
ignore_missing_imports = true
52+
53+
[[tool.mypy.overrides]]
54+
module = "sympy.*"
55+
ignore_missing_imports = true
56+
57+
[[tool.mypy.overrides]]
58+
module = "tensorflow_docs.*"
59+
ignore_missing_imports = true
60+
61+
[[tool.mypy.overrides]]
62+
module = "deprecation"
63+
follow_untyped_imports = true

0 commit comments

Comments
 (0)