More typing (#15449)
## Description: More typing improvements. Switch to using `mypy.ini` for flexibility Add `warn_return_any` check except in `homeassistant.util.yaml` that does typing hacks. Fix some type annotations as resulting from this check and ignore others were fixing is hard. ## Checklist: - [x] The code change is tested and works locally. - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
This commit is contained in:
parent
ae581694ac
commit
e60f9ca392
8 changed files with 30 additions and 19 deletions
|
@ -67,7 +67,7 @@ def get_component(hass, comp_or_platform) -> Optional[ModuleType]:
|
|||
Async friendly.
|
||||
"""
|
||||
try:
|
||||
return hass.data[DATA_KEY][comp_or_platform]
|
||||
return hass.data[DATA_KEY][comp_or_platform] # type: ignore
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue