-
-
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 1 #10283
base: master
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
I closed the previous draft pull request because I ran into some errors on that branch and couldn't continue working on it. I created a new branch and am still working on it. |
Hello @RayBB, What happened: Clarification: |
@ananyakaligal I need to catchup on many other of the issues before digging into this one. For now lets leave it as a draft and I'll follow up with you when I can evaluate 👍 |
@RayBB Thankyou, please do tag me after you evaluate it because the rule hasn't been enabled yet, and I can do it later. |
Part of #10196
NOTE: These are NOT automated changes, they are done by hand
Prevents accidental modifications of mutable class attributes at the instance level.
Aligns with project style guidelines enforced by Ruff.
Technical
Updated mutable class attributes in 3 files to use typing.ClassVar for clarity and correctness.
Added ClassVar annotations to mutable class attributes to ensure they are treated as class-level attributes.
Ensured proper type hints for clarity and type safety.
Testing
Ran ruff check --select RUF012 to confirm no further warnings.
Stakeholders
@RayBB