mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 14:01:55 +08:00
xml: stubtest fixes (#7890)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from typing import Any
|
||||
import sys
|
||||
|
||||
version: Any
|
||||
version: str
|
||||
|
||||
class ErrorHandler:
|
||||
def error(self, exception): ...
|
||||
@@ -30,17 +30,25 @@ class DTDHandler:
|
||||
class EntityResolver:
|
||||
def resolveEntity(self, publicId, systemId): ...
|
||||
|
||||
feature_namespaces: Any
|
||||
feature_namespace_prefixes: Any
|
||||
feature_string_interning: Any
|
||||
feature_validation: Any
|
||||
feature_external_ges: Any
|
||||
feature_external_pes: Any
|
||||
all_features: Any
|
||||
property_lexical_handler: Any
|
||||
property_declaration_handler: Any
|
||||
property_dom_node: Any
|
||||
property_xml_string: Any
|
||||
property_encoding: Any
|
||||
property_interning_dict: Any
|
||||
all_properties: Any
|
||||
feature_namespaces: str
|
||||
feature_namespace_prefixes: str
|
||||
feature_string_interning: str
|
||||
feature_validation: str
|
||||
feature_external_ges: str
|
||||
feature_external_pes: str
|
||||
all_features: list[str]
|
||||
property_lexical_handler: str
|
||||
property_declaration_handler: str
|
||||
property_dom_node: str
|
||||
property_xml_string: str
|
||||
property_encoding: str
|
||||
property_interning_dict: str
|
||||
all_properties: list[str]
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
class LexicalHandler:
|
||||
def comment(self, content: str) -> object: ...
|
||||
def startDTD(self, name: str, public_id: str | None, system_id: str | None) -> object: ...
|
||||
def endDTD(self) -> object: ...
|
||||
def startCDATA(self) -> object: ...
|
||||
def endCDATA(self) -> object: ...
|
||||
|
||||
Reference in New Issue
Block a user