-
Couldn't load subscription status.
- Fork 6
Refactor: Make helper function free & more modular #163
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the component-target extraction logic by moving it from a private class method into a standalone helper function and updates the actor start path to use the new helper.
- Removed
_get_target_components_from_dispatchmethod - Added module-level
_convert_target_componentsfunction - Updated
_start_actorto call_convert_target_components
Comments suppressed due to low confidence (2)
src/frequenz/dispatch/_actor_dispatcher.py:331
- Add a docstring for
_convert_target_componentsexplaining its purpose, parameters, and return values to improve readability and maintainability.
def _convert_target_components(target: ClientTargetComponents) -> TargetComponents:
src/frequenz/dispatch/_actor_dispatcher.py:331
- Introduce unit tests for
_convert_target_componentsto verify correct behavior whentargetcontains integer IDs versusComponentCategoryvalues.
def _convert_target_components(target: ClientTargetComponents) -> TargetComponents:
Signed-off-by: Mathias L. Baumann <[email protected]>
|
Oh, I reviewed this in #155, maybe mark PRs that depend on other PRs as draft? |
|
I guess in this PR you didn't update the client and you can't use the new match-friendly target classes? |
I wanted to mark it as draft, but couldn't find the button/function anymore in the UI... |
Yeah, doing the BaseId update is a whole different thing again |
You overestimate me... |
No description provided.