Use typing.Literal without TYPE_CHECKING checks

Literal was added in Python 3.8 which we now require so can use it
freely.
This commit is contained in:
Ran Benita
2023-07-16 01:02:00 +03:00
parent 32f480814c
commit 04e0db7e48
13 changed files with 40 additions and 62 deletions
+1 -3
View File
@@ -25,14 +25,12 @@ from stat import S_ISREG
from typing import Any
from typing import Callable
from typing import cast
from typing import Literal
from typing import overload
from typing import TYPE_CHECKING
from . import error
if TYPE_CHECKING:
from typing import Literal
# Moved from local.py.
iswin32 = sys.platform == "win32" or (getattr(os, "_name", False) == "nt")