mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Use _typeshed.Self in Python 2, too (#6932)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# True and False are deliberately omitted because they are keywords in
|
||||
# Python 3, and stub files conform to Python 3 syntax.
|
||||
|
||||
from _typeshed import ReadableBuffer, SupportsKeysAndGetItem, SupportsWrite
|
||||
from _typeshed import ReadableBuffer, Self, SupportsKeysAndGetItem, SupportsWrite
|
||||
from abc import ABCMeta
|
||||
from ast import mod
|
||||
from types import CodeType
|
||||
@@ -651,7 +651,7 @@ class list(MutableSequence[_T], Generic[_T]):
|
||||
def __setslice__(self, start: int, stop: int, o: Sequence[_T]) -> None: ...
|
||||
def __delslice__(self, start: int, stop: int) -> None: ...
|
||||
def __add__(self, x: List[_T]) -> List[_T]: ...
|
||||
def __iadd__(self: _S, x: Iterable[_T]) -> _S: ...
|
||||
def __iadd__(self: Self, x: Iterable[_T]) -> Self: ...
|
||||
def __mul__(self, n: int) -> List[_T]: ...
|
||||
def __rmul__(self, n: int) -> List[_T]: ...
|
||||
def __contains__(self, o: object) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user