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 2 #10286

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

Conversation

ananyakaligal
Copy link
Contributor

@ananyakaligal ananyakaligal commented Jan 6, 2025

Part of #10196
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:

  • Updated Files: The ClassVar annotations were added to mutable class attributes in two files, ensuring they are treated as class-level attributes. This change resolves the RUF012 linting issues.
  • Remaining File: The update could not be applied to plugins/worksearch/schemes/editions.py due to a shared base class with the files mentioned in Task 1, which would introduce an overriding issue. Therefore, the change was not feasible for this file.
  • Type Safety: Added proper type hints for better clarity and type safety throughout the affected files.

Testing:
Ran ruff check --select RUF012 to confirm that no further warnings related to mutable class attributes remain.

Screenshot:
N/A
Stakeholders:
@RayBB

@ananyakaligal ananyakaligal changed the title Task 2 (RUF012) Fixed mutable class Defaults- Task 2 Jan 6, 2025
@RayBB RayBB added Affects: Developers Needs: Staff / Internal Reviewed a PR but don't have merge powers? Use this. labels Jan 7, 2025
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.

As far as I'm concerned this looks good.
However, I'm going to need to get a second opinion from staff

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