[ONNX] Modernize python syntax#77935
Closed
justinchuby wants to merge 2 commits intopytorch:masterfrom
Closed
Conversation
Contributor
🔗 Helpful links
❌ 2 New FailuresAs of commit 0f86899 (more details on the Dr. CI page): Expand to see more
🕵️ 2 new failures recognized by patternsThe following CI failures do not appear to be due to upstream breakages
|
BowenBao
approved these changes
May 24, 2022
Collaborator
BowenBao
left a comment
There was a problem hiding this comment.
LGTM, thanks! It'd be great if you could add in description the summary of the type of changes in this PR.
Collaborator
Author
Done |
Collaborator
Author
|
@pytorchbot merge this please |
facebook-github-bot
pushed a commit
that referenced
this pull request
May 26, 2022
Summary: Use pyupgrade(https://github.com/asottile/pyupgrade) and flynt to modernize python syntax ```sh pyupgrade --py36-plus --keep-runtime-typing torch/onnx/**/*.py pyupgrade --py36-plus --keep-runtime-typing test/onnx/**/*.py flynt torch/onnx/ --line-length 120 ``` - Use f-strings for string formatting - Use the new `super()` syntax for class initialization - Use dictionary / set comprehension Pull Request resolved: #77935 Approved by: https://github.com/BowenBao Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/161e931156744acc384ce14e410d3d27d289109a Reviewed By: mehtanirav Differential Revision: D36668836 fbshipit-source-id: f115c34c039505ef2786c5e6c14d7294b0463982
justinchuby
added a commit
to justinchuby/pytorch
that referenced
this pull request
Jul 27, 2022
Use pyupgrade(https://github.com/asottile/pyupgrade) and flynt to modernize python syntax ```sh pyupgrade --py36-plus --keep-runtime-typing torch/onnx/**/*.py pyupgrade --py36-plus --keep-runtime-typing test/onnx/**/*.py flynt torch/onnx/ --line-length 120 ``` - Use f-strings for string formatting - Use the new `super()` syntax for class initialization - Use dictionary / set comprehension Pull Request resolved: pytorch#77935 Approved by: https://github.com/BowenBao
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use pyupgrade(https://github.com/asottile/pyupgrade) and flynt to modernize python syntax
super()syntax for class initialization