mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-27 20:12:21 +08:00
Use PEP 585 syntax wherever possible (#6717)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Callable, Tuple, TypeVar, overload
|
||||
from typing import Any, Callable, TypeVar, overload
|
||||
|
||||
import psycopg2
|
||||
import psycopg2.extensions
|
||||
@@ -360,9 +360,9 @@ class cursor:
|
||||
def copy_to(self, file, table, sep=..., null=..., columns=...): ...
|
||||
def execute(self, query, vars=...): ...
|
||||
def executemany(self, query, vars_list): ...
|
||||
def fetchall(self) -> list[Tuple[Any, ...]]: ...
|
||||
def fetchmany(self, size=...) -> list[Tuple[Any, ...]]: ...
|
||||
def fetchone(self) -> Tuple[Any, ...] | Any: ...
|
||||
def fetchall(self) -> list[tuple[Any, ...]]: ...
|
||||
def fetchmany(self, size=...) -> list[tuple[Any, ...]]: ...
|
||||
def fetchone(self) -> tuple[Any, ...] | Any: ...
|
||||
def mogrify(self, *args, **kwargs): ...
|
||||
def nextset(self): ...
|
||||
def scroll(self, value, mode=...): ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from collections import OrderedDict
|
||||
from typing import Any, List
|
||||
from typing import Any
|
||||
|
||||
from psycopg2._ipaddress import register_ipaddress as register_ipaddress
|
||||
from psycopg2._json import (
|
||||
@@ -45,7 +45,7 @@ class DictCursor(DictCursorBase):
|
||||
def execute(self, query, vars: Any | None = ...): ...
|
||||
def callproc(self, procname, vars: Any | None = ...): ...
|
||||
|
||||
class DictRow(List[Any]):
|
||||
class DictRow(list[Any]):
|
||||
def __init__(self, cursor) -> None: ...
|
||||
def __getitem__(self, x): ...
|
||||
def __setitem__(self, x, v) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user