Disable warn_unused_ignores again (#60480)

Summary:
Fixes https://github.com/pytorch/pytorch/pull/60006#issuecomment-866130657.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/60480

Test Plan: Run `mypy --config mypy-strict.ini` with [`ruamel.yaml`](https://pypi.org/project/ruamel.yaml/) installed.

Reviewed By: zhouzhuojie

Differential Revision: D29307823

Pulled By: samestep

fbshipit-source-id: 97fa4b7dad0465c269411c48142b22ce751bf830
This commit is contained in:
Sam Estep 2021-06-22 12:37:32 -07:00 committed by Facebook GitHub Bot
parent 6a87e8d087
commit f42140cb8a
3 changed files with 9 additions and 3 deletions

View File

@ -26,7 +26,7 @@ def fn(base: str) -> str:
with open(Path(__file__).parent.parent.parent / fn('.'), "r") as f:
contents = f.read()
yaml = ruamel.yaml.YAML()
yaml = ruamel.yaml.YAML() # type: ignore[attr-defined]
yaml.preserve_quotes = True
yaml.width = 1000
yaml.boolean_representation = ['False', 'True']

View File

@ -19,7 +19,6 @@ 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
warn_unused_ignores = True
disallow_any_generics = True
disallow_subclassing_any = True
disallow_untyped_calls = True
@ -33,6 +32,10 @@ warn_return_any = True
implicit_reexport = False
strict_equality = True
# do not reenable this:
# https://github.com/pytorch/pytorch/pull/60006#issuecomment-866130657
warn_unused_ignores = False
files =
.github,
benchmarks/instruction_counts,

View File

@ -6,13 +6,16 @@ plugins = mypy_plugins/check_mypy_version.py
cache_dir = .mypy_cache/normal
warn_unused_configs = True
warn_unused_ignores = 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
#
# Note: test/ still has syntax errors so can't be added
#