Optional and Union simplifications (#25365)
This commit is contained in:
1 parent
5e29d4d098
commit
17d754dbbf
3 files changed
+4
-4
No files matched your search
@@ -236,7 +236,7 @@ async def async_get_integration(hass: 'HomeAssistant', domain: str)\
|
||||
cache = hass.data[DATA_INTEGRATIONS] = {}
|
||||
|
||||
int_or_evt = cache.get(
|
||||
domain, _UNDEF) # type: Optional[Union[Integration, asyncio.Event]]
|
||||
domain, _UNDEF) # type: Union[Integration, asyncio.Event, None]
|
||||
|
||||
if isinstance(int_or_evt, asyncio.Event):
|
||||
await int_or_evt.wait()
|
||||
|
||||
Reference in new issue
Block a user