Skip to content

Commit cb9dc44

Browse files
authored
Merge branch 'main' into move-coveragerc-to-pyproject
2 parents bcbe2d8 + e32d7bf commit cb9dc44

3 files changed

Lines changed: 42 additions & 41 deletions

File tree

check/mypy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515

1616
################################################################################
17-
# Runs mypy on the repository using a preconfigured mypy.ini file.
17+
# Runs mypy on the repository starting from the root.
1818
#
1919
# Usage:
2020
# check/mypy [--flags]
@@ -25,7 +25,7 @@ cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" || exit 1
2525
cd "$(git rev-parse --show-toplevel)" || exit 1
2626

2727
echo -e -n "\033[31m"
28-
mypy --config-file=dev_tools/conf/mypy.ini "$@" .
28+
mypy "$@" .
2929
result=$?
3030
echo -e -n "\033[0m"
3131

dev_tools/conf/mypy.ini

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

pyproject.toml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,43 @@ omit = [
3030
"./profiling/performance_benchmarks.py",
3131
"./dev_tools/*",
3232
]
33+
34+
[tool.mypy]
35+
implicit_optional = true
36+
37+
# TODO: this is temporary for 1.7.0 release. Remove this & fix the errors.
38+
ignore_errors = true
39+
40+
[[tool.mypy.overrides]]
41+
module = "__main__"
42+
follow_imports = "silent"
43+
ignore_missing_imports = true
44+
45+
[[tool.mypy.overrides]]
46+
module = [
47+
"_pytest.*",
48+
"absl",
49+
"apiclient.*",
50+
"h5py",
51+
"numpy.*",
52+
"pubchempy",
53+
"pybtas",
54+
"pyscf.*",
55+
"pytest.*",
56+
"scipy.*",
57+
"tensorflow_docs",
58+
]
59+
follow_imports = "silent"
60+
ignore_missing_imports = true
61+
62+
[[tool.mypy.overrides]]
63+
module = "sympy.*"
64+
ignore_missing_imports = true
65+
66+
[[tool.mypy.overrides]]
67+
module = "tensorflow_docs.*"
68+
ignore_missing_imports = true
69+
70+
[[tool.mypy.overrides]]
71+
module = "deprecation"
72+
follow_untyped_imports = true

0 commit comments

Comments
 (0)