pyexpat: improve ParserCreate, mark positional-only args (#3676)

This commit is contained in:
Shantanu
2020-01-29 02:11:56 -08:00
committed by GitHub
parent 119547b931
commit b3a9bfd5db

View File

@@ -25,14 +25,14 @@ XML_PARAM_ENTITY_PARSING_ALWAYS: int
_Model = Tuple[int, int, Optional[str], tuple]
class XMLParserType(object):
def Parse(self, data: Union[Text, bytes], isfinal: bool = ...) -> int: ...
def ParseFile(self, file: _Reader) -> int: ...
def SetBase(self, base: Text) -> None: ...
def Parse(self, __data: Union[Text, bytes], __isfinal: bool = ...) -> int: ...
def ParseFile(self, __file: _Reader) -> int: ...
def SetBase(self, __base: Text) -> None: ...
def GetBase(self) -> Optional[str]: ...
def GetInputContext(self) -> Optional[bytes]: ...
def ExternalEntityParserCreate(self, context: Optional[Text], encoding: Text = ...) -> XMLParserType: ...
def SetParamEntityParsing(self, flag: int) -> int: ...
def UseForeignDTD(self, flag: bool = ...) -> None: ...
def ExternalEntityParserCreate(self, __context: Optional[Text], __encoding: Text = ...) -> XMLParserType: ...
def SetParamEntityParsing(self, __flag: int) -> int: ...
def UseForeignDTD(self, __flag: bool = ...) -> None: ...
buffer_size: int
buffer_text: bool
buffer_used: int
@@ -71,5 +71,6 @@ class XMLParserType(object):
NotStandaloneHandler: Optional[Callable[[], int]]
ExternalEntityRefHandler: Optional[Callable[[str, Optional[str], Optional[str], Optional[str]], int]]
def ErrorString(errno: int) -> str: ...
def ParserCreate(encoding: Optional[Text] = ..., namespace_separator: Optional[Text] = ...) -> XMLParserType: ...
def ErrorString(__code: int) -> str: ...
# intern is undocumented
def ParserCreate(encoding: Optional[Text] = ..., namespace_separator: Optional[Text] = ..., intern: Optional[Dict[str, Any]] = ...) -> XMLParserType: ...