mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
itemgetter parameters can be any type that the container accepts, not just int (#564)
This commit is contained in:
committed by
Matthias Kramm
parent
bbf0ac2d1f
commit
bda2b54dfc
@@ -161,9 +161,9 @@ def attrgetter(attr: str) -> Callable[[Any], Any]: ...
|
||||
def attrgetter(*attrs: str) -> Callable[[Any], Tuple[Any, ...]]: ...
|
||||
|
||||
@overload
|
||||
def itemgetter(item: int) -> Callable[[Any], Any]: ...
|
||||
def itemgetter(item: Any) -> Callable[[Any], Any]: ...
|
||||
@overload
|
||||
def itemgetter(*items: int) -> Callable[[Any], Tuple[Any, ...]]: ...
|
||||
def itemgetter(*items: Any) -> Callable[[Any], Tuple[Any, ...]]: ...
|
||||
|
||||
def methodcaller(name: str, *args: Any, **kwargs: Any) -> Callable[..., Any]: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user