mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Use typing_extensions.Self instead of _typeshed.Self (#9702)
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Mapping
|
||||
from socket import socket as _socket
|
||||
from typing import Any, AnyStr, Generic, TypeVar, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
from .charset import charset_by_id as charset_by_id, charset_by_name as charset_by_name
|
||||
from .constants import CLIENT as CLIENT, COMMAND as COMMAND, FIELD_TYPE as FIELD_TYPE, SERVER_STATUS as SERVER_STATUS
|
||||
@@ -197,7 +198,7 @@ class Connection(Generic[_C]):
|
||||
def get_proto_info(self): ...
|
||||
def get_server_info(self): ...
|
||||
def show_warnings(self): ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *exc_info: object) -> None: ...
|
||||
Warning: Any
|
||||
Error: Any
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Iterable, Iterator
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
from .connections import Connection
|
||||
|
||||
@@ -24,7 +24,7 @@ class Cursor:
|
||||
def executemany(self, query: str, args: Iterable[object]) -> int | None: ...
|
||||
def callproc(self, procname: str, args: Iterable[Any] = ...) -> Any: ...
|
||||
def scroll(self, value: int, mode: str = ...) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *exc_info: object) -> None: ...
|
||||
# Methods returning result tuples are below.
|
||||
def fetchone(self) -> tuple[Any, ...] | None: ...
|
||||
|
||||
Reference in New Issue
Block a user