-
Notifications
You must be signed in to change notification settings - Fork 24.1k
Add perf_linter to auto-fix some anti-patterns #148416
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
base: gh/jansel/517/base
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/148416
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New FailuresAs of commit 8f30efa with merge base aade4fb ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
""" | ||
ERROR1 = "Generators are slow! Use list comprehensions instead." | ||
ERROR2 = "list(x) is slow! Use [*x] instead." | ||
ERROR3 = "list()/dict() is slow! Use []/{} instead." |
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.
Do not reinvent the wheel here: C408 already does this. It's just disabled because "we like the old dict kwarg syntax` even though it's slower, less efficient etc.
ghstack-source-id: 49d9144 Pull Request resolved: pytorch/pytorch#148416
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
Stack from ghstack (oldest at bottom):