Strict type hints for MQTT integration (#82317)

* Strict type hints for MQTT integration

* Fix errors

* Additional corrections

* Use cv.template to avoid untyped calls

* Enable strict typing policy for MQTT integration

* Use ignore[no-untyped-call]

* Use # type: ignore[unreachable]

* Correct cast

* Refactor getting discovery_payload

* Remove unused type ignore comments
This commit is contained in:
Jan Bouwhuis
2022-11-24 08:25:44 +01:00
committed by GitHub
parent 697b5db3f2
commit 8a8732f0bc
10 changed files with 87 additions and 53 deletions

View File

@@ -1623,6 +1623,16 @@ disallow_untyped_defs = true
warn_return_any = true
warn_unreachable = true
[mypy-homeassistant.components.mqtt.*]
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
warn_return_any = true
warn_unreachable = true
[mypy-homeassistant.components.mysensors.*]
check_untyped_defs = true
disallow_incomplete_defs = true