mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 14:01:55 +08:00
Use _typeshed.Self in Python 2, too (#6932)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from typing import IO, Any, AnyStr, List, Mapping, Sequence, Text, Tuple, TypeVar
|
||||
from _typeshed import Self
|
||||
from typing import IO, Any, AnyStr, List, Mapping, Sequence, Text, Tuple
|
||||
|
||||
def url2pathname(pathname: AnyStr) -> AnyStr: ...
|
||||
def pathname2url(pathname: AnyStr) -> AnyStr: ...
|
||||
@@ -77,15 +78,13 @@ class ftpwrapper:
|
||||
def file_close(self): ...
|
||||
def real_close(self): ...
|
||||
|
||||
_AIUT = TypeVar("_AIUT", bound=addbase)
|
||||
|
||||
class addbase:
|
||||
fp: Any
|
||||
def read(self, n: int = ...) -> bytes: ...
|
||||
def readline(self, limit: int = ...) -> bytes: ...
|
||||
def readlines(self, hint: int = ...) -> List[bytes]: ...
|
||||
def fileno(self) -> int: ... # Optional[int], but that is rare
|
||||
def __iter__(self: _AIUT) -> _AIUT: ...
|
||||
def __iter__(self: Self) -> Self: ...
|
||||
def next(self) -> bytes: ...
|
||||
def __init__(self, fp) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user