-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
(RUF012) Fixed mutable class Defaults- Task 4 #10278
base: master
Are you sure you want to change the base?
(RUF012) Fixed mutable class Defaults- Task 4 #10278
Conversation
for more information, see https://pre-commit.ci
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.
Looks great to me.
Now we need staff to review/merge.
@drona-gyawali I looked at this with Drini and we realized we probably don't want all these values to be mutable. See https://docs.astral.sh/ruff/rules/mutable-class-default/ |
I'll make the necessary changes and let you know once they're ready for review. |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Hi @RayBB , I made changes in 4 files, but in this PR, there are 6 files, and I left two files unchanged: |
@drona-gyawali it looks like a good start. As far as the ones if you're not sure if they're mutable I'd say:
|
Part of #10196
NOTE: These are NOT automated changes, they are done by hand
Technical
6 files
to usetyping.ClassVar
for clarity and correctness.Testing
Ran ruff check --select RUF012 to confirm no further warnings.
Screenshot
N/A
Stakeholders
@RayBB