diff --git a/lxml-stubs/etree.pyi b/lxml-stubs/etree.pyi index 6797994..90a985c 100644 --- a/lxml-stubs/etree.pyi +++ b/lxml-stubs/etree.pyi @@ -322,7 +322,10 @@ class _Attrib: def __getitem__(self, key: _AnyStr) -> _AnyStr: ... def __bool__(self) -> bool: ... def __len__(self) -> int: ... - def get(self, key: _AnyStr, default: _AnyStr = ...) -> Optional[_AnyStr]: ... + @overload + def get(self, key: _TagName) -> Optional[str]: ... + @overload + def get(self, key: _TagName, default: _T) -> Union[str, _T]: ... def keys(self) -> _ListAnyStr: ... def __iter__(self) -> Iterator[_AnyStr]: ... # actually _AttribIterator def iterkeys(self) -> Iterator[_AnyStr]: ...