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:
1 parent
70af7e5fad
commit
7aec098a05
11 files changed
+41
-30
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user