mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
Fix issue with Callable, Union, and Python 3.9 [mqtt] (#83547)
This commit is contained in:
parent
b2edf9b598
commit
25feac1bc4
@ -1,8 +1,11 @@
|
|||||||
"""Support for MQTT message handling."""
|
"""Support for MQTT message handling."""
|
||||||
|
# pylint: disable=deprecated-typing-alias
|
||||||
|
# In Python 3.9.0 and 3.9.1 collections.abc.Callable
|
||||||
|
# can't be used inside typing.Union or typing.Optional
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
from collections.abc import Callable, Coroutine, Iterable
|
from collections.abc import Coroutine, Iterable
|
||||||
from functools import lru_cache, partial, wraps
|
from functools import lru_cache, partial, wraps
|
||||||
import inspect
|
import inspect
|
||||||
from itertools import groupby
|
from itertools import groupby
|
||||||
@ -10,7 +13,7 @@ import logging
|
|||||||
from operator import attrgetter
|
from operator import attrgetter
|
||||||
import ssl
|
import ssl
|
||||||
import time
|
import time
|
||||||
from typing import TYPE_CHECKING, Any, Union, cast
|
from typing import TYPE_CHECKING, Any, Callable, Union, cast
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import attr
|
import attr
|
||||||
|
Loading…
x
Reference in New Issue
Block a user