Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions check/mypy
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.

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

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

Expand Down
39 changes: 0 additions & 39 deletions dev_tools/conf/mypy.ini

This file was deleted.

40 changes: 40 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,43 @@ skip-magic-trailing-comma = true
# Speed up pytest-cov on Python 3.12+ by enabling sys.monitoring if possible.
core = "sysmon"
disable_warnings = ["no-sysmon"]

[tool.mypy]
implicit_optional = true

# TODO: this is temporary for 1.7.0 release. Remove this & fix the errors.
ignore_errors = true

[[tool.mypy.overrides]]
module = "__main__"
follow_imports = "silent"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = [
"_pytest.*",
"absl",
"apiclient.*",
"h5py",
"numpy.*",
"pubchempy",
"pybtas",
"pyscf.*",
"pytest.*",
"scipy.*",
"tensorflow_docs",
]
follow_imports = "silent"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "sympy.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "tensorflow_docs.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "deprecation"
follow_untyped_imports = true