Skip to content

Commit 8b62522

Browse files
committed
Fix: usage of typing:Literal on sm_typing is added for obsolete Python.
Signed-off-by: Arnaud Garcia-Fernandez <arnaud.garcia-fernandez@vates.tech>
1 parent f31152e commit 8b62522

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sm_typing/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ def override(method): # type: ignore
1919

2020
if not hasattr(typing, 'Final'):
2121
Final = None # type: ignore
22+
23+
if not hasattr(typing, "Literal"):
24+
from typing_extensions import Literal # noqa: F401, UP035

0 commit comments

Comments
 (0)