Skip to content

fix some type hints - #3866

Merged
benderl merged 1 commit into
openWB:feature_consumerfrom
benderl:fixes-feature-consumer
Aug 28, 2026
Merged

fix some type hints#3866
benderl merged 1 commit into
openWB:feature_consumerfrom
benderl:fixes-feature-consumer

Conversation

@benderl

@benderl benderl commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@benderl
benderl requested review from LKuemmel and a lite review from Copilot August 27, 2026 10:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 corrects several Python type hints to better reflect actual runtime behavior in the MQTT consumer module and shared component state models.

Changes:

  • Update the MQTT consumer update() callback annotation to return ConsumerState (matching what it actually returns and what ConfigurableConsumer expects).
  • Mark the MQTT consumer config configuration parameter as Optional[...] since it defaults to None.
  • Fix IoState constructor annotations to use Optional[Dict[...]] for parameters that default to None.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/modules/consumers/generic/mqtt/consumer.py Adjusts update() return type to ConsumerState to match the constructed return value.
packages/modules/consumers/generic/mqtt/config.py Makes configuration explicitly optional when defaulting to None.
packages/modules/common/component_state.py Corrects IoState parameter annotations to reflect nullable dict inputs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@benderl
benderl merged commit ec21410 into openWB:feature_consumer Aug 28, 2026
1 check passed
LKuemmel pushed a commit that referenced this pull request Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants