mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-07 10:20:58 +08:00
Use _typeshed.Self in Python 2, too (#6932)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import datetime
|
||||
import socket
|
||||
import ssl
|
||||
from typing import IO, Any, Dict, Iterable, List, NamedTuple, Tuple, TypeVar, Union
|
||||
from _typeshed import Self
|
||||
from typing import IO, Any, Dict, Iterable, List, NamedTuple, Tuple, Union
|
||||
|
||||
_SelfT = TypeVar("_SelfT", bound=_NNTPBase)
|
||||
_File = Union[IO[bytes], bytes, str, None]
|
||||
|
||||
class NNTPError(Exception):
|
||||
@@ -45,7 +45,7 @@ class _NNTPBase:
|
||||
nntp_implementation: str
|
||||
nntp_version: int
|
||||
def __init__(self, file: IO[bytes], host: str, readermode: bool | None = ..., timeout: float = ...) -> None: ...
|
||||
def __enter__(self: _SelfT) -> _SelfT: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, *args: Any) -> None: ...
|
||||
def getwelcome(self) -> str: ...
|
||||
def getcapabilities(self) -> Dict[str, List[str]]: ...
|
||||
|
||||
Reference in New Issue
Block a user