Skip to content

Commit 534a292

Browse files
committed
fix(storage): fixed type alias for Python 3.9
Python 3.9 does not support type aliases with union type x | y, so we must use Union[]
1 parent 34dd172 commit 534a292

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

hydrogram/storage/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222
import base64
2323
import struct
2424
from abc import ABC, abstractmethod
25+
from typing import Union
2526

2627
from hydrogram import raw
2728

28-
InputPeer = raw.types.InputPeerUser | raw.types.InputPeerChat | raw.types.InputPeerChannel
29+
InputPeer = Union[raw.types.InputPeerUser, raw.types.InputPeerChat, raw.types.InputPeerChannel]
2930

3031

3132
class BaseStorage(ABC):

0 commit comments

Comments
 (0)