Use Literal in a few more places (#3176)

This commit is contained in:
Sebastian Rittau
2019-08-10 22:08:18 +02:00
committed by Jelle Zijlstra
parent c579f91077
commit 628eee29f7
6 changed files with 54 additions and 17 deletions

View File

@@ -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