mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-22 17:48:30 +08:00
Replace 'Text' with 'str' in py3 stdlib (#5466)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user