-
-
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 2 #10286
base: master
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
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.
As far as I'm concerned this looks good.
However, I'm going to need to get a second opinion from staff
@ananyakaligal 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/ |
@RayBB sure, I will work on this. |
@ananyakaligal any update on this? |
Hey @RayBB, My schedule has been pretty packed, and I'm working on the preview button right now. The CSS part of that is a bit much and very specific, so it's taking some time. I'll definitely work on this by the end of this week. My apologies! |
No problem. Marking as draft until it's ready 👍 |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
working on it |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@RayBB I used MappingProxyType to ensure immutability, as I encountered dictionaries throughout and wanted to maintain consistency. Now, I will investigate the files where the class variable overriding issue popped up. |
Part of #10196
NOTE: These are NOT automated changes, they are done by hand
This pull request addresses Part of RUF012 Rule - Task 2, with a focus on enhancing code quality and resolving linting issues related to mutable class attributes.
Technical Details:
Testing:
Ran ruff check --select RUF012 to confirm that no further warnings related to mutable class attributes remain.
Screenshot:
N/A
Stakeholders:
@RayBB