-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
PIE794 false positive when mutating class variable. Also leads to a bad fix. #8497
Labels
bug
Something isn't working
Comments
making it do |
pytorchmergebot
pushed a commit
to pytorch/pytorch
that referenced
this issue
Nov 5, 2023
Enables some tests that were incorrectly not being run and enables PIE794 globally. This rule checks if a classvar is defined twice as flags it as it is likely a bug. In fact, we found several cases where it was a bug. It does have a couple of false positives which I flagged upstream and replaced with noqas: astral-sh/ruff#8497 Pull Request resolved: #112989 Approved by: https://github.com/malfet
xuhancn
pushed a commit
to xuhancn/pytorch
that referenced
this issue
Nov 7, 2023
…#112989) Enables some tests that were incorrectly not being run and enables PIE794 globally. This rule checks if a classvar is defined twice as flags it as it is likely a bug. In fact, we found several cases where it was a bug. It does have a couple of false positives which I flagged upstream and replaced with noqas: astral-sh/ruff#8497 Pull Request resolved: pytorch#112989 Approved by: https://github.com/malfet
charliermarsh
added a commit
that referenced
this issue
Nov 12, 2023
Skylion007
added a commit
to Skylion007/pytorch
that referenced
this issue
Nov 14, 2023
…#112989) Enables some tests that were incorrectly not being run and enables PIE794 globally. This rule checks if a classvar is defined twice as flags it as it is likely a bug. In fact, we found several cases where it was a bug. It does have a couple of false positives which I flagged upstream and replaced with noqas: astral-sh/ruff#8497 Pull Request resolved: pytorch#112989 Approved by: https://github.com/malfet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
with unsafe fixes applied becomes:
It may not be the cleanest way of writing that, but it probably shouldn't trigger.
is a use case I've actually seen in real code that probably should not be flagged.
ruff version is 0.1.4.
The text was updated successfully, but these errors were encountered: