stdlib: add argument default values (#9501)

This commit is contained in:
Jelle Zijlstra
2023-01-18 00:37:34 -08:00
committed by GitHub
parent 6cb934291f
commit ddfaca3200
272 changed files with 2529 additions and 2467 deletions

View File

@@ -294,7 +294,7 @@ class Connection:
) -> None: ...
def close(self) -> None: ...
if sys.version_info >= (3, 11):
def blobopen(self, __table: str, __column: str, __row: int, *, readonly: bool = ..., name: str = ...) -> Blob: ...
def blobopen(self, __table: str, __column: str, __row: int, *, readonly: bool = False, name: str = "main") -> Blob: ...
def commit(self) -> None: ...
def create_aggregate(self, name: str, n_arg: int, aggregate_class: Callable[[], _AggregateProtocol]) -> None: ...
@@ -318,7 +318,7 @@ class Connection:
def create_collation(self, __name: str, __callback: Callable[[str, str], int | SupportsIndex] | None) -> None: ...
if sys.version_info >= (3, 8):
def create_function(
self, name: str, narg: int, func: Callable[..., _SqliteData] | None, *, deterministic: bool = ...
self, name: str, narg: int, func: Callable[..., _SqliteData] | None, *, deterministic: bool = False
) -> None: ...
else:
def create_function(self, name: str, num_params: int, func: Callable[..., _SqliteData] | None) -> None: ...
@@ -346,16 +346,16 @@ class Connection:
self,
target: Connection,
*,
pages: int = ...,
progress: Callable[[int, int, int], object] | None = ...,
name: str = ...,
pages: int = -1,
progress: Callable[[int, int, int], object] | None = None,
name: str = "main",
sleep: float = ...,
) -> None: ...
if sys.version_info >= (3, 11):
def setlimit(self, __category: int, __limit: int) -> int: ...
def getlimit(self, __category: int) -> int: ...
def serialize(self, *, name: str = ...) -> bytes: ...
def deserialize(self, __data: ReadableBuffer, *, name: str = ...) -> None: ...
def serialize(self, *, name: str = "main") -> bytes: ...
def deserialize(self, __data: ReadableBuffer, *, name: str = "main") -> None: ...
def __call__(self, __sql: str) -> _Statement: ...
def __enter__(self: Self) -> Self: ...
@@ -381,7 +381,7 @@ class Cursor(Iterator[Any]):
def executemany(self: Self, __sql: str, __seq_of_parameters: Iterable[_Parameters]) -> Self: ...
def executescript(self, __sql_script: str) -> Cursor: ...
def fetchall(self) -> list[Any]: ...
def fetchmany(self, size: int | None = ...) -> list[Any]: ...
def fetchmany(self, size: int | None = 1) -> list[Any]: ...
# Returns either a row (as created by the row_factory) or None, but
# putting None in the return annotation causes annoying false positives.
def fetchone(self) -> Any: ...