Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change return type of XMLPullParser.read_events() #8076

Merged
merged 2 commits into from
Jun 14, 2022
Merged
Changes from all commits
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
4 changes: 3 additions & 1 deletion stdlib/xml/etree/ElementTree.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ class XMLPullParser:
def __init__(self, events: Sequence[str] | None = ..., *, _parser: XMLParser | None = ...) -> None: ...
def feed(self, data: str | bytes) -> None: ...
def close(self) -> None: ...
def read_events(self) -> Iterator[tuple[str, Element]]: ...
# Second element in the tuple could be `Element`, `tuple[str, str]` or `None`.
# Use `Any` to avoid false-positive errors.
def read_events(self) -> Iterator[tuple[str, Any]]: ...
Prometheus3375 marked this conversation as resolved.
Show resolved Hide resolved

def XML(text: str | bytes, parser: XMLParser | None = ...) -> Element: ...
def XMLID(text: str | bytes, parser: XMLParser | None = ...) -> tuple[Element, dict[str, Element]]: ...
Expand Down