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:
1 parent
ae581694ac
commit
e60f9ca392
8 files changed
+30
-19
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user