mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 02:39:20 +00:00
Update _erg_type.py
This commit is contained in:
parent
cb66bcabaa
commit
828441f9f9
1 changed files with 7 additions and 1 deletions
|
@ -1,4 +1,10 @@
|
|||
from typing import Union
|
||||
try:
|
||||
from typing import Union
|
||||
except ImportError:
|
||||
import warnings
|
||||
warnings.warn("`typing.Union` is not available. Please use Python 3.8+.")
|
||||
class Union:
|
||||
pass
|
||||
|
||||
class UnionType:
|
||||
__origin__ = Union
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue