Skip to content

Commit

Permalink
Declare _Attrib keys and values as exactly str, not _AnyStr (GH-99)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo authored Jan 27, 2024
1 parent d6e2e3d commit fc54574
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lxml-stubs/etree.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -312,27 +312,27 @@ class _Attrib:
],
) -> None: ...
@overload
def pop(self, key: _AnyStr) -> _AnyStr: ...
def pop(self, key: _AnyStr) -> str: ...
@overload
def pop(self, key: _AnyStr, default: _AnyStr) -> _AnyStr: ...
def pop(self, key: _AnyStr, default: _T) -> Union[str, _T]: ...
def clear(self) -> None: ...
def __repr__(self) -> str: ...
def __copy__(self) -> _DictAnyStr: ...
def __deepcopy__(self, memo: Dict[Any, Any]) -> _DictAnyStr: ...
def __getitem__(self, key: _AnyStr) -> _AnyStr: ...
def __getitem__(self, key: _AnyStr) -> str: ...
def __bool__(self) -> bool: ...
def __len__(self) -> int: ...
@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]: ...
def values(self) -> _ListAnyStr: ...
def itervalues(self) -> Iterator[_AnyStr]: ...
def items(self) -> List[Tuple[_AnyStr, _AnyStr]]: ...
def iteritems(self) -> Iterator[Tuple[_AnyStr, _AnyStr]]: ...
def keys(self) -> List[str]: ...
def __iter__(self) -> Iterator[str]: ... # actually _AttribIterator
def iterkeys(self) -> Iterator[str]: ...
def values(self) -> List[str]: ...
def itervalues(self) -> Iterator[str]: ...
def items(self) -> List[Tuple[str, str]]: ...
def iteritems(self) -> Iterator[Tuple[str, str]]: ...
def has_key(self, key: _AnyStr) -> bool: ...
def __contains__(self, key: _AnyStr) -> bool: ...
def __richcmp__(self, other: _Attrib, op: int) -> bool: ...
Expand Down

0 comments on commit fc54574

Please sign in to comment.