Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

drona-gyawali
Copy link
Contributor

@drona-gyawali drona-gyawali 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 6 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.

Screenshot

N/A

Stakeholders

@RayBB

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.

Looks great to me.
Now we need staff to review/merge.

@RayBB RayBB added the Needs: Staff / Internal Reviewed a PR but don't have merge powers? Use this. label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects: Developers Needs: Staff / Internal Reviewed a PR but don't have merge powers? Use this.
Projects
Status: Waiting Review/Merge from Staff
Development

Successfully merging this pull request may close these issues.

2 participants