mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Use Literal in a few more places (#3176)
This commit is contained in:
committed by
Jelle Zijlstra
parent
c579f91077
commit
628eee29f7
@@ -7,9 +7,13 @@ from typing import (
|
||||
Generic, TypeVar, AnyStr,
|
||||
overload,
|
||||
)
|
||||
from typing_extensions import Literal
|
||||
from types import TracebackType
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
from typing import Literal
|
||||
else:
|
||||
from typing_extensions import Literal
|
||||
|
||||
# We prefer to annotate inputs to methods (eg subprocess.check_call) with these
|
||||
# union types.
|
||||
# For outputs we use laborious literal based overloads to try to determine
|
||||
|
||||
Reference in New Issue
Block a user