-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Configure mypy to install dependencies in CI and update pyproject.toml #10682
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
Conversation
tchaton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
|
Good, now the failures are showing in our CI. Do we want to fix all them here, and merge this as a single PR? |
|
@carmocca I'm working on fixing them here |
|
There is still a strange discrepancy between CI and running mypy locally: https://www.diffchecker.com/mFIxqa2Y [Update] The discrepancy was due to an older version of torch installed locally |
|
This PR is ready to go, I updated pyproject.toml with the files I couldn't fix. |
|
@daniellepintz @carmocca I suspect there will always be code paths that will be ignored. We have several conditional imports. So unless the mypy check gets included in all the jobs we run, there will always be a discrepancy. |
Codecov Report
@@ Coverage Diff @@
## master #10682 +/- ##
========================================
- Coverage 92% 88% -4%
========================================
Files 177 177
Lines 16397 16396 -1
========================================
- Hits 15053 14443 -610
- Misses 1344 1953 +609 |
What does this PR do?
code-checks.ymlto install all dependencies - fixes Why is mypy checking `pytorch_lightning/plugins/precision/native_amp.py`? #9751pyproject.tomlfor the files that still have type errorsDoes your PR introduce any breaking changes? If yes, please list them.
Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃