Remove unused type: ignore comments#56402
Closed
samestep wants to merge 2 commits intopytorch:masterfrom
samestep:mypy-warn-unused-ignores
Closed
Remove unused type: ignore comments#56402samestep wants to merge 2 commits intopytorch:masterfrom samestep:mypy-warn-unused-ignores
type: ignore comments#56402samestep wants to merge 2 commits intopytorch:masterfrom
samestep:mypy-warn-unused-ignores
Conversation
Contributor
💊 CI failures summary and remediationsAs of commit 6b6bed6 (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
Contributor
|
@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Contributor
Author
|
Closing this because I think the downsides actually do outweigh the benefits (at least, the benefits beyond what #56290 would provide). |
facebook-github-bot
pushed a commit
that referenced
this pull request
Jun 7, 2021
Summary: This PR greatly simplifies `mypy-strict.ini` by strictly typing everything in `.github` and `tools`, rather than picking and choosing only specific files in those two dirs. It also removes `warn_unused_ignores` from `mypy-strict.ini`, for reasons described in #56402 (comment): basically, that setting makes life more difficult depending on what libraries you have installed locally vs in CI (e.g. `ruamel`). Pull Request resolved: #59117 Test Plan: ``` flake8 mypy --config mypy-strict.ini ``` Reviewed By: malfet Differential Revision: D28765386 Pulled By: samestep fbshipit-source-id: 3e744e301c7a464f8a2a2428fcdbad534e231f2e
deniskokarev
pushed a commit
to deniskokarev/pytorch
that referenced
this pull request
Jun 9, 2021
Summary: This PR greatly simplifies `mypy-strict.ini` by strictly typing everything in `.github` and `tools`, rather than picking and choosing only specific files in those two dirs. It also removes `warn_unused_ignores` from `mypy-strict.ini`, for reasons described in pytorch#56402 (comment): basically, that setting makes life more difficult depending on what libraries you have installed locally vs in CI (e.g. `ruamel`). Pull Request resolved: pytorch#59117 Test Plan: ``` flake8 mypy --config mypy-strict.ini ``` Reviewed By: malfet Differential Revision: D28765386 Pulled By: samestep fbshipit-source-id: 3e744e301c7a464f8a2a2428fcdbad534e231f2e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A prerequisite for #56290. This PR enables
mypy'swarn_unused_ignoresin our non-strictmypy.iniconfig, and removes all existing unusedtype: ignorecomments.Possible downsides of doing this:
mypy.iniandmypy-strict.ini.mypyerrors that appear on some platforms or environments but not on others.Test plan:
CI, or run
mypylocally.