pytorch/mypy-inductor.ini
Jez Ng 5cfa0647a7 Update mypy to 1.7.0 (#114160)
It appears that `mypy` is now checking a few more previously-unchecked files; these files
are being found via import-following. Not sure exactly why they weren't being checked before.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/114160
Approved by: https://github.com/eellison
ghstack dependencies: #114162
2023-11-28 06:45:55 +00:00

83 lines
1.8 KiB
INI

[mypy]
plugins = mypy_plugins/check_mypy_version.py, numpy.typing.mypy_plugin
cache_dir = .mypy_cache/inductor
allow_redefinition = True
warn_unused_configs = True
warn_redundant_casts = True
show_error_codes = True
show_column_numbers = True
check_untyped_defs = True
follow_imports = silent
# do not reenable this:
# https://github.com/pytorch/pytorch/pull/60006#issuecomment-866130657
warn_unused_ignores = False
disallow_any_generics = True
files =
torch/_dynamo,
torch/_inductor
# We access some Python runtime classes / class members that are only available
# in 3.11. These accesses are gated by runtime checks that cannot always be
# understood by mypy.
python_version = 3.11
[mypy-colorama.*]
ignore_missing_imports = True
[mypy-cutlass_library.*]
ignore_missing_imports = True
[mypy-deeplearning.*]
ignore_missing_imports = True
[mypy-dill.*]
ignore_missing_imports = True
[mypy-einops.*]
ignore_missing_imports = True
[mypy-libfb.*]
ignore_missing_imports = True
# sympy is too dynamic, hard to type properly
[mypy-sympy.*]
ignore_missing_imports = True
follow_imports = skip
[mypy-torch.*.fb.*]
ignore_missing_imports = True
# FIXME: importing this creates lots of type errors
[mypy-torch._dynamo.variables.*]
follow_imports = skip
# FIXME: importing this creates lots of type errors
[mypy-torch.backends.*]
follow_imports = skip
[mypy-torch.fb.*]
ignore_missing_imports = True
# FIXME: importing this creates lots of type errors
[mypy-torch.fx.*]
follow_imports = skip
# FIXME: importing this creates lots of type errors
[mypy-torch.testing._internal.*]
follow_imports = skip
# sympy is too dynamic, hard to type properly
[mypy-torch.utils._sympy.*]
follow_imports = skip
[mypy-torch_xla.*]
ignore_missing_imports = True
[mypy-torchvision.*]
ignore_missing_imports = True
[mypy-triton.*]
ignore_missing_imports = True