-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Add MyPY to lint GHA workflow #54067
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
💊 CI failures summary and remediationsAs of commit c02e219 (more details on the Dr. CI page):
❄️ 1 failure tentatively classified as flakybut reruns have not yet been triggered to confirm:
|
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.
@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
05b609b to
c02e219
Compare
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.
@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
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.
TBH, it's probably safe to just delete the test entirely
| self.fail(f"mypy failed:\n{stdout}") | ||
|
|
||
| @unittest.skipIf(not HAVE_MYPY, "need mypy") | ||
| @unittest.skipIf(os.getenv("IN_CI") is not None, "Already running in CI during lint") |
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.
reran this locally on base commit shown 1282 file touched instead of 1281. wondering if we missed something.
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.
Thank you for pointing it out. Will do the comparison in the followup PR.
| set -eux | ||
| time python -mtools.generate_torch_version --is_debug=false | ||
| time python -mtools.codegen.gen -s aten/src/ATen -d build/aten/src/ATen | ||
| time python -mtools.pyi.gen_pyi --native-functions-path aten/src/ATen/native/native_functions.yaml --deprecated-functions-path "tools/autograd/deprecated.yaml" |
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.
For future work; I'd love it if we can consolidate this into a single command to run
|
@ezyang I think it's good to keep the test in place, so that people can validate it locally if they choose to. |
Sure, local validation is a good idea. I guess I'm just kind of hoping that in the glorious future you can just do something like |
Also disable test_run_mypy from test_type_hints.py as it is running as part of GHA