Make DispatchInfo c'tor accept components#201
Conversation
There was a problem hiding this comment.
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.
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.
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. |
There was a problem hiding this comment.
The docstring incorrectly refers to 'DispatchInfo' but this is the constructor for 'DispatchUpdate'. The class name should be corrected.
There was a problem hiding this comment.
Not really, the class name is DispatchInfo
There was a problem hiding this comment.
Updated the commit title though
llucax
left a comment
There was a problem hiding this comment.
Other than that, LGTM, feel free to force-merge afterwards.
| options: dict[str, Any], | ||
| _src: Dispatch, | ||
| ) -> None: | ||
| """Initialize the DispatchInfo. |
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.