Replace 'Text' with 'str' in py3 stdlib (#5466)

This commit is contained in:
Sebastian Rittau
2021-05-16 16:10:48 +02:00
committed by GitHub
parent dbe77b6ae9
commit 6a9c89e928
49 changed files with 328 additions and 349 deletions

View File

@@ -1,11 +1,11 @@
from tkinter import Canvas, PhotoImage
from typing import Any, Callable, Dict, List, Optional, Sequence, Text, Tuple, TypeVar, Union, overload
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, TypeVar, Union, overload
# Note: '_Color' is the alias we use for arguments and _AnyColor is the
# alias we use for return types. Really, these two aliases should be the
# same, but as per the "no union returns" typeshed policy, we'll return
# Any instead.
_Color = Union[Text, Tuple[float, float, float]]
_Color = Union[str, Tuple[float, float, float]]
_AnyColor = Any
# TODO: Replace this with a TypedDict once it becomes standardized.