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,5 +1,5 @@
import sys
from typing import Any, Optional, Text, Tuple
from typing import Any, Optional, Tuple
# Because UUID has properties called int and bytes we need to rename these temporarily.
_Int = int
@@ -17,7 +17,7 @@ class UUID:
if sys.version_info >= (3, 7):
def __init__(
self,
hex: Optional[Text] = ...,
hex: Optional[str] = ...,
bytes: Optional[_Bytes] = ...,
bytes_le: Optional[_Bytes] = ...,
fields: Optional[_FieldsType] = ...,
@@ -31,7 +31,7 @@ class UUID:
else:
def __init__(
self,
hex: Optional[Text] = ...,
hex: Optional[str] = ...,
bytes: Optional[_Bytes] = ...,
bytes_le: Optional[_Bytes] = ...,
fields: Optional[_FieldsType] = ...,