xml: stubtest fixes (#7890)

This commit is contained in:
Jelle Zijlstra
2022-05-20 04:03:45 -07:00
committed by GitHub
parent 611fa18b5c
commit e7cbde0928
9 changed files with 41 additions and 46 deletions

View File

@@ -33,6 +33,8 @@ class XMLParserType:
def ExternalEntityParserCreate(self, __context: str | None, __encoding: str = ...) -> XMLParserType: ...
def SetParamEntityParsing(self, __flag: int) -> int: ...
def UseForeignDTD(self, __flag: bool = ...) -> None: ...
@property
def intern(self) -> dict[str, str]: ...
buffer_size: int
buffer_text: bool
buffer_used: int
@@ -69,6 +71,7 @@ class XMLParserType:
DefaultHandlerExpand: Callable[[str], Any] | None
NotStandaloneHandler: Callable[[], int] | None
ExternalEntityRefHandler: Callable[[str, str | None, str | None, str | None], int] | None
SkippedEntityHandler: Callable[[str, bool], Any] | None
def ErrorString(__code: int) -> str: ...

View File

@@ -1,3 +1,5 @@
import sys
codes: dict[str, int]
messages: dict[int, str]
@@ -38,3 +40,10 @@ XML_ERROR_UNDEFINED_ENTITY: str
XML_ERROR_UNEXPECTED_STATE: str
XML_ERROR_UNKNOWN_ENCODING: str
XML_ERROR_XML_DECL: str
if sys.version_info >= (3, 11):
XML_ERROR_RESERVED_PREFIX_XML: str
XML_ERROR_RESERVED_PREFIX_XMLNS: str
XML_ERROR_RESERVED_NAMESPACE_URI: str
XML_ERROR_INVALID_ARGUMENT: str
XML_ERROR_NO_BUFFER: str
XML_ERROR_AMPLIFICATION_LIMIT_BREACH: str