11import sys
22from _typeshed import Incomplete , Unused
33from collections .abc import MutableSequence , Sequence
4- from typing import Final , Literal , NoReturn
4+ from typing import Final , Literal , NoReturn , TypeAlias
55from typing_extensions import Self
6- from xml .dom .minidom import Document , Element , TypeAlias
6+ from xml .dom .minidom import Comment , Document , DOMImplementation , Element , ProcessingInstruction , Text
77from xml .sax import _SupportsReadClose
88from xml .sax .handler import ContentHandler
99from xml .sax .xmlreader import AttributesImpl , AttributesNSImpl , Locator , XMLReader
@@ -17,10 +17,19 @@ PROCESSING_INSTRUCTION: Final = "PROCESSING_INSTRUCTION"
1717IGNORABLE_WHITESPACE : Final = "IGNORABLE_WHITESPACE"
1818CHARACTERS : Final = "CHARACTERS"
1919
20- _NSName : TypeAlias = ...
21- _DocumentFactory : TypeAlias = ...
20+ _NSName : TypeAlias = tuple [ str | None , str ]
21+ _DocumentFactory : TypeAlias = DOMImplementation | None
2222
23- _Event : TypeAlias = ...
23+ _Event : TypeAlias = (
24+ tuple [Literal ["START_ELEMENT" ], Element ]
25+ | tuple [Literal ["END_ELEMENT" ], Element ]
26+ | tuple [Literal ["COMMENT" ], Comment ]
27+ | tuple [Literal ["START_DOCUMENT" ], Document ]
28+ | tuple [Literal ["END_DOCUMENT" ], Document ]
29+ | tuple [Literal ["PROCESSING_INSTRUCTION" ], ProcessingInstruction ]
30+ | tuple [Literal ["IGNORABLE_WHITESPACE" ], Text ]
31+ | tuple [Literal ["CHARACTERS" ], Text ]
32+ )
2433
2534class PullDOM (ContentHandler ):
2635 document : Document | None
0 commit comments