Bring back typing check. Meanwhile just for homeassistant/*.py (#14410)

* Bring back typing check. Meanwhile just for homeassistant/.py

* Change follow-imports to silent. Add a few more checks.
This commit is contained in:
Andrey authored and Paulus Schoutsen committed 2018-05-12 17:44:53 -04:00
1 parent 70af7e5fad
commit 7aec098a05
11 files changed
+41 -30

No files matched your search

+1 -1
View File
@@ -93,7 +93,7 @@ def get_component(hass, comp_or_platform) -> Optional[ModuleType]:
# This prevents that when only
# custom_components/switch/some_platform.py exists,
# the import custom_components.switch would succeed.
if module.__spec__.origin == 'namespace':
if module.__spec__ and module.__spec__.origin == 'namespace':
continue
_LOGGER.info("Loaded %s from %s", comp_or_platform, path)