Skip to content

Strictly type everything in .github and tools#59117

Closed
samestep wants to merge 9 commits intopytorch:masterfrom
samestep:mypy-strict-ini-consolidate
Closed

Strictly type everything in .github and tools#59117
samestep wants to merge 9 commits intopytorch:masterfrom
samestep:mypy-strict-ini-consolidate

Conversation

@samestep
Copy link
Copy Markdown
Contributor

@samestep samestep commented May 27, 2021

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).

Test plan:

flake8
mypy --config mypy-strict.ini

@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented May 27, 2021

💊 CI failures summary and remediations

As of commit 622d4a6 (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-scanned failure(s)

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@samestep samestep changed the title Strictly type everything in tools Strictly type everything in .github and tools May 27, 2021
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@samestep samestep marked this pull request as ready for review May 28, 2021 00:07
@samestep samestep requested review from albanD and soulitzer as code owners May 28, 2021 00:07
@samestep samestep requested a review from a team May 28, 2021 00:07
Copy link
Copy Markdown
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mypy is an authority here: if it says its green will merge it!

@samestep samestep mentioned this pull request May 28, 2021
15 tasks
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Copy Markdown
Contributor

@walterddr walterddr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

would suggest landing this during off peak hour to avoid cross merge :-P

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@samestep merged this pull request in 737d920.

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
@samestep samestep deleted the mypy-strict-ini-consolidate branch June 11, 2021 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants