mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-06 09:57:41 +08:00
Use PEP 585 syntax wherever possible (#6717)
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import decimal
|
||||
from _typeshed import ReadableBuffer
|
||||
from datetime import date, datetime, time
|
||||
from typing import Any, Sequence, Tuple, Type, overload
|
||||
from typing import Any, Sequence, Type, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .resultrow import ResultRow
|
||||
|
||||
apilevel: str
|
||||
threadsafety: int
|
||||
paramstyle: Tuple[str, ...]
|
||||
paramstyle: tuple[str, ...]
|
||||
connect = Connection
|
||||
|
||||
class Connection:
|
||||
@@ -44,19 +44,19 @@ class LOB:
|
||||
def read(self, size: int = ..., position: int = ...) -> str | bytes: ...
|
||||
def write(self, object: str | bytes) -> int: ...
|
||||
|
||||
_Parameters = Sequence[Tuple[Any, ...]]
|
||||
_Parameters = Sequence[tuple[Any, ...]]
|
||||
|
||||
class Cursor:
|
||||
description: Tuple[Tuple[Any, ...], ...]
|
||||
description: tuple[tuple[Any, ...], ...]
|
||||
rowcount: int
|
||||
statementhash: str | None
|
||||
connection: Connection
|
||||
arraysize: int
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def callproc(self, procname: str, parameters: Tuple[Any, ...] = ..., overview: bool = ...) -> Tuple[Any, ...]: ...
|
||||
def callproc(self, procname: str, parameters: tuple[Any, ...] = ..., overview: bool = ...) -> tuple[Any, ...]: ...
|
||||
def close(self) -> None: ...
|
||||
def description_ext(self) -> Sequence[Tuple[Any, ...]]: ...
|
||||
def execute(self, operation: str, parameters: Tuple[Any, ...]) -> bool: ...
|
||||
def description_ext(self) -> Sequence[tuple[Any, ...]]: ...
|
||||
def execute(self, operation: str, parameters: tuple[Any, ...]) -> bool: ...
|
||||
def executemany(self, operation: str, parameters: _Parameters) -> Any: ...
|
||||
def executemanyprepared(self, parameters: _Parameters) -> Any: ...
|
||||
def executeprepared(self, parameters: _Parameters = ...) -> Any: ...
|
||||
@@ -67,7 +67,7 @@ class Cursor:
|
||||
def getwarning(self) -> Warning | None: ...
|
||||
def haswarning(self) -> bool: ...
|
||||
def nextset(self) -> None: ...
|
||||
def parameter_description(self) -> Tuple[str, ...]: ...
|
||||
def parameter_description(self) -> tuple[str, ...]: ...
|
||||
@overload
|
||||
def prepare(self, operation: str, newcursor: Literal[True]) -> Cursor: ...
|
||||
@overload
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from typing import Any, Tuple
|
||||
from typing import Any
|
||||
|
||||
class ResultRow:
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
column_names: Tuple[str, ...]
|
||||
column_values: Tuple[Any, ...]
|
||||
column_names: tuple[str, ...]
|
||||
column_values: tuple[Any, ...]
|
||||
|
||||
Reference in New Issue
Block a user