mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 04:50:05 +00:00
Migrate legacy typehints in core to PEP-526 (#26403)
* Migrate legacy typehints in core to PEP-526 * Fix one type
This commit is contained in:
committed by
Paulus Schoutsen
parent
2dc90be94f
commit
2f0eb07624
@@ -1,9 +1,9 @@
|
||||
"""Helper for aiohttp webclient stuff."""
|
||||
import asyncio
|
||||
import sys
|
||||
from ssl import SSLContext # noqa: F401
|
||||
from ssl import SSLContext
|
||||
from typing import Any, Awaitable, Optional, cast
|
||||
from typing import Union # noqa: F401
|
||||
from typing import Union
|
||||
|
||||
import aiohttp
|
||||
from aiohttp.hdrs import USER_AGENT, CONTENT_TYPE
|
||||
@@ -171,7 +171,7 @@ def _async_get_connector(
|
||||
return cast(aiohttp.BaseConnector, hass.data[key])
|
||||
|
||||
if verify_ssl:
|
||||
ssl_context = ssl_util.client_context() # type: Union[bool, SSLContext]
|
||||
ssl_context: Union[bool, SSLContext] = ssl_util.client_context()
|
||||
else:
|
||||
ssl_context = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user