Added str type to modifying methods on PageElement (#5929)

Co-authored-by: Hackrrr <Hackrrr@users.noreply.github.com>
This commit is contained in:
Hackrrr
2021-08-15 17:15:34 +02:00
committed by GitHub
parent 5f2e117bba
commit 3ce5502675

View File

@@ -50,18 +50,18 @@ class PageElement:
def formatter_for_name(self, formatter: Formatter | str | _EntitySubstitution): ...
nextSibling: PageElement | None
previousSibling: PageElement | None
def replace_with(self: Self, replace_with: PageElement) -> Self: ...
def replaceWith(self: Self, replace_with: PageElement) -> Self: ...
def replace_with(self: Self, replace_with: PageElement | str) -> Self: ...
replaceWith = replace_with
def unwrap(self: Self) -> Self: ...
replace_with_children = unwrap
replaceWithChildren = unwrap
def wrap(self, wrap_inside: _PageElementT) -> _PageElementT: ...
def extract(self: Self, _self_index: int | None = ...) -> Self: ...
def insert(self, position: int, new_child: PageElement) -> None: ...
def append(self, tag: PageElement) -> None: ...
def extend(self, tags: Iterable[PageElement]) -> None: ...
def insert_before(self, *args: PageElement) -> None: ...
def insert_after(self, *args: PageElement) -> None: ...
def insert(self, position: int, new_child: PageElement | str) -> None: ...
def append(self, tag: PageElement | str) -> None: ...
def extend(self, tags: Iterable[PageElement | str]) -> None: ...
def insert_before(self, *args: PageElement | str) -> None: ...
def insert_after(self, *args: PageElement | str) -> None: ...
def find_next(
self,
name: _Strainable | SoupStrainer | None = ...,