[xml.etree] Add _setroot method to xml.etree.ElementTree.ElementTree (#15078)

This commit is contained in:
Guo Ci
2025-11-24 17:15:26 -05:00
committed by GitHub
parent c10e3685c4
commit aa70a2fe18
+1
View File
@@ -157,6 +157,7 @@ _Root = TypeVar("_Root", Element, Element | None, default=Element | None)
class ElementTree(Generic[_Root]):
def __init__(self, element: Element[Any] | None = None, file: _FileRead | None = None) -> None: ...
def getroot(self) -> _Root: ...
def _setroot(self, element: Element[Any]) -> None: ...
def parse(self, source: _FileRead, parser: XMLParser | None = None) -> Element: ...
def iter(self, tag: str | None = None) -> Generator[Element, None, None]: ...
def find(self, path: str, namespaces: dict[str, str] | None = None) -> Element | None: ...