diff --git a/lxml-stubs/html/_element.pyi b/lxml-stubs/html/_element.pyi index ee87cf9..3697d76 100644 --- a/lxml-stubs/html/_element.pyi +++ b/lxml-stubs/html/_element.pyi @@ -14,9 +14,13 @@ from .._types import ( _AttrName, _AttrVal, _ElemPathArg, + _NonDefaultNSMapArg, _NSMapArg, _TagName, _TagSelector, + _XPathExtFuncArg, + _XPathObject, + _XPathVarArg, ) from ..cssselect import _CSSTransArg from ._form import FormElement, LabelElement @@ -195,12 +199,36 @@ class HtmlElement(etree.ElementBase): def find( self, path: _ElemPathArg, namespaces: _NSMapArg | None = None ) -> HtmlElement | None: ... + @overload + def findtext( + self, + path: _ElemPathArg, + *, + namespaces: _NSMapArg | None = None, + ) -> str | None: ... + @overload + def findtext( + self, + path: _ElemPathArg, + default: _T, + namespaces: _NSMapArg | None = None, + ) -> str | _T: ... def findall( self, path: _ElemPathArg, namespaces: _NSMapArg | None = None ) -> list[HtmlElement]: ... def iterfind( self, path: _ElemPathArg, namespaces: _NSMapArg | None = None ) -> Iterator[HtmlElement]: ... + def xpath( + self, + _path: _AnyStr, + /, + *, + namespaces: _NonDefaultNSMapArg | None = None, + extensions: _XPathExtFuncArg | None = None, + smart_strings: bool = True, + **_variables: _XPathVarArg + ) -> _XPathObject: ... def cssselect( self, expr: str,