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, Text, TypeVar, Union
from typing import Any, TypeVar, Union
ucd_3_2_0: UCD
ucnhash_CAPI: Any
@@ -7,36 +7,36 @@ unidata_version: str
_T = TypeVar("_T")
def bidirectional(__chr: Text) -> Text: ...
def category(__chr: Text) -> Text: ...
def combining(__chr: Text) -> int: ...
def decimal(__chr: Text, __default: _T = ...) -> Union[int, _T]: ...
def decomposition(__chr: Text) -> Text: ...
def digit(__chr: Text, __default: _T = ...) -> Union[int, _T]: ...
def east_asian_width(__chr: Text) -> Text: ...
def bidirectional(__chr: str) -> str: ...
def category(__chr: str) -> str: ...
def combining(__chr: str) -> int: ...
def decimal(__chr: str, __default: _T = ...) -> Union[int, _T]: ...
def decomposition(__chr: str) -> str: ...
def digit(__chr: str, __default: _T = ...) -> Union[int, _T]: ...
def east_asian_width(__chr: str) -> str: ...
if sys.version_info >= (3, 8):
def is_normalized(__form: str, __unistr: str) -> bool: ...
def lookup(__name: Union[Text, bytes]) -> Text: ...
def mirrored(__chr: Text) -> int: ...
def name(__chr: Text, __default: _T = ...) -> Union[Text, _T]: ...
def normalize(__form: Text, __unistr: Text) -> Text: ...
def numeric(__chr: Text, __default: _T = ...) -> Union[float, _T]: ...
def lookup(__name: Union[str, bytes]) -> str: ...
def mirrored(__chr: str) -> int: ...
def name(__chr: str, __default: _T = ...) -> Union[str, _T]: ...
def normalize(__form: str, __unistr: str) -> str: ...
def numeric(__chr: str, __default: _T = ...) -> Union[float, _T]: ...
class UCD(object):
# The methods below are constructed from the same array in C
# (unicodedata_functions) and hence identical to the methods above.
unidata_version: str
def bidirectional(self, __chr: Text) -> str: ...
def category(self, __chr: Text) -> str: ...
def combining(self, __chr: Text) -> int: ...
def decimal(self, __chr: Text, __default: _T = ...) -> Union[int, _T]: ...
def decomposition(self, __chr: Text) -> str: ...
def digit(self, __chr: Text, __default: _T = ...) -> Union[int, _T]: ...
def east_asian_width(self, __chr: Text) -> str: ...
def lookup(self, __name: Union[Text, bytes]) -> Text: ...
def mirrored(self, __chr: Text) -> int: ...
def name(self, __chr: Text, __default: _T = ...) -> Union[Text, _T]: ...
def normalize(self, __form: Text, __unistr: Text) -> Text: ...
def numeric(self, __chr: Text, __default: _T = ...) -> Union[float, _T]: ...
def bidirectional(self, __chr: str) -> str: ...
def category(self, __chr: str) -> str: ...
def combining(self, __chr: str) -> int: ...
def decimal(self, __chr: str, __default: _T = ...) -> Union[int, _T]: ...
def decomposition(self, __chr: str) -> str: ...
def digit(self, __chr: str, __default: _T = ...) -> Union[int, _T]: ...
def east_asian_width(self, __chr: str) -> str: ...
def lookup(self, __name: Union[str, bytes]) -> str: ...
def mirrored(self, __chr: str) -> int: ...
def name(self, __chr: str, __default: _T = ...) -> Union[str, _T]: ...
def normalize(self, __form: str, __unistr: str) -> str: ...
def numeric(self, __chr: str, __default: _T = ...) -> Union[float, _T]: ...