mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
pyexpat: improve ParserCreate, mark positional-only args (#3676)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user