mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 17:57:55 +00:00
Set MQTT quality scale to platinum (#135612)
* Set MQTT quality scale to platinum * Add test for type stub
This commit is contained in:
parent
f0257fec88
commit
1421f4c124
@ -7,7 +7,7 @@
|
|||||||
"dependencies": ["file_upload", "http"],
|
"dependencies": ["file_upload", "http"],
|
||||||
"documentation": "https://www.home-assistant.io/integrations/mqtt",
|
"documentation": "https://www.home-assistant.io/integrations/mqtt",
|
||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
"quality_scale": "gold",
|
"quality_scale": "platinum",
|
||||||
"requirements": ["paho-mqtt==1.6.1"],
|
"requirements": ["paho-mqtt==1.6.1"],
|
||||||
"single_config_entry": true
|
"single_config_entry": true
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,7 @@ rules:
|
|||||||
comment: |
|
comment: |
|
||||||
This integration does not use web sessions.
|
This integration does not use web sessions.
|
||||||
strict-typing:
|
strict-typing:
|
||||||
status: todo
|
status: done
|
||||||
comment: |
|
comment: >
|
||||||
Requirement 'paho-mqtt==1.6.1' appears untyped
|
Typing for 'paho-mqtt==1.6.1' supported via 'types-paho-mqtt==1.6.0.20240321'
|
||||||
|
(requirements_test.txt).
|
||||||
|
@ -43,6 +43,10 @@ def _check_requirements_are_typed(integration: Integration) -> list[str]:
|
|||||||
|
|
||||||
if not any(file for file in distribution.files if file.name == "py.typed"):
|
if not any(file for file in distribution.files if file.name == "py.typed"):
|
||||||
# no py.typed file
|
# no py.typed file
|
||||||
|
try:
|
||||||
|
metadata.distribution(f"types-{requirement_name}")
|
||||||
|
except metadata.PackageNotFoundError:
|
||||||
|
# also no stubs-only package
|
||||||
invalid_requirements.append(requirement)
|
invalid_requirements.append(requirement)
|
||||||
|
|
||||||
return invalid_requirements
|
return invalid_requirements
|
||||||
|
Loading…
x
Reference in New Issue
Block a user