Use strict to toggle strict options in MYPYSTRICT (#118479)

As we force a specific version of mypy, it's OK to use the agglomerated flag.

Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/118479
Approved by: https://github.com/Skylion007, https://github.com/albanD
ghstack dependencies: #118414, #118418, #118432, #118467, #118468, #118469, #118475
This commit is contained in:
Edward Z. Yang
2024-01-27 19:39:23 -08:00
committed by PyTorch MergeBot
parent ecca533872
commit 119b66ba16
8 changed files with 11 additions and 24 deletions

View File

@ -17,21 +17,8 @@ show_column_numbers = True
warn_no_return = True
disallow_any_unimported = True
# Across versions of mypy, the flags toggled by --strict vary. To ensure
# we have reproducible type check, we instead manually specify the flags
warn_unused_configs = True
disallow_any_generics = True
disallow_subclassing_any = True
disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
disallow_untyped_decorators = True
no_implicit_optional = True
warn_redundant_casts = True
warn_return_any = True
strict = True
implicit_reexport = False
strict_equality = True
# do not reenable this:
# https://github.com/pytorch/pytorch/pull/60006#issuecomment-866130657