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,7 +1,7 @@
import pyexpat.errors as errors
import pyexpat.model as model
from _typeshed import SupportsRead
from typing import Any, Callable, Dict, List, Optional, Text, Tuple, Union
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
EXPAT_VERSION: str # undocumented
version_info: Tuple[int, int, int] # undocumented
@@ -22,12 +22,12 @@ XML_PARAM_ENTITY_PARSING_ALWAYS: int
_Model = Tuple[int, int, Optional[str], Tuple[Any, ...]]
class XMLParserType(object):
def Parse(self, __data: Union[Text, bytes], __isfinal: bool = ...) -> int: ...
def Parse(self, __data: Union[str, bytes], __isfinal: bool = ...) -> int: ...
def ParseFile(self, __file: SupportsRead[bytes]) -> int: ...
def SetBase(self, __base: Text) -> None: ...
def SetBase(self, __base: str) -> None: ...
def GetBase(self) -> Optional[str]: ...
def GetInputContext(self) -> Optional[bytes]: ...
def ExternalEntityParserCreate(self, __context: Optional[Text], __encoding: Text = ...) -> XMLParserType: ...
def ExternalEntityParserCreate(self, __context: Optional[str], __encoding: str = ...) -> XMLParserType: ...
def SetParamEntityParsing(self, __flag: int) -> int: ...
def UseForeignDTD(self, __flag: bool = ...) -> None: ...
buffer_size: int
@@ -75,5 +75,5 @@ def ErrorString(__code: int) -> str: ...
# intern is undocumented
def ParserCreate(
encoding: Optional[Text] = ..., namespace_separator: Optional[Text] = ..., intern: Optional[Dict[str, Any]] = ...
encoding: Optional[str] = ..., namespace_separator: Optional[str] = ..., intern: Optional[Dict[str, Any]] = ...
) -> XMLParserType: ...