From b4d5d9f87d5df7fe002c6ccc060b1282fe561773 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Mon, 13 Jun 2022 23:22:01 +0100 Subject: [PATCH] Use the `Any` trick for `xml.etree.ElementTree.getroot()` Closes #7770 --- stdlib/xml/etree/ElementTree.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/xml/etree/ElementTree.pyi b/stdlib/xml/etree/ElementTree.pyi index 1d4e9a3c5392..85e1eaaa7742 100644 --- a/stdlib/xml/etree/ElementTree.pyi +++ b/stdlib/xml/etree/ElementTree.pyi @@ -145,7 +145,7 @@ class QName: class ElementTree: def __init__(self, element: Element | None = ..., file: _FileRead | None = ...) -> None: ... - def getroot(self) -> Element: ... + def getroot(self) -> Element | Any: ... def parse(self, source: _FileRead, parser: XMLParser | None = ...) -> Element: ... def iter(self, tag: str | None = ...) -> Generator[Element, None, None]: ... if sys.version_info < (3, 9):