[PR] #299 from jelly: Make typing-extensions optional

Make typing_extensions only required for 3.7
This commit is contained in:
Azalea 2024-05-26 19:40:13 +08:00 committed by GitHub
commit fc98d61109
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -1,4 +1,7 @@
from typing_extensions import Literal
try:
from typing import Literal
except ImportError:
from typing_extensions import Literal
AnsiMode = Literal['default', 'ansi', '8bit', 'rgb']
LightDark = Literal['light', 'dark']

View file

@ -38,7 +38,7 @@ setup(
include_package_data=True,
install_requires=[
# Universal dependencies
'setuptools', 'typing_extensions',
'setuptools', 'typing_extensions; python_version < "3.8"',
# Windows dependencies
'psutil ; platform_system=="Windows"',