mirror of
https://github.com/malmeloo/FindMy.py.git
synced 2026-04-27 19:25:43 +02:00
fix: Union type alias in Python 3.9
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
"""Utility types."""
|
||||
|
||||
from typing import Coroutine, TypeVar
|
||||
from typing import Coroutine, TypeVar, Union
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
MaybeCoro = T | Coroutine[None, None, T]
|
||||
# Cannot use `|` operator (PEP 604) in python 3.9,
|
||||
# even with __future__ import since it is evaluated directly
|
||||
MaybeCoro = Union[T, Coroutine[None, None, T]]
|
||||
|
||||
Reference in New Issue
Block a user