Skip to content
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
13 changes: 12 additions & 1 deletion stdlib/2and3/xml/etree/ElementTree.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Stubs for xml.etree.ElementTree

from typing import Any, Callable, Dict, Generator, IO, ItemsView, Iterable, Iterator, KeysView, List, MutableSequence, Optional, Sequence, Text, Tuple, TypeVar, Union
from typing import Any, Callable, Dict, Generator, IO, ItemsView, Iterable, Iterator, KeysView, List, MutableSequence, Optional, overload, Sequence, Text, Tuple, TypeVar, Union
import io
import sys

Expand Down Expand Up @@ -70,6 +70,17 @@ class Element(MutableSequence['Element']):
def remove(self, subelement: 'Element') -> None: ...
def set(self, key: _str_argument_type, value: _str_argument_type) -> None: ...
def __bool__(self) -> bool: ...
def __delitem__(self, i: Union[int, slice]) -> None: ...
@overload
def __getitem__(self, i: int) -> 'Element': ...
@overload
def __getitem__(self, s: slice) -> Sequence['Element']: ...
def __len__(self) -> int: ...
@overload
def __setitem__(self, i: int, o: 'Element') -> None: ...
@overload
def __setitem__(self, s: slice, o: Iterable['Element']) -> None: ...


def SubElement(parent: Element, tag: _str_argument_type, attrib: Dict[_str_argument_type, _str_argument_type]=..., **extra: _str_argument_type) -> Element: ...
def Comment(text: _str_argument_type=...) -> Element: ...
Expand Down