Skip to content

Commit

Permalink
etree._Element.__setitem__() (GH-96)
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c authored Jan 2, 2024
1 parent f0290b5 commit 0684a00
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lxml-stubs/etree.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ from typing import (
overload,
)

from typing_extensions import Literal, Protocol, TypeAlias, TypeGuard
from typing_extensions import Literal, Protocol, SupportsIndex, TypeAlias, TypeGuard

# dummy for missing stubs
def __getattr__(name: str) -> Any: ...
Expand Down Expand Up @@ -125,6 +125,10 @@ class DocInfo:
class _Element(Iterable["_Element"], Sized):
def __delitem__(self, key: Union[int, slice]) -> None: ...
def __getitem__(self, item: int) -> _Element: ...
@overload
def __setitem__(self, __key: SupportsIndex, value: _Element) -> None: ...
@overload
def __setitem__(self, __key: slice, value: Iterable[_Element]) -> None: ...
def __iter__(self) -> ElementChildIterator: ...
def __len__(self) -> int: ...
def addprevious(self, element: "_Element") -> None: ...
Expand Down

0 comments on commit 0684a00

Please sign in to comment.