Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unpin mypy #1878

Merged
merged 4 commits into from
Feb 14, 2022
Merged

unpin mypy #1878

merged 4 commits into from
Feb 14, 2022

Conversation

Jasha10
Copy link
Collaborator

@Jasha10 Jasha10 commented Nov 6, 2021

Closes #1326

Edit:
I've updated this PR and the tests are now passing.
Commits:

  • e7816cc: unpin mypy
  • 27bd6fc: update noxfile.py and .mypy.ini
  • 2365aaa: modify source files so that newer mypy version will pass

Comments on this diff:
The latest version of mypy errors if it detects multiple modules with the same name (mypy#4008). This means simultaneously checking many files named my_app.py will result in a mypy error (assuming that there is no __init__.py next to my_app.py). Guido van Rossum commented on mypy#4008, saying "You should really run mypy separately over each package in that case". This motivates many of the changes made in the second and third commits to this PR.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 6, 2021
@Jasha10
Copy link
Collaborator Author

Jasha10 commented Nov 6, 2021

@Jasha10
Copy link
Collaborator Author

Jasha10 commented Jan 11, 2022

Rebased against main to incorporate recent code updates.

- check subdirs separately (python/mypy#4008)
- use mypy flags --install-types --non-interactive
- fixup noxfile: use lint_plugins to run mypy on plugins
- noxfile: run mypy on tools/ without --strict flag
@Jasha10 Jasha10 marked this pull request as ready for review February 14, 2022 21:22
@Jasha10 Jasha10 requested a review from pixelb February 14, 2022 21:34
tools/release/release.py Outdated Show resolved Hide resolved
@Jasha10 Jasha10 merged commit 9641ec5 into facebookresearch:main Feb 14, 2022
@Jasha10 Jasha10 deleted the unpin_mypy branch February 14, 2022 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade mypy
3 participants