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
17 changes: 13 additions & 4 deletions 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, overload, 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, overload
import io
import sys

Expand Down Expand Up @@ -53,8 +53,14 @@ class Element(MutableSequence[Element]):
def extend(self, elements: Iterable[Element]) -> None: ...
def find(self, path: _str_argument_type, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> Optional[Element]: ...
def findall(self, path: _str_argument_type, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> List[Element]: ...
def findtext(self, path: _str_argument_type, default: Optional[_T] = ..., namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> Union[_T, _str_result_type]: ...
def get(self, key: _str_argument_type, default: Optional[_T] = ...) -> Union[_str_result_type, _T]: ...
@overload
def findtext(self, path: _str_argument_type, *, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> Optional[_str_result_type]: ...
@overload
def findtext(self, path: _str_argument_type, default: _T, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> Union[_T, _str_result_type]: ...
@overload
def get(self, key: _str_argument_type) -> Optional[_str_result_type]: ...
@overload
def get(self, key: _str_argument_type, default: _T) -> Union[_str_result_type, _T]: ...
def getchildren(self) -> List[Element]: ...
def getiterator(self, tag: Optional[_str_argument_type] = ...) -> List[Element]: ...
if sys.version_info >= (3, 2):
Expand Down Expand Up @@ -102,7 +108,10 @@ class ElementTree:
def iter(self, tag: Optional[_str_argument_type] = ...) -> Generator[Element, None, None]: ...
def getiterator(self, tag: Optional[_str_argument_type] = ...) -> List[Element]: ...
def find(self, path: _str_argument_type, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> Optional[Element]: ...
def findtext(self, path: _str_argument_type, default: Optional[_T] = ..., namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> Union[_T, _str_result_type]: ...
@overload
def findtext(self, path: _str_argument_type, *, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> Optional[_str_result_type]: ...
@overload
def findtext(self, path: _str_argument_type, default: _T, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> Union[_T, _str_result_type]: ...
def findall(self, path: _str_argument_type, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> List[Element]: ...
def iterfind(self, path: _str_argument_type, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> List[Element]: ...
if sys.version_info >= (3, 4):
Expand Down