Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion stubs/six/six/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ unichr = chr

def int2byte(i: int) -> bytes: ...

# Should be `byte2int: operator.itemgetter[int]`. But a bug in mypy prevents using TypeVar in itemgetter__call__
# This overload is temporary until typecheckers update their shipped version of typeshed
@overload
def byte2int(obj: bytes) -> int: ...

# Should be `byte2int: operator.itemgetter[int]`. But a bug in mypy prevents using TypeVar in itemgetter.__call__
@overload
def byte2int(obj: SupportsGetItem[int, _T]) -> _T: ...

indexbytes = operator.getitem
Expand Down