Use typing_extensions.Self instead of _typeshed.Self (#9702)

This commit is contained in:
Alex Waygood
2023-02-15 11:32:43 +01:00
committed by GitHub
parent 8cd6d81f15
commit 7180d0223b
140 changed files with 597 additions and 610 deletions

View File

@@ -1,8 +1,7 @@
from _typeshed import Self
from collections.abc import Callable, Iterable, Mapping, Sequence
from types import TracebackType
from typing import Any, TypeVar, overload
from typing_extensions import Literal, TypeAlias
from typing_extensions import Literal, Self, TypeAlias
import psycopg2
import psycopg2.extensions
@@ -105,11 +104,11 @@ class cursor:
def scroll(self, value, mode=...): ...
def setinputsizes(self, sizes): ...
def setoutputsize(self, size, column=...): ...
def __enter__(self: Self) -> Self: ...
def __enter__(self) -> Self: ...
def __exit__(
self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
) -> None: ...
def __iter__(self: Self) -> Self: ...
def __iter__(self) -> Self: ...
def __next__(self) -> tuple[Any, ...]: ...
_Cursor: TypeAlias = cursor
@@ -462,7 +461,7 @@ class connection:
def tpc_recover(self) -> list[Xid]: ...
def tpc_rollback(self, __xid: str | bytes | Xid = ...) -> None: ...
def xid(self, format_id, gtrid, bqual) -> Xid: ...
def __enter__(self: Self) -> Self: ...
def __enter__(self) -> Self: ...
def __exit__(self, __type: object, __name: object, __tb: object) -> None: ...
class lobject: