Skip to content

(RUF012) Fixed mutable class Defaults- Task 1 #10278#10281

Closed
ananyakaligal wants to merge 9 commits intointernetarchive:masterfrom
ananyakaligal:task-1
Closed

(RUF012) Fixed mutable class Defaults- Task 1 #10278#10281
ananyakaligal wants to merge 9 commits intointernetarchive:masterfrom
ananyakaligal:task-1

Conversation

@ananyakaligal
Copy link

@ananyakaligal ananyakaligal commented Jan 5, 2025

Part of #10196

  • 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

@RayBB RayBB marked this pull request as draft January 5, 2025 19:53
Copy link
Collaborator

@RayBB RayBB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unnecessary navigation changes.
Make sure python tests are passing.
Then you can make this as not draft and tag me.
Thanks!

@RayBB RayBB mentioned this pull request Jan 5, 2025
24 tasks
@ananyakaligal
Copy link
Author

yes, working on it

@ananyakaligal ananyakaligal deleted the task-1 branch January 6, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants