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
Add types package for paho-mqtt #83599
Conversation
Hey there @emontnemery, @jbouwh, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
@@ -39,6 +39,7 @@ types-chardet==0.1.5 | |||
types-decorator==0.1.7 | |||
types-enum34==0.1.8 | |||
types-ipaddress==0.1.5 | |||
types-paho-mqtt==1.6.0.1 |
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.
Are these new type stubs issed via the existing imports?
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.
Are these new type stubs issed via the existing imports?
Yes. Previously mypy would have just ignore / set to Any
any imports from paho.mqtt
. It will use the stubs now instead. https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-library-stubs-or-py-typed-marker
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.
Nice work,
Thanx @cdce8p !
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.
Looks good!
Proposed change
Stubs for
paho-mqtt
have recently been added to typeshed and released with thetypes-paho-mqtt
package.Add it to our test requirements to improve type checking.
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: