-
Notifications
You must be signed in to change notification settings - Fork 416
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
Apply PEP 604 union type syntax codemod #2561
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2561 +/- ##
==========================================
- Coverage 99.98% 99.98% -0.01%
==========================================
Files 193 193
Lines 17111 17071 -40
==========================================
- Hits 17108 17068 -40
Misses 3 3 ☔ View full report in Codecov by Sentry. |
f2860e5
to
4cbda31
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.
Thanks!
@Balandat has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This pull request was exported from Phabricator. Differential Revision: D63733395 |
Summary: This codemods all `Optional[X]` type definitions to use the PEP 604 syntax `X | None` instead. I also ran ufmt to fix the imports. Why? I came across https://github.com/asottile/pyupgrade randomly and figured I'd give it a shot... This is mostly to test that everything runs smoothly. This may be kind of a pain to rebase on so not sure we should merge this in in one big chunk... Pull Request resolved: pytorch#2561 Reviewed By: esantorella Differential Revision: D63733395 Pulled By: Balandat
Summary: This codemods all `Optional[X]` type definitions to use the PEP 604 syntax `X | None` instead. I also ran ufmt to fix the imports. Why? I came across https://github.com/asottile/pyupgrade randomly and figured I'd give it a shot... This is mostly to test that everything runs smoothly. This may be kind of a pain to rebase on so not sure we should merge this in in one big chunk... Pull Request resolved: pytorch#2561 Reviewed By: esantorella Differential Revision: D63733395 Pulled By: Balandat
This pull request was exported from Phabricator. Differential Revision: D63733395 |
This codemods all
Optional[X]
type definitions to use the PEP 604 syntaxX | None
instead.