Skip to content
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

Fix paho-mqtt typing errors #8878

Merged
merged 7 commits into from
Oct 14, 2022
Merged

Conversation

JonathanPlasse
Copy link
Contributor

Hi,
I replaced TypeVar with Union because an attribute should not have a type unbound.
And fixed minor type inconsistencies.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@AlexWaygood AlexWaygood reopened this Oct 11, 2022
@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

core (https://github.com/home-assistant/core)
- homeassistant/components/mqtt/client.py:376: error: Incompatible types in assignment (expression has type "Callable[[Any, Any, Any, int], None]", variable has type "Optional[_OnConnect]")  [assignment]
- homeassistant/components/mqtt/client.py:377: error: Incompatible types in assignment (expression has type "Callable[[Any, Any, int], None]", variable has type "_OnDisconnect")  [assignment]
- homeassistant/components/mqtt/client.py:380: error: Incompatible types in assignment (expression has type "Callable[[Any, Any, Any, Any], None]", variable has type "Optional[_OnSubscribe]")  [assignment]
- homeassistant/components/mqtt/client.py:381: error: Incompatible types in assignment (expression has type "Callable[[Any, Any, Any, Any], None]", variable has type "Optional[_OnUnsubscribe]")  [assignment]
- homeassistant/components/mqtt/config_flow.py:430: error: Incompatible types in assignment (expression has type "Callable[[Any, Any, Any, Any], Any]", variable has type "Optional[_OnConnect]")  [assignment]

@JonathanPlasse
Copy link
Contributor Author

I finished fixing the typing errors.

@JelleZijlstra JelleZijlstra merged commit f9ed090 into python:master Oct 14, 2022
@JonathanPlasse
Copy link
Contributor Author

Is it normal that the new version has not been published on PyPI?

@srittau
Copy link
Collaborator

srittau commented Oct 14, 2022

Yes, the stubs are updated a few times a day. It might take a few hours.

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.

4 participants