Update comments for operator.itemgetter.__call__ generic following mypy 1.11 fix (#13489)

This commit is contained in:
Avasam
2025-10-08 10:51:14 +02:00
committed by GitHub
parent 751525bc74
commit cffeff0b61
4 changed files with 44 additions and 4 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ six.get_method_self
six.viewitems
six.viewkeys
six.viewvalues
# Should be `operator.itemgetter[int]`. But a bug in mypy prevents using TypeVar in itemgetter__call__
# Should be `byte2int: operator.itemgetter[int]`. But `itemgetter.__call__` returns `Any`
six.byte2int
# Utils
+1 -1
View File
@@ -61,7 +61,7 @@ unichr = chr
def int2byte(i: int) -> bytes: ...
# Should be `byte2int: operator.itemgetter[int]`. But a bug in mypy prevents using TypeVar in itemgetter.__call__
# Should be `byte2int: operator.itemgetter[int]`. But `itemgetter.__call__` returns `Any`
def byte2int(obj: SupportsGetItem[int, _T]) -> _T: ...
indexbytes = operator.getitem