-
Notifications
You must be signed in to change notification settings - Fork 6
Make DispatchInfo c'tor accept components
#201
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 adds backwards compatibility support for the DispatchUpdate constructor by accepting a deprecated components parameter alongside the new target parameter. The change ensures existing code using the old parameter name continues to work while providing a deprecation warning to encourage migration.
- Added custom
__init__method toDispatchUpdateclass - Implemented parameter validation and deprecation warning for
componentsparameter - Maintained backwards compatibility while encouraging migration to
targetparameter
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| options: dict[str, Any], | ||
| _src: Dispatch, | ||
| ) -> None: | ||
| """Initialize the DispatchInfo. |
Copilot
AI
Oct 1, 2025
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.
The docstring incorrectly refers to 'DispatchInfo' but this is the constructor for 'DispatchUpdate'. The class name should be corrected.
Copilot uses AI. Check for mistakes.
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.
This.
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.
Not really, the class name is DispatchInfo
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.
Updated the commit title though
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.
Other than that, LGTM, feel free to force-merge afterwards.
| options: dict[str, Any], | ||
| _src: Dispatch, | ||
| ) -> None: | ||
| """Initialize the DispatchInfo. |
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.
This.
DispatchUpdate c'tor accept componentsDispatchInfo c'tor accept components
To stay backwards compatible. Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
To stay backwards compatible.