Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Restore weird autofix
  • Loading branch information
srittau committed May 7, 2026
commit a434ea92f2c75feb69204279f58e15a1ae091a15
19 changes: 14 additions & 5 deletions stdlib/xml/dom/pulldom.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import sys
from _typeshed import Incomplete, Unused
from collections.abc import MutableSequence, Sequence
from typing import Final, Literal, NoReturn
from typing import Final, Literal, NoReturn, TypeAlias
from typing_extensions import Self
from xml.dom.minidom import Document, Element, TypeAlias
from xml.dom.minidom import Comment, Document, DOMImplementation, Element, ProcessingInstruction, Text
from xml.sax import _SupportsReadClose
from xml.sax.handler import ContentHandler
from xml.sax.xmlreader import AttributesImpl, AttributesNSImpl, Locator, XMLReader
Expand All @@ -17,10 +17,19 @@ PROCESSING_INSTRUCTION: Final = "PROCESSING_INSTRUCTION"
IGNORABLE_WHITESPACE: Final = "IGNORABLE_WHITESPACE"
CHARACTERS: Final = "CHARACTERS"

_NSName: TypeAlias = ...
_DocumentFactory: TypeAlias = ...
_NSName: TypeAlias = tuple[str | None, str]
_DocumentFactory: TypeAlias = DOMImplementation | None

_Event: TypeAlias = ...
_Event: TypeAlias = (
tuple[Literal["START_ELEMENT"], Element]
| tuple[Literal["END_ELEMENT"], Element]
| tuple[Literal["COMMENT"], Comment]
| tuple[Literal["START_DOCUMENT"], Document]
| tuple[Literal["END_DOCUMENT"], Document]
| tuple[Literal["PROCESSING_INSTRUCTION"], ProcessingInstruction]
| tuple[Literal["IGNORABLE_WHITESPACE"], Text]
| tuple[Literal["CHARACTERS"], Text]
)

class PullDOM(ContentHandler):
document: Document | None
Expand Down
Loading