mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-10 13:32:26 +08:00
Improve accuracy of six byte index methods (#9117)
This commit is contained in:
@@ -67,8 +67,11 @@ class mmap(Iterable[int], Sized):
|
||||
def __setitem__(self, __index: int, __object: int) -> None: ...
|
||||
@overload
|
||||
def __setitem__(self, __index: slice, __object: ReadableBuffer) -> None: ...
|
||||
# Doesn't actually exist, but the object is actually iterable because it has __getitem__ and
|
||||
# __len__, so we claim that there is also an __iter__ to help type checkers.
|
||||
# Doesn't actually exist, but the object actually supports "in" because it has __getitem__,
|
||||
# so we claim that there is also a __contains__ to help type checkers.
|
||||
def __contains__(self, __o: object) -> bool: ...
|
||||
# Doesn't actually exist, but the object is actually iterable because it has __getitem__ and __len__,
|
||||
# so we claim that there is also an __iter__ to help type checkers.
|
||||
def __iter__(self) -> Iterator[int]: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, *args: object) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user