Skip to content

ref(grouping): Small refactor of the GroupingComponent class #80723

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

Merged
merged 4 commits into from
Nov 14, 2024

Conversation

lobsterkatie
Copy link
Member

@lobsterkatie lobsterkatie commented Nov 14, 2024

This makes a few small changes to the GroupingComponent class, in preparation for the creation of a more detailed taxonomy of subclasses, which will happen in #80722.

  • Add class-level type declarations, with defaults.
  • Use the class name (rather than hardcoded GroupingComponent) in __repr__.
  • Add int to the values list type. (This is more of a bug fix, though it's also a necessary for the upcoming changes. In fact, values has always been able to contain ints, but the incoming data isn't super strictly typed, so typechecking has passed even with this missing.)
  • Simplify the way that values are set in __init__.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 14, 2024
@lobsterkatie lobsterkatie marked this pull request as ready for review November 14, 2024 18:29
@lobsterkatie lobsterkatie requested a review from a team as a code owner November 14, 2024 18:29
Base automatically changed from kmclb-remove-salt-wrappers-in-legacy-config to master November 14, 2024 22:02
@lobsterkatie lobsterkatie force-pushed the kmclb-prepare-grouping-component-for-subclassing branch from d353302 to 1d00bd0 Compare November 14, 2024 22:20
@lobsterkatie lobsterkatie merged commit 585cdde into master Nov 14, 2024
51 checks passed
@lobsterkatie lobsterkatie deleted the kmclb-prepare-grouping-component-for-subclassing branch November 14, 2024 23:25
@github-actions github-actions bot locked and limited conversation to collaborators Nov 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants