diff --git a/stubs/SQLAlchemy/sqlalchemy/cimmutabledict.pyi b/stubs/SQLAlchemy/sqlalchemy/cimmutabledict.pyi index 9883315dce8d..1a1a3006afc3 100644 --- a/stubs/SQLAlchemy/sqlalchemy/cimmutabledict.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/cimmutabledict.pyi @@ -13,7 +13,7 @@ class immutabledict(dict[_KT, _VT], Generic[_KT, _VT]): @overload def union(self, __dict: dict[_KT2, _VT2]) -> immutabledict[_KT | _KT2, _VT | _VT2]: ... @overload - def union(self, __dict: None = ..., **kw: SupportsKeysAndGetItem[_KT2, _VT2]) -> immutabledict[_KT | _KT2, _VT | _VT2]: ... + def union(self, __dict: None = None, **kw: SupportsKeysAndGetItem[_KT2, _VT2]) -> immutabledict[_KT | _KT2, _VT | _VT2]: ... def merge_with( self, *args: SupportsKeysAndGetItem[_KT | _KT2, _VT2] | Iterable[tuple[_KT2, _VT2]] | None ) -> immutabledict[_KT | _KT2, _VT | _VT2]: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/connectors/mxodbc.pyi b/stubs/SQLAlchemy/sqlalchemy/connectors/mxodbc.pyi index 350b3df4aa52..3bf803352a7f 100644 --- a/stubs/SQLAlchemy/sqlalchemy/connectors/mxodbc.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/connectors/mxodbc.pyi @@ -13,5 +13,5 @@ class MxODBCConnector(Connector): def on_connect(self): ... def create_connect_args(self, url): ... def is_disconnect(self, e, connection, cursor): ... - def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = ...) -> None: ... - def do_execute(self, cursor, statement, parameters, context: Incomplete | None = ...) -> None: ... + def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... + def do_execute(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/connectors/pyodbc.pyi b/stubs/SQLAlchemy/sqlalchemy/connectors/pyodbc.pyi index b0b7ce25d32e..7210734f90c5 100644 --- a/stubs/SQLAlchemy/sqlalchemy/connectors/pyodbc.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/connectors/pyodbc.pyi @@ -13,7 +13,7 @@ class PyODBCConnector(Connector): default_paramstyle: str use_setinputsizes: bool pyodbc_driver_name: Any - def __init__(self, supports_unicode_binds: Incomplete | None = ..., use_setinputsizes: bool = ..., **kw) -> None: ... + def __init__(self, supports_unicode_binds: Incomplete | None = None, use_setinputsizes: bool = False, **kw) -> None: ... @classmethod def dbapi(cls): ... def create_connect_args(self, url): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/base.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/base.pyi index 564282e8ec1a..a0d8dd01b5d2 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/base.pyi @@ -22,15 +22,15 @@ RESERVED_WORDS: Any class _StringType(sqltypes.String): charset: Any - def __init__(self, charset: Incomplete | None = ..., **kw) -> None: ... + def __init__(self, charset: Incomplete | None = None, **kw) -> None: ... class VARCHAR(_StringType, sqltypes.VARCHAR): __visit_name__: str - def __init__(self, length: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, length: Incomplete | None = None, **kwargs) -> None: ... class CHAR(_StringType, sqltypes.CHAR): __visit_name__: str - def __init__(self, length: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, length: Incomplete | None = None, **kwargs) -> None: ... class _FBDateTime(sqltypes.DateTime): def bind_processor(self, dialect): ... @@ -52,7 +52,7 @@ class FBCompiler(sql.compiler.SQLCompiler): def visit_startswith_op_binary(self, binary, operator, **kw): ... def visit_not_startswith_op_binary(self, binary, operator, **kw): ... def visit_mod_binary(self, binary, operator, **kw): ... - def visit_alias(self, alias, asfrom: bool = ..., **kwargs): ... # type: ignore[override] + def visit_alias(self, alias, asfrom: bool = False, **kwargs): ... # type: ignore[override] def visit_substring_func(self, func, **kw): ... def visit_length_func(self, function, **kw): ... visit_char_length_func: Any @@ -97,13 +97,13 @@ class FBDialect(default.DefaultDialect): def __init__(self, *args, **kwargs) -> None: ... implicit_returning: Any def initialize(self, connection) -> None: ... - def has_table(self, connection, table_name, schema: Incomplete | None = ...): ... # type: ignore[override] - def has_sequence(self, connection, sequence_name, schema: Incomplete | None = ...): ... # type: ignore[override] - def get_table_names(self, connection, schema: Incomplete | None = ..., **kw): ... - def get_view_names(self, connection, schema: Incomplete | None = ..., **kw): ... - def get_view_definition(self, connection, view_name, schema: Incomplete | None = ..., **kw): ... - def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_column_sequence(self, connection, table_name, column_name, schema: Incomplete | None = ..., **kw): ... - def get_columns(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_indexes(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... + def has_table(self, connection, table_name, schema: Incomplete | None = None): ... # type: ignore[override] + def has_sequence(self, connection, sequence_name, schema: Incomplete | None = None): ... # type: ignore[override] + def get_table_names(self, connection, schema: Incomplete | None = None, **kw): ... + def get_view_names(self, connection, schema: Incomplete | None = None, **kw): ... + def get_view_definition(self, connection, view_name, schema: Incomplete | None = None, **kw): ... + def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_column_sequence(self, connection, table_name, column_name, schema: Incomplete | None = None, **kw): ... + def get_columns(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_indexes(self, connection, table_name, schema: Incomplete | None = None, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/fdb.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/fdb.pyi index 4bc56c5a6659..c2c7a025a351 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/fdb.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/fdb.pyi @@ -2,7 +2,7 @@ from .kinterbasdb import FBDialect_kinterbasdb class FBDialect_fdb(FBDialect_kinterbasdb): supports_statement_cache: bool - def __init__(self, enable_rowcount: bool = ..., retaining: bool = ..., **kwargs) -> None: ... + def __init__(self, enable_rowcount: bool = True, retaining: bool = False, **kwargs) -> None: ... @classmethod def dbapi(cls): ... def create_connect_args(self, url): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/kinterbasdb.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/kinterbasdb.pyi index 09d3dabd6262..7f957f3ceb5e 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/kinterbasdb.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/firebird/kinterbasdb.pyi @@ -26,11 +26,11 @@ class FBDialect_kinterbasdb(FBDialect): concurrency_level: Any retaining: Any def __init__( - self, type_conv: int = ..., concurrency_level: int = ..., enable_rowcount: bool = ..., retaining: bool = ..., **kwargs + self, type_conv: int = 200, concurrency_level: int = 1, enable_rowcount: bool = True, retaining: bool = False, **kwargs ) -> None: ... @classmethod def dbapi(cls): ... - def do_execute(self, cursor, statement, parameters, context: Incomplete | None = ...) -> None: ... + def do_execute(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... def do_rollback(self, dbapi_connection) -> None: ... def do_commit(self, dbapi_connection) -> None: ... def create_connect_args(self, url): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/base.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/base.pyi index 47b9703ad3d3..db60f2b7ac0e 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/base.pyi @@ -47,7 +47,7 @@ class _MSDate(sqltypes.Date): class TIME(sqltypes.TIME): precision: Any - def __init__(self, precision: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, precision: Incomplete | None = None, **kwargs) -> None: ... def bind_processor(self, dialect): ... def result_processor(self, dialect, coltype): ... @@ -67,12 +67,12 @@ class SMALLDATETIME(_DateTimeBase, sqltypes.DateTime): class DATETIME2(_DateTimeBase, sqltypes.DateTime): __visit_name__: str precision: Any - def __init__(self, precision: Incomplete | None = ..., **kw) -> None: ... + def __init__(self, precision: Incomplete | None = None, **kw) -> None: ... class DATETIMEOFFSET(_DateTimeBase, sqltypes.DateTime): __visit_name__: str precision: Any - def __init__(self, precision: Incomplete | None = ..., **kw) -> None: ... + def __init__(self, precision: Incomplete | None = None, **kw) -> None: ... class _UnicodeLiteral: def literal_processor(self, dialect): ... @@ -84,7 +84,7 @@ class TIMESTAMP(sqltypes._Binary): __visit_name__: str length: Any convert_int: Any - def __init__(self, convert_int: bool = ...) -> None: ... + def __init__(self, convert_int: bool = False) -> None: ... def result_processor(self, dialect, coltype): ... class ROWVERSION(TIMESTAMP): @@ -101,7 +101,7 @@ class VARBINARY(sqltypes.VARBINARY, sqltypes.LargeBinary): @overload def __init__(self, *, filestream: Literal[True]) -> None: ... @overload - def __init__(self, length: Incomplete | None = ..., filestream: Literal[False] = ...) -> None: ... + def __init__(self, length: Incomplete | None = None, filestream: Literal[False] = False) -> None: ... class IMAGE(sqltypes.LargeBinary): __visit_name__: str @@ -251,7 +251,7 @@ class MSSQLStrictCompiler(MSSQLCompiler): class MSDDLCompiler(compiler.DDLCompiler): def get_column_specification(self, column, **kwargs): ... - def visit_create_index(self, create, include_schema: bool = ...): ... # type: ignore[override] + def visit_create_index(self, create, include_schema: bool = False): ... # type: ignore[override] def visit_drop_index(self, drop): ... def visit_primary_key_constraint(self, constraint): ... def visit_unique_constraint(self, constraint): ... @@ -262,7 +262,7 @@ class MSDDLCompiler(compiler.DDLCompiler): class MSIdentifierPreparer(compiler.IdentifierPreparer): reserved_words: Any def __init__(self, dialect) -> None: ... - def quote_schema(self, schema, force: Incomplete | None = ...): ... + def quote_schema(self, schema, force: Incomplete | None = None): ... class MSDialect(default.DefaultDialect): name: str @@ -296,15 +296,15 @@ class MSDialect(default.DefaultDialect): isolation_level: Any def __init__( self, - query_timeout: Incomplete | None = ..., - use_scope_identity: bool = ..., - schema_name: str = ..., - isolation_level: Incomplete | None = ..., - deprecate_large_types: Incomplete | None = ..., - json_serializer: Incomplete | None = ..., - json_deserializer: Incomplete | None = ..., - legacy_schema_aliasing: Incomplete | None = ..., - ignore_no_transaction_on_rollback: bool = ..., + query_timeout: Incomplete | None = None, + use_scope_identity: bool = True, + schema_name: str = "dbo", + isolation_level: Incomplete | None = None, + deprecate_large_types: Incomplete | None = None, + json_serializer: Incomplete | None = None, + json_deserializer: Incomplete | None = None, + legacy_schema_aliasing: Incomplete | None = None, + ignore_no_transaction_on_rollback: bool = False, **opts, ) -> None: ... def do_savepoint(self, connection, name) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/mxodbc.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/mxodbc.pyi index ee58d3dec742..2f0a14ffaab6 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/mxodbc.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/mxodbc.pyi @@ -22,6 +22,6 @@ class MSDialect_mxodbc(MxODBCConnector, MSDialect): supports_statement_cache: bool colspecs: Any description_encoding: Any - def __init__(self, description_encoding: Incomplete | None = ..., **params) -> None: ... + def __init__(self, description_encoding: Incomplete | None = None, **params) -> None: ... dialect = MSDialect_mxodbc diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/pyodbc.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/pyodbc.pyi index 0ee156b64f52..50d53b123f38 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/pyodbc.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/mssql/pyodbc.pyi @@ -37,9 +37,9 @@ class MSDialect_pyodbc(PyODBCConnector, MSDialect): description_encoding: Any use_scope_identity: Any fast_executemany: Any - def __init__(self, description_encoding: Incomplete | None = ..., fast_executemany: bool = ..., **params) -> None: ... + def __init__(self, description_encoding: Incomplete | None = None, fast_executemany: bool = False, **params) -> None: ... def on_connect(self): ... - def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = ...) -> None: ... + def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... def is_disconnect(self, e, connection, cursor): ... dialect = MSDialect_pyodbc diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/aiomysql.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/aiomysql.pyi index 3dc245d014bb..a91b28976d81 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/aiomysql.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/aiomysql.pyi @@ -19,12 +19,12 @@ class AsyncAdapt_aiomysql_cursor: @property def lastrowid(self): ... def close(self) -> None: ... - def execute(self, operation, parameters: Incomplete | None = ...): ... + def execute(self, operation, parameters: Incomplete | None = None): ... def executemany(self, operation, seq_of_parameters): ... def setinputsizes(self, *inputsizes) -> None: ... def __iter__(self): ... def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = ...): ... + def fetchmany(self, size: Incomplete | None = None): ... def fetchall(self): ... class AsyncAdapt_aiomysql_ss_cursor(AsyncAdapt_aiomysql_cursor): @@ -33,7 +33,7 @@ class AsyncAdapt_aiomysql_ss_cursor(AsyncAdapt_aiomysql_cursor): def __init__(self, adapt_connection) -> None: ... def close(self) -> None: ... def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = ...): ... + def fetchmany(self, size: Incomplete | None = None): ... def fetchall(self): ... class AsyncAdapt_aiomysql_connection(AdaptedConnection): @@ -43,7 +43,7 @@ class AsyncAdapt_aiomysql_connection(AdaptedConnection): def ping(self, reconnect): ... def character_set_name(self): ... def autocommit(self, value) -> None: ... - def cursor(self, server_side: bool = ...): ... + def cursor(self, server_side: bool = False): ... def rollback(self) -> None: ... def commit(self) -> None: ... def close(self) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/asyncmy.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/asyncmy.pyi index 69a9d5576155..16180d5820d1 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/asyncmy.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/asyncmy.pyi @@ -19,12 +19,12 @@ class AsyncAdapt_asyncmy_cursor: @property def lastrowid(self): ... def close(self) -> None: ... - def execute(self, operation, parameters: Incomplete | None = ...): ... + def execute(self, operation, parameters: Incomplete | None = None): ... def executemany(self, operation, seq_of_parameters): ... def setinputsizes(self, *inputsizes) -> None: ... def __iter__(self): ... def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = ...): ... + def fetchmany(self, size: Incomplete | None = None): ... def fetchall(self): ... class AsyncAdapt_asyncmy_ss_cursor(AsyncAdapt_asyncmy_cursor): @@ -33,7 +33,7 @@ class AsyncAdapt_asyncmy_ss_cursor(AsyncAdapt_asyncmy_cursor): def __init__(self, adapt_connection) -> None: ... def close(self) -> None: ... def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = ...): ... + def fetchmany(self, size: Incomplete | None = None): ... def fetchall(self): ... class AsyncAdapt_asyncmy_connection(AdaptedConnection): @@ -43,7 +43,7 @@ class AsyncAdapt_asyncmy_connection(AdaptedConnection): def ping(self, reconnect): ... def character_set_name(self): ... def autocommit(self, value) -> None: ... - def cursor(self, server_side: bool = ...): ... + def cursor(self, server_side: bool = False): ... def rollback(self) -> None: ... def commit(self) -> None: ... def close(self) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/base.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/base.pyi index 129de51ebaf6..8a36027eb101 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/base.pyi @@ -89,13 +89,13 @@ class MySQLCompiler(compiler.SQLCompiler): def visit_mysql_match(self, element, **kw): ... def visit_match_op_binary(self, binary, operator, **kw): ... def get_from_hint_text(self, table, text): ... - def visit_typeclause(self, typeclause, type_: Incomplete | None = ..., **kw): ... + def visit_typeclause(self, typeclause, type_: Incomplete | None = None, **kw): ... def visit_cast(self, cast, **kw): ... def render_literal_value(self, value, type_): ... def visit_true(self, element, **kw): ... def visit_false(self, element, **kw): ... def get_select_precolumns(self, select, **kw): ... - def visit_join(self, join, asfrom: bool = ..., from_linter: Incomplete | None = ..., **kwargs): ... + def visit_join(self, join, asfrom: bool = False, from_linter: Incomplete | None = None, **kwargs): ... def for_update_clause(self, select, **kw): ... def limit_clause(self, select, **kw): ... def update_limit_clause(self, update_stmt): ... @@ -161,7 +161,7 @@ class MySQLTypeCompiler(compiler.GenericTypeCompiler): class MySQLIdentifierPreparer(compiler.IdentifierPreparer): reserved_words: Any - def __init__(self, dialect, server_ansiquotes: bool = ..., **kw) -> None: ... + def __init__(self, dialect, server_ansiquotes: bool = False, **kw) -> None: ... class MariaDBIdentifierPreparer(MySQLIdentifierPreparer): reserved_words: Any @@ -199,10 +199,10 @@ class MySQLDialect(default.DefaultDialect): isolation_level: Any def __init__( self, - isolation_level: Incomplete | None = ..., - json_serializer: Incomplete | None = ..., - json_deserializer: Incomplete | None = ..., - is_mariadb: Incomplete | None = ..., + isolation_level: Incomplete | None = None, + json_serializer: Incomplete | None = None, + json_deserializer: Incomplete | None = None, + is_mariadb: Incomplete | None = None, **kwargs, ) -> None: ... def on_connect(self): ... @@ -210,27 +210,27 @@ class MySQLDialect(default.DefaultDialect): def get_isolation_level(self, connection): ... def do_begin_twophase(self, connection, xid) -> None: ... def do_prepare_twophase(self, connection, xid) -> None: ... - def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ... - def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ... + def do_rollback_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... + def do_commit_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... def do_recover_twophase(self, connection): ... def is_disconnect(self, e, connection, cursor): ... - def has_table(self, connection, table_name, schema: Incomplete | None = ...): ... # type: ignore[override] - def has_sequence(self, connection, sequence_name, schema: Incomplete | None = ...): ... # type: ignore[override] - def get_sequence_names(self, connection, schema: Incomplete | None = ..., **kw): ... + def has_table(self, connection, table_name, schema: Incomplete | None = None): ... # type: ignore[override] + def has_sequence(self, connection, sequence_name, schema: Incomplete | None = None): ... # type: ignore[override] + def get_sequence_names(self, connection, schema: Incomplete | None = None, **kw): ... identifier_preparer: Any def initialize(self, connection) -> None: ... def get_schema_names(self, connection, **kw): ... - def get_table_names(self, connection, schema: Incomplete | None = ..., **kw): ... - def get_view_names(self, connection, schema: Incomplete | None = ..., **kw): ... - def get_table_options(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_columns(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_check_constraints(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_table_comment(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_indexes(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_unique_constraints(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_view_definition(self, connection, view_name, schema: Incomplete | None = ..., **kw): ... + def get_table_names(self, connection, schema: Incomplete | None = None, **kw): ... + def get_view_names(self, connection, schema: Incomplete | None = None, **kw): ... + def get_table_options(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_columns(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_check_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_table_comment(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_indexes(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_unique_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_view_definition(self, connection, view_name, schema: Incomplete | None = None, **kw): ... class _DecodingRow: rowproxy: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mariadbconnector.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mariadbconnector.pyi index 0735fb75a28e..b4ab06a53fea 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mariadbconnector.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mariadbconnector.pyi @@ -30,7 +30,7 @@ class MySQLDialect_mariadbconnector(MySQLDialect): def create_connect_args(self, url): ... def do_begin_twophase(self, connection, xid) -> None: ... def do_prepare_twophase(self, connection, xid) -> None: ... - def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ... - def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ... + def do_rollback_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... + def do_commit_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... dialect = MySQLDialect_mariadbconnector diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mysqldb.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mysqldb.pyi index a8479ad8bf33..8daaf59a611f 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mysqldb.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mysqldb.pyi @@ -27,7 +27,7 @@ class MySQLDialect_mysqldb(MySQLDialect): def dbapi(cls): ... def on_connect(self): ... def do_ping(self, dbapi_connection): ... - def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = ...) -> None: ... - def create_connect_args(self, url, _translate_args: Incomplete | None = ...): ... + def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... + def create_connect_args(self, url, _translate_args: Incomplete | None = None): ... dialect = MySQLDialect_mysqldb diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/oursql.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/oursql.pyi index 1bc65d97b235..fa7ea6fbe59d 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/oursql.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/oursql.pyi @@ -21,17 +21,17 @@ class MySQLDialect_oursql(MySQLDialect): colspecs: Any @classmethod def dbapi(cls): ... - def do_execute(self, cursor, statement, parameters, context: Incomplete | None = ...) -> None: ... + def do_execute(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... def do_begin(self, connection) -> None: ... def do_begin_twophase(self, connection, xid) -> None: ... def do_prepare_twophase(self, connection, xid) -> None: ... - def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ... - def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ... - def has_table(self, connection, table_name, schema: Incomplete | None = ...): ... # type: ignore[override] - def get_table_options(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_columns(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_view_names(self, connection, schema: Incomplete | None = ..., **kw): ... - def get_table_names(self, connection, schema: Incomplete | None = ..., **kw): ... + def do_rollback_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... + def do_commit_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... + def has_table(self, connection, table_name, schema: Incomplete | None = None): ... # type: ignore[override] + def get_table_options(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_columns(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_view_names(self, connection, schema: Incomplete | None = None, **kw): ... + def get_table_names(self, connection, schema: Incomplete | None = None, **kw): ... def get_schema_names(self, connection, **kw): ... def initialize(self, connection): ... def is_disconnect(self, e, connection, cursor): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/pymysql.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/pymysql.pyi index fa7a490882a7..f91c2119fcb7 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/pymysql.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/pymysql.pyi @@ -14,7 +14,7 @@ class MySQLDialect_pymysql(MySQLDialect_mysqldb): def supports_server_side_cursors(self): ... @classmethod def dbapi(cls): ... - def create_connect_args(self, url, _translate_args: Incomplete | None = ...): ... + def create_connect_args(self, url, _translate_args: Incomplete | None = None): ... def is_disconnect(self, e, connection, cursor): ... dialect = MySQLDialect_pymysql diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/types.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/types.pyi index 5db2c9257995..80e81e150e0f 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/types.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/types.pyi @@ -6,17 +6,17 @@ import sqlalchemy.types as sqltypes class _NumericType: unsigned: Any zerofill: Any - def __init__(self, unsigned: bool = ..., zerofill: bool = ..., **kw) -> None: ... + def __init__(self, unsigned: bool = False, zerofill: bool = False, **kw) -> None: ... class _FloatType(_NumericType, sqltypes.Float): scale: Any def __init__( - self, precision: Incomplete | None = ..., scale: Incomplete | None = ..., asdecimal: bool = ..., **kw + self, precision: Incomplete | None = None, scale: Incomplete | None = None, asdecimal: bool = True, **kw ) -> None: ... class _IntegerType(_NumericType, sqltypes.Integer): display_width: Any - def __init__(self, display_width: Incomplete | None = ..., **kw) -> None: ... + def __init__(self, display_width: Incomplete | None = None, **kw) -> None: ... class _StringType(sqltypes.String): charset: Any @@ -26,12 +26,12 @@ class _StringType(sqltypes.String): national: Any def __init__( self, - charset: Incomplete | None = ..., - collation: Incomplete | None = ..., - ascii: bool = ..., - binary: bool = ..., - unicode: bool = ..., - national: bool = ..., + charset: Incomplete | None = None, + collation: Incomplete | None = None, + ascii: bool = False, + binary: bool = False, + unicode: bool = False, + national: bool = False, **kw, ) -> None: ... @@ -41,84 +41,84 @@ class _MatchType(sqltypes.Float, sqltypes.MatchType): # type: ignore[misc] # i class NUMERIC(_NumericType, sqltypes.NUMERIC): __visit_name__: str def __init__( - self, precision: Incomplete | None = ..., scale: Incomplete | None = ..., asdecimal: bool = ..., **kw + self, precision: Incomplete | None = None, scale: Incomplete | None = None, asdecimal: bool = True, **kw ) -> None: ... class DECIMAL(_NumericType, sqltypes.DECIMAL): __visit_name__: str def __init__( - self, precision: Incomplete | None = ..., scale: Incomplete | None = ..., asdecimal: bool = ..., **kw + self, precision: Incomplete | None = None, scale: Incomplete | None = None, asdecimal: bool = True, **kw ) -> None: ... class DOUBLE(_FloatType): __visit_name__: str def __init__( - self, precision: Incomplete | None = ..., scale: Incomplete | None = ..., asdecimal: bool = ..., **kw + self, precision: Incomplete | None = None, scale: Incomplete | None = None, asdecimal: bool = True, **kw ) -> None: ... class REAL(_FloatType, sqltypes.REAL): __visit_name__: str def __init__( - self, precision: Incomplete | None = ..., scale: Incomplete | None = ..., asdecimal: bool = ..., **kw + self, precision: Incomplete | None = None, scale: Incomplete | None = None, asdecimal: bool = True, **kw ) -> None: ... class FLOAT(_FloatType, sqltypes.FLOAT): __visit_name__: str def __init__( - self, precision: Incomplete | None = ..., scale: Incomplete | None = ..., asdecimal: bool = ..., **kw + self, precision: Incomplete | None = None, scale: Incomplete | None = None, asdecimal: bool = False, **kw ) -> None: ... def bind_processor(self, dialect) -> None: ... class INTEGER(_IntegerType, sqltypes.INTEGER): __visit_name__: str - def __init__(self, display_width: Incomplete | None = ..., **kw) -> None: ... + def __init__(self, display_width: Incomplete | None = None, **kw) -> None: ... class BIGINT(_IntegerType, sqltypes.BIGINT): __visit_name__: str - def __init__(self, display_width: Incomplete | None = ..., **kw) -> None: ... + def __init__(self, display_width: Incomplete | None = None, **kw) -> None: ... class MEDIUMINT(_IntegerType): __visit_name__: str - def __init__(self, display_width: Incomplete | None = ..., **kw) -> None: ... + def __init__(self, display_width: Incomplete | None = None, **kw) -> None: ... class TINYINT(_IntegerType): __visit_name__: str - def __init__(self, display_width: Incomplete | None = ..., **kw) -> None: ... + def __init__(self, display_width: Incomplete | None = None, **kw) -> None: ... class SMALLINT(_IntegerType, sqltypes.SMALLINT): __visit_name__: str - def __init__(self, display_width: Incomplete | None = ..., **kw) -> None: ... + def __init__(self, display_width: Incomplete | None = None, **kw) -> None: ... class BIT(sqltypes.TypeEngine): __visit_name__: str length: Any - def __init__(self, length: Incomplete | None = ...) -> None: ... + def __init__(self, length: Incomplete | None = None) -> None: ... def result_processor(self, dialect, coltype): ... class TIME(sqltypes.TIME): __visit_name__: str fsp: Any - def __init__(self, timezone: bool = ..., fsp: Incomplete | None = ...) -> None: ... + def __init__(self, timezone: bool = False, fsp: Incomplete | None = None) -> None: ... def result_processor(self, dialect, coltype): ... class TIMESTAMP(sqltypes.TIMESTAMP): __visit_name__: str fsp: Any - def __init__(self, timezone: bool = ..., fsp: Incomplete | None = ...) -> None: ... + def __init__(self, timezone: bool = False, fsp: Incomplete | None = None) -> None: ... class DATETIME(sqltypes.DATETIME): __visit_name__: str fsp: Any - def __init__(self, timezone: bool = ..., fsp: Incomplete | None = ...) -> None: ... + def __init__(self, timezone: bool = False, fsp: Incomplete | None = None) -> None: ... class YEAR(sqltypes.TypeEngine): __visit_name__: str display_width: Any - def __init__(self, display_width: Incomplete | None = ...) -> None: ... + def __init__(self, display_width: Incomplete | None = None) -> None: ... class TEXT(_StringType, sqltypes.TEXT): __visit_name__: str - def __init__(self, length: Incomplete | None = ..., **kw) -> None: ... + def __init__(self, length: Incomplete | None = None, **kw) -> None: ... class TINYTEXT(_StringType): __visit_name__: str @@ -134,19 +134,19 @@ class LONGTEXT(_StringType): class VARCHAR(_StringType, sqltypes.VARCHAR): __visit_name__: str - def __init__(self, length: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, length: Incomplete | None = None, **kwargs) -> None: ... class CHAR(_StringType, sqltypes.CHAR): __visit_name__: str - def __init__(self, length: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, length: Incomplete | None = None, **kwargs) -> None: ... class NVARCHAR(_StringType, sqltypes.NVARCHAR): __visit_name__: str - def __init__(self, length: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, length: Incomplete | None = None, **kwargs) -> None: ... class NCHAR(_StringType, sqltypes.NCHAR): __visit_name__: str - def __init__(self, length: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, length: Incomplete | None = None, **kwargs) -> None: ... class TINYBLOB(sqltypes._Binary): __visit_name__: str diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/base.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/base.pyi index 9b41e88b2f2e..cd2bdf53f841 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/base.pyi @@ -36,7 +36,7 @@ NVARCHAR2 = NVARCHAR class NUMBER(sqltypes.Numeric, sqltypes.Integer): __visit_name__: str def __init__( - self, precision: Incomplete | None = ..., scale: Incomplete | None = ..., asdecimal: Incomplete | None = ... + self, precision: Incomplete | None = None, scale: Incomplete | None = None, asdecimal: Incomplete | None = None ) -> None: ... def adapt(self, impltype): ... @@ -62,8 +62,8 @@ class INTERVAL(sqltypes.NativeForEmulated, sqltypes._AbstractInterval): __visit_name__: str day_precision: Any second_precision: Any - def __init__(self, day_precision: Incomplete | None = ..., second_precision: Incomplete | None = ...) -> None: ... - def as_generic(self, allow_nulltype: bool = ...): ... + def __init__(self, day_precision: Incomplete | None = None, second_precision: Incomplete | None = None) -> None: ... + def as_generic(self, allow_nulltype: bool = False): ... def coerce_compared_value(self, op, value): ... class ROWID(sqltypes.TypeEngine): @@ -115,7 +115,7 @@ class OracleCompiler(compiler.SQLCompiler): def visit_function(self, func, **kw): ... def visit_table_valued_column(self, element, **kw): ... def default_from(self): ... - def visit_join(self, join, from_linter: Incomplete | None = ..., **kwargs): ... # type: ignore[override] + def visit_join(self, join, from_linter: Incomplete | None = None, **kwargs): ... # type: ignore[override] def visit_outer_join_column(self, vc, **kw): ... def visit_sequence(self, seq, **kw): ... def get_render_as_alias_suffix(self, alias_name_text): ... @@ -180,11 +180,11 @@ class OracleDialect(default.DefaultDialect): exclude_tablespaces: Any def __init__( self, - use_ansi: bool = ..., - optimize_limits: bool = ..., - use_binds_for_limits: Incomplete | None = ..., - use_nchar_for_unicode: bool = ..., - exclude_tablespaces=..., + use_ansi: bool = True, + optimize_limits: bool = False, + use_binds_for_limits: Incomplete | None = None, + use_nchar_for_unicode: bool = False, + exclude_tablespaces=("SYSTEM", "SYSAUX"), **kwargs, ) -> None: ... implicit_returning: Any @@ -193,28 +193,30 @@ class OracleDialect(default.DefaultDialect): def get_isolation_level(self, connection) -> None: ... def get_default_isolation_level(self, dbapi_conn): ... def set_isolation_level(self, connection, level) -> None: ... - def has_table(self, connection, table_name, schema: Incomplete | None = ...): ... # type: ignore[override] - def has_sequence(self, connection, sequence_name, schema: Incomplete | None = ...): ... # type: ignore[override] + def has_table(self, connection, table_name, schema: Incomplete | None = None): ... # type: ignore[override] + def has_sequence(self, connection, sequence_name, schema: Incomplete | None = None): ... # type: ignore[override] def get_schema_names(self, connection, **kw): ... - def get_table_names(self, connection, schema: Incomplete | None = ..., **kw): ... + def get_table_names(self, connection, schema: Incomplete | None = None, **kw): ... def get_temp_table_names(self, connection, **kw): ... - def get_view_names(self, connection, schema: Incomplete | None = ..., **kw): ... - def get_sequence_names(self, connection, schema: Incomplete | None = ..., **kw): ... - def get_table_options(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_columns(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... + def get_view_names(self, connection, schema: Incomplete | None = None, **kw): ... + def get_sequence_names(self, connection, schema: Incomplete | None = None, **kw): ... + def get_table_options(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_columns(self, connection, table_name, schema: Incomplete | None = None, **kw): ... def get_table_comment( - self, connection, table_name, schema: Incomplete | None = ..., resolve_synonyms: bool = ..., dblink: str = ..., **kw + self, connection, table_name, schema: Incomplete | None = None, resolve_synonyms: bool = False, dblink: str = "", **kw ): ... def get_indexes( - self, connection, table_name, schema: Incomplete | None = ..., resolve_synonyms: bool = ..., dblink: str = ..., **kw + self, connection, table_name, schema: Incomplete | None = None, resolve_synonyms: bool = False, dblink: str = "", **kw ): ... - def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_unique_constraints(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... + def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_unique_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw): ... def get_view_definition( - self, connection, view_name, schema: Incomplete | None = ..., resolve_synonyms: bool = ..., dblink: str = ..., **kw + self, connection, view_name, schema: Incomplete | None = None, resolve_synonyms: bool = False, dblink: str = "", **kw + ): ... + def get_check_constraints( + self, connection, table_name, schema: Incomplete | None = None, include_all: bool = False, **kw ): ... - def get_check_constraints(self, connection, table_name, schema: Incomplete | None = ..., include_all: bool = ..., **kw): ... class _OuterJoinColumn(ClauseElement): __visit_name__: str diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/cx_oracle.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/cx_oracle.pyi index 3484c83e073d..1b755370b817 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/cx_oracle.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/oracle/cx_oracle.pyi @@ -100,12 +100,12 @@ class OracleDialect_cx_oracle(OracleDialect): cx_oracle_ver: Any def __init__( self, - auto_convert_lobs: bool = ..., - coerce_to_unicode: bool = ..., - coerce_to_decimal: bool = ..., - arraysize: int = ..., - encoding_errors: Incomplete | None = ..., - threaded: Incomplete | None = ..., + auto_convert_lobs: bool = True, + coerce_to_unicode: bool = True, + coerce_to_decimal: bool = True, + arraysize: int = 50, + encoding_errors: Incomplete | None = None, + threaded: Incomplete | None = None, **kwargs, ): ... @classmethod @@ -117,11 +117,11 @@ class OracleDialect_cx_oracle(OracleDialect): def create_connect_args(self, url): ... def is_disconnect(self, e, connection, cursor): ... def create_xid(self): ... - def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = ...) -> None: ... + def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... def do_begin_twophase(self, connection, xid) -> None: ... def do_prepare_twophase(self, connection, xid) -> None: ... - def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ... - def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ... + def do_rollback_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... + def do_commit_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... def do_set_input_sizes(self, cursor, list_of_tuples, context) -> None: ... def do_recover_twophase(self, connection) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/array.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/array.pyi index fe7c0e8bcb1d..834619c956c2 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/array.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/array.pyi @@ -14,7 +14,7 @@ class array(expression.ClauseList, expression.ColumnElement[_Any]): inherit_cache: bool type: _Any def __init__(self, clauses, **kw) -> None: ... - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... CONTAINS: _Any CONTAINED_BY: _Any @@ -31,7 +31,7 @@ class ARRAY(sqltypes.ARRAY): dimensions: _Any zero_indexes: _Any def __init__( - self, item_type, as_tuple: bool = ..., dimensions: Incomplete | None = ..., zero_indexes: bool = ... + self, item_type, as_tuple: bool = False, dimensions: Incomplete | None = None, zero_indexes: bool = False ) -> None: ... @property def hashable(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/asyncpg.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/asyncpg.pyi index dfe48e376662..a2894f2dc208 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/asyncpg.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/asyncpg.pyi @@ -87,12 +87,12 @@ class AsyncAdapt_asyncpg_cursor: rowcount: int def __init__(self, adapt_connection) -> None: ... def close(self) -> None: ... - def execute(self, operation, parameters: Incomplete | None = ...) -> None: ... + def execute(self, operation, parameters: Incomplete | None = None) -> None: ... def executemany(self, operation, seq_of_parameters): ... def setinputsizes(self, *inputsizes) -> None: ... def __iter__(self): ... def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = ...): ... + def fetchmany(self, size: Incomplete | None = None): ... def fetchall(self): ... class AsyncAdapt_asyncpg_ss_cursor(AsyncAdapt_asyncpg_cursor): @@ -102,7 +102,7 @@ class AsyncAdapt_asyncpg_ss_cursor(AsyncAdapt_asyncpg_cursor): def __aiter__(self): ... async def __anext__(self) -> None: ... def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = ...): ... + def fetchmany(self, size: Incomplete | None = None): ... def fetchall(self): ... def executemany(self, operation, seq_of_parameters) -> None: ... @@ -112,13 +112,13 @@ class AsyncAdapt_asyncpg_connection(AdaptedConnection): isolation_level: str readonly: bool deferrable: bool - def __init__(self, dbapi, connection, prepared_statement_cache_size: int = ...) -> None: ... + def __init__(self, dbapi, connection, prepared_statement_cache_size: int = 100) -> None: ... @property def autocommit(self): ... @autocommit.setter def autocommit(self, value) -> None: ... def set_isolation_level(self, level) -> None: ... - def cursor(self, server_side: bool = ...): ... + def cursor(self, server_side: bool = False): ... def rollback(self) -> None: ... def commit(self) -> None: ... def close(self) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/base.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/base.pyi index d72b1ed8d387..1d62398c2c28 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/base.pyi @@ -60,21 +60,21 @@ class REGCLASS(sqltypes.TypeEngine): class TIMESTAMP(sqltypes.TIMESTAMP): precision: Any - def __init__(self, timezone: bool = ..., precision: Incomplete | None = ...) -> None: ... + def __init__(self, timezone: bool = False, precision: Incomplete | None = None) -> None: ... class TIME(sqltypes.TIME): precision: Any - def __init__(self, timezone: bool = ..., precision: Incomplete | None = ...) -> None: ... + def __init__(self, timezone: bool = False, precision: Incomplete | None = None) -> None: ... class INTERVAL(sqltypes.NativeForEmulated, sqltypes._AbstractInterval): __visit_name__: str native: bool precision: Any fields: Any - def __init__(self, precision: Incomplete | None = ..., fields: Incomplete | None = ...) -> None: ... + def __init__(self, precision: Incomplete | None = None, fields: Incomplete | None = None) -> None: ... @classmethod def adapt_emulated_to_native(cls, interval, **kw): ... - def as_generic(self, allow_nulltype: bool = ...): ... + def as_generic(self, allow_nulltype: bool = False): ... @property def python_type(self): ... def coerce_compared_value(self, op, value): ... @@ -85,14 +85,14 @@ class BIT(sqltypes.TypeEngine): __visit_name__: str length: Any varying: Any - def __init__(self, length: Incomplete | None = ..., varying: bool = ...) -> None: ... + def __init__(self, length: Incomplete | None = None, varying: bool = False) -> None: ... PGBit = BIT class UUID(sqltypes.TypeEngine): __visit_name__: str as_uuid: Any - def __init__(self, as_uuid: bool = ...) -> None: ... + def __init__(self, as_uuid: bool = False) -> None: ... def coerce_compared_value(self, op, value): ... def bind_processor(self, dialect): ... def result_processor(self, dialect, coltype): ... @@ -108,17 +108,17 @@ class ENUM(sqltypes.NativeForEmulated, sqltypes.Enum): # type: ignore[misc] # def __init__(self, *enums, **kw) -> None: ... @classmethod def adapt_emulated_to_native(cls, impl, **kw): ... - def create(self, bind: Incomplete | None = ..., checkfirst: bool = ...) -> None: ... - def drop(self, bind: Incomplete | None = ..., checkfirst: bool = ...) -> None: ... + def create(self, bind: Incomplete | None = None, checkfirst: bool = True) -> None: ... + def drop(self, bind: Incomplete | None = None, checkfirst: bool = True) -> None: ... class EnumGenerator(DDLBase): checkfirst: Any - def __init__(self, dialect, connection, checkfirst: bool = ..., **kwargs) -> None: ... + def __init__(self, dialect, connection, checkfirst: bool = False, **kwargs) -> None: ... def visit_enum(self, enum) -> None: ... class EnumDropper(DDLBase): checkfirst: Any - def __init__(self, dialect, connection, checkfirst: bool = ..., **kwargs) -> None: ... + def __init__(self, dialect, connection, checkfirst: bool = False, **kwargs) -> None: ... def visit_enum(self, enum) -> None: ... class _ColonCast(elements.Cast): @@ -135,8 +135,8 @@ class PGCompiler(compiler.SQLCompiler): def visit_colon_cast(self, element, **kw): ... def visit_array(self, element, **kw): ... def visit_slice(self, element, **kw): ... - def visit_json_getitem_op_binary(self, binary, operator, _cast_applied: bool = ..., **kw): ... - def visit_json_path_getitem_op_binary(self, binary, operator, _cast_applied: bool = ..., **kw): ... + def visit_json_getitem_op_binary(self, binary, operator, _cast_applied: bool = False, **kw): ... + def visit_json_path_getitem_op_binary(self, binary, operator, _cast_applied: bool = False, **kw): ... def visit_getitem_binary(self, binary, operator, **kw): ... def visit_aggregate_order_by(self, element, **kw): ... def visit_match_op_binary(self, binary, operator, **kw): ... @@ -195,7 +195,7 @@ class PGTypeCompiler(compiler.GenericTypeCompiler): def visit_TSTZRANGE(self, type_, **kw): ... def visit_datetime(self, type_, **kw): ... def visit_enum(self, type_, **kw): ... - def visit_ENUM(self, type_, identifier_preparer: Incomplete | None = ..., **kw): ... + def visit_ENUM(self, type_, identifier_preparer: Incomplete | None = None, **kw): ... def visit_TIMESTAMP(self, type_, **kw): ... def visit_TIME(self, type_, **kw): ... def visit_INTERVAL(self, type_, **kw): ... @@ -207,13 +207,13 @@ class PGTypeCompiler(compiler.GenericTypeCompiler): class PGIdentifierPreparer(compiler.IdentifierPreparer): reserved_words: Any - def format_type(self, type_, use_schema: bool = ...): ... + def format_type(self, type_, use_schema: bool = True): ... class PGInspector(reflection.Inspector): - def get_table_oid(self, table_name, schema: Incomplete | None = ...): ... - def get_enums(self, schema: Incomplete | None = ...): ... - def get_foreign_table_names(self, schema: Incomplete | None = ...): ... - def get_view_names(self, schema: Incomplete | None = ..., include=...): ... + def get_table_oid(self, table_name, schema: Incomplete | None = None): ... + def get_enums(self, schema: Incomplete | None = None): ... + def get_foreign_table_names(self, schema: Incomplete | None = None): ... + def get_view_names(self, schema: Incomplete | None = None, include=("plain", "materialized")): ... class CreateEnumType(_CreateDropBase): __visit_name__: str @@ -273,9 +273,9 @@ class PGDialect(default.DefaultDialect): reflection_options: Any def __init__( self, - isolation_level: Incomplete | None = ..., - json_serializer: Incomplete | None = ..., - json_deserializer: Incomplete | None = ..., + isolation_level: Incomplete | None = None, + json_serializer: Incomplete | None = None, + json_deserializer: Incomplete | None = None, **kwargs, ) -> None: ... def initialize(self, connection) -> None: ... @@ -288,25 +288,25 @@ class PGDialect(default.DefaultDialect): def get_deferrable(self, connection) -> None: ... def do_begin_twophase(self, connection, xid) -> None: ... def do_prepare_twophase(self, connection, xid) -> None: ... - def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ... - def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ... + def do_rollback_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... + def do_commit_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... def do_recover_twophase(self, connection): ... def has_schema(self, connection, schema): ... - def has_table(self, connection, table_name, schema: Incomplete | None = ...): ... # type: ignore[override] - def has_sequence(self, connection, sequence_name, schema: Incomplete | None = ...): ... # type: ignore[override] - def has_type(self, connection, type_name, schema: Incomplete | None = ...): ... - def get_table_oid(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... + def has_table(self, connection, table_name, schema: Incomplete | None = None): ... # type: ignore[override] + def has_sequence(self, connection, sequence_name, schema: Incomplete | None = None): ... # type: ignore[override] + def has_type(self, connection, type_name, schema: Incomplete | None = None): ... + def get_table_oid(self, connection, table_name, schema: Incomplete | None = None, **kw): ... def get_schema_names(self, connection, **kw): ... - def get_table_names(self, connection, schema: Incomplete | None = ..., **kw): ... - def get_view_names(self, connection, schema: Incomplete | None = ..., include=..., **kw): ... - def get_sequence_names(self, connection, schema: Incomplete | None = ..., **kw): ... - def get_view_definition(self, connection, view_name, schema: Incomplete | None = ..., **kw): ... - def get_columns(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... + def get_table_names(self, connection, schema: Incomplete | None = None, **kw): ... + def get_view_names(self, connection, schema: Incomplete | None = None, include=("plain", "materialized"), **kw): ... + def get_sequence_names(self, connection, schema: Incomplete | None = None, **kw): ... + def get_view_definition(self, connection, view_name, schema: Incomplete | None = None, **kw): ... + def get_columns(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = None, **kw): ... def get_foreign_keys( - self, connection, table_name, schema: Incomplete | None = ..., postgresql_ignore_search_path: bool = ..., **kw + self, connection, table_name, schema: Incomplete | None = None, postgresql_ignore_search_path: bool = False, **kw ): ... def get_indexes(self, connection, table_name, schema, **kw): ... - def get_unique_constraints(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_table_comment(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_check_constraints(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... + def get_unique_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_table_comment(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_check_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/dml.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/dml.pyi index 9ddcfcce27dd..3a59fcef649c 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/dml.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/dml.pyi @@ -12,14 +12,17 @@ class Insert(StandardInsert): def excluded(self): ... def on_conflict_do_update( self, - constraint: Incomplete | None = ..., - index_elements: Incomplete | None = ..., - index_where: Incomplete | None = ..., - set_: Incomplete | None = ..., - where: Incomplete | None = ..., + constraint: Incomplete | None = None, + index_elements: Incomplete | None = None, + index_where: Incomplete | None = None, + set_: Incomplete | None = None, + where: Incomplete | None = None, ) -> None: ... def on_conflict_do_nothing( - self, constraint: Incomplete | None = ..., index_elements: Incomplete | None = ..., index_where: Incomplete | None = ... + self, + constraint: Incomplete | None = None, + index_elements: Incomplete | None = None, + index_where: Incomplete | None = None, ) -> None: ... insert: Any @@ -30,7 +33,10 @@ class OnConflictClause(ClauseElement): inferred_target_elements: Any inferred_target_whereclause: Any def __init__( - self, constraint: Incomplete | None = ..., index_elements: Incomplete | None = ..., index_where: Incomplete | None = ... + self, + constraint: Incomplete | None = None, + index_elements: Incomplete | None = None, + index_where: Incomplete | None = None, ) -> None: ... class OnConflictDoNothing(OnConflictClause): @@ -42,9 +48,9 @@ class OnConflictDoUpdate(OnConflictClause): update_whereclause: Any def __init__( self, - constraint: Incomplete | None = ..., - index_elements: Incomplete | None = ..., - index_where: Incomplete | None = ..., - set_: Incomplete | None = ..., - where: Incomplete | None = ..., + constraint: Incomplete | None = None, + index_elements: Incomplete | None = None, + index_where: Incomplete | None = None, + set_: Incomplete | None = None, + where: Incomplete | None = None, ) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/ext.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/ext.pyi index c9e682f0cf83..834e86264141 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/ext.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/ext.pyi @@ -11,7 +11,7 @@ class aggregate_order_by(expression.ColumnElement[Any]): type: Any order_by: Any def __init__(self, target, *order_by) -> None: ... - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... def get_children(self, **kwargs): ... class ExcludeConstraint(ColumnCollectionConstraint): diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/hstore.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/hstore.pyi index 3f37cdef1ac2..afb34111704a 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/hstore.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/hstore.pyi @@ -9,7 +9,7 @@ class HSTORE(sqltypes.Indexable, sqltypes.Concatenable, sqltypes.TypeEngine): __visit_name__: str hashable: bool text_type: Any - def __init__(self, text_type: Incomplete | None = ...) -> None: ... + def __init__(self, text_type: Incomplete | None = None) -> None: ... class Comparator(sqltypes.Indexable.Comparator[Any], sqltypes.Concatenable.Comparator[Any]): def has_key(self, other): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/json.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/json.pyi index 728842b883ea..7898fd46f203 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/json.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/json.pyi @@ -9,7 +9,7 @@ class JSONPathType(sqltypes.JSON.JSONPathType): class JSON(sqltypes.JSON): astext_type: Any - def __init__(self, none_as_null: bool = ..., astext_type: Incomplete | None = ...) -> None: ... + def __init__(self, none_as_null: bool = False, astext_type: Incomplete | None = None) -> None: ... class Comparator(sqltypes.JSON.Comparator): @property diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pg8000.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pg8000.pyi index d87f2c0b5725..dd8b31441599 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pg8000.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pg8000.pyi @@ -84,14 +84,14 @@ class ServerSideCursor: def rowcount(self): ... @property def description(self): ... - def execute(self, operation, args=..., stream: Incomplete | None = ...): ... + def execute(self, operation, args=(), stream: Incomplete | None = None): ... def executemany(self, operation, param_sets): ... def fetchone(self): ... - def fetchmany(self, num: Incomplete | None = ...): ... + def fetchmany(self, num: Incomplete | None = None): ... def fetchall(self): ... def close(self) -> None: ... def setinputsizes(self, *sizes) -> None: ... - def setoutputsize(self, size, column: Incomplete | None = ...) -> None: ... + def setoutputsize(self, size, column: Incomplete | None = None) -> None: ... class PGCompiler_pg8000(PGCompiler): def visit_mod_binary(self, binary, operator, **kw): ... @@ -113,7 +113,7 @@ class PGDialect_pg8000(PGDialect): description_encoding: Any colspecs: Any client_encoding: Any - def __init__(self, client_encoding: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, client_encoding: Incomplete | None = None, **kwargs) -> None: ... @classmethod def dbapi(cls): ... def create_connect_args(self, url): ... @@ -127,8 +127,8 @@ class PGDialect_pg8000(PGDialect): def do_set_input_sizes(self, cursor, list_of_tuples, context) -> None: ... def do_begin_twophase(self, connection, xid) -> None: ... def do_prepare_twophase(self, connection, xid) -> None: ... - def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ... - def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ... + def do_rollback_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... + def do_commit_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... def do_recover_twophase(self, connection): ... def on_connect(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/psycopg2.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/psycopg2.pyi index e94fb3e02e4b..a64d86f6d415 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/psycopg2.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/psycopg2.pyi @@ -70,13 +70,13 @@ class PGDialect_psycopg2(PGDialect): executemany_values_page_size: Any def __init__( self, - use_native_unicode: bool = ..., - client_encoding: Incomplete | None = ..., - use_native_hstore: bool = ..., - use_native_uuid: bool = ..., - executemany_mode: str = ..., - executemany_batch_page_size: int = ..., - executemany_values_page_size: int = ..., + use_native_unicode: bool = True, + client_encoding: Incomplete | None = None, + use_native_hstore: bool = True, + use_native_uuid: bool = True, + executemany_mode: str = "values_only", + executemany_batch_page_size: int = 100, + executemany_values_page_size: int = 1000, **kwargs, ) -> None: ... def initialize(self, connection) -> None: ... @@ -89,7 +89,7 @@ class PGDialect_psycopg2(PGDialect): def get_deferrable(self, connection): ... def do_ping(self, dbapi_connection): ... def on_connect(self): ... - def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = ...) -> None: ... + def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... def create_connect_args(self, url): ... def is_disconnect(self, e, connection, cursor): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/aiosqlite.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/aiosqlite.pyi index 8d48580c102a..a4c15cb91385 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/aiosqlite.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/aiosqlite.pyi @@ -14,12 +14,12 @@ class AsyncAdapt_aiosqlite_cursor: def __init__(self, adapt_connection) -> None: ... def close(self) -> None: ... lastrowid: int - def execute(self, operation, parameters: Incomplete | None = ...) -> None: ... + def execute(self, operation, parameters: Incomplete | None = None) -> None: ... def executemany(self, operation, seq_of_parameters) -> None: ... def setinputsizes(self, *inputsizes) -> None: ... def __iter__(self): ... def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = ...): ... + def fetchmany(self, size: Incomplete | None = None): ... def fetchall(self): ... class AsyncAdapt_aiosqlite_ss_cursor(AsyncAdapt_aiosqlite_cursor): @@ -27,7 +27,7 @@ class AsyncAdapt_aiosqlite_ss_cursor(AsyncAdapt_aiosqlite_cursor): def __init__(self, *arg, **kw) -> None: ... def close(self) -> None: ... def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = ...): ... + def fetchmany(self, size: Incomplete | None = None): ... def fetchall(self): ... class AsyncAdapt_aiosqlite_connection(AdaptedConnection): @@ -39,7 +39,7 @@ class AsyncAdapt_aiosqlite_connection(AdaptedConnection): @isolation_level.setter def isolation_level(self, value) -> None: ... def create_function(self, *args, **kw) -> None: ... - def cursor(self, server_side: bool = ...): ... + def cursor(self, server_side: bool = False): ... def execute(self, *args, **kw): ... def rollback(self) -> None: ... def commit(self) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/base.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/base.pyi index bb7d0c25efd7..3ade0d400569 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/base.pyi @@ -25,7 +25,7 @@ class _SQliteJson(JSON): def result_processor(self, dialect, coltype): ... class _DateTimeMixin: - def __init__(self, storage_format: Incomplete | None = ..., regexp: Incomplete | None = ..., **kw) -> None: ... + def __init__(self, storage_format: Incomplete | None = None, regexp: Incomplete | None = None, **kw) -> None: ... @property def format_is_text_affinity(self): ... def adapt(self, cls, **kw): ... @@ -78,7 +78,7 @@ class SQLiteDDLCompiler(compiler.DDLCompiler): def visit_column_check_constraint(self, constraint): ... def visit_foreign_key_constraint(self, constraint): ... def define_constraint_remote_table(self, constraint, table, preparer): ... - def visit_create_index(self, create, include_schema: bool = ..., include_table_schema: bool = ...): ... # type: ignore[override] + def visit_create_index(self, create, include_schema: bool = False, include_table_schema: bool = True): ... # type: ignore[override] def post_create_table(self, table): ... class SQLiteTypeCompiler(compiler.GenericTypeCompiler): @@ -117,27 +117,27 @@ class SQLiteDialect(default.DefaultDialect): native_datetime: Any def __init__( self, - isolation_level: Incomplete | None = ..., - native_datetime: bool = ..., - json_serializer: Incomplete | None = ..., - json_deserializer: Incomplete | None = ..., - _json_serializer: Incomplete | None = ..., - _json_deserializer: Incomplete | None = ..., + isolation_level: Incomplete | None = None, + native_datetime: bool = False, + json_serializer: Incomplete | None = None, + json_deserializer: Incomplete | None = None, + _json_serializer: Incomplete | None = None, + _json_deserializer: Incomplete | None = None, **kwargs, ) -> None: ... def set_isolation_level(self, connection, level) -> None: ... def get_isolation_level(self, connection): ... def on_connect(self): ... def get_schema_names(self, connection, **kw): ... - def get_table_names(self, connection, schema: Incomplete | None = ..., **kw): ... + def get_table_names(self, connection, schema: Incomplete | None = None, **kw): ... def get_temp_table_names(self, connection, **kw): ... def get_temp_view_names(self, connection, **kw): ... - def has_table(self, connection, table_name, schema: Incomplete | None = ...): ... # type: ignore[override] - def get_view_names(self, connection, schema: Incomplete | None = ..., **kw): ... - def get_view_definition(self, connection, view_name, schema: Incomplete | None = ..., **kw): ... - def get_columns(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_unique_constraints(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_check_constraints(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_indexes(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... + def has_table(self, connection, table_name, schema: Incomplete | None = None): ... # type: ignore[override] + def get_view_names(self, connection, schema: Incomplete | None = None, **kw): ... + def get_view_definition(self, connection, view_name, schema: Incomplete | None = None, **kw): ... + def get_columns(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_unique_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_check_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_indexes(self, connection, table_name, schema: Incomplete | None = None, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/dml.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/dml.pyi index da20b23ada4c..cfd505042a58 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/dml.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/dml.pyi @@ -12,12 +12,12 @@ class Insert(StandardInsert): def excluded(self): ... def on_conflict_do_update( self, - index_elements: Incomplete | None = ..., - index_where: Incomplete | None = ..., - set_: Incomplete | None = ..., - where: Incomplete | None = ..., + index_elements: Incomplete | None = None, + index_where: Incomplete | None = None, + set_: Incomplete | None = None, + where: Incomplete | None = None, ) -> None: ... - def on_conflict_do_nothing(self, index_elements: Incomplete | None = ..., index_where: Incomplete | None = ...) -> None: ... + def on_conflict_do_nothing(self, index_elements: Incomplete | None = None, index_where: Incomplete | None = None) -> None: ... insert: Any @@ -26,7 +26,7 @@ class OnConflictClause(ClauseElement): constraint_target: Any inferred_target_elements: Any inferred_target_whereclause: Any - def __init__(self, index_elements: Incomplete | None = ..., index_where: Incomplete | None = ...) -> None: ... + def __init__(self, index_elements: Incomplete | None = None, index_where: Incomplete | None = None) -> None: ... class OnConflictDoNothing(OnConflictClause): __visit_name__: str @@ -37,8 +37,8 @@ class OnConflictDoUpdate(OnConflictClause): update_whereclause: Any def __init__( self, - index_elements: Incomplete | None = ..., - index_where: Incomplete | None = ..., - set_: Incomplete | None = ..., - where: Incomplete | None = ..., + index_elements: Incomplete | None = None, + index_where: Incomplete | None = None, + set_: Incomplete | None = None, + where: Incomplete | None = None, ) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/base.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/base.pyi index f6a90151b558..cb1e7c17c800 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/base.pyi @@ -77,7 +77,7 @@ ischema_names: Any class SybaseInspector(reflection.Inspector): def __init__(self, conn) -> None: ... - def get_table_id(self, table_name, schema: Incomplete | None = ...): ... + def get_table_id(self, table_name, schema: Incomplete | None = None): ... class SybaseExecutionContext(default.DefaultExecutionContext): def set_ddl_autocommit(self, connection, value) -> None: ... @@ -124,13 +124,13 @@ class SybaseDialect(default.DefaultDialect): def __init__(self, *args, **kwargs) -> None: ... max_identifier_length: int def initialize(self, connection) -> None: ... - def get_table_id(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_columns(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_indexes(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... - def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = ..., **kw): ... + def get_table_id(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_columns(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_indexes(self, connection, table_name, schema: Incomplete | None = None, **kw): ... + def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = None, **kw): ... def get_schema_names(self, connection, **kw): ... - def get_table_names(self, connection, schema: Incomplete | None = ..., **kw): ... - def get_view_definition(self, connection, view_name, schema: Incomplete | None = ..., **kw): ... - def get_view_names(self, connection, schema: Incomplete | None = ..., **kw): ... - def has_table(self, connection, table_name, schema: Incomplete | None = ...): ... # type: ignore[override] + def get_table_names(self, connection, schema: Incomplete | None = None, **kw): ... + def get_view_definition(self, connection, view_name, schema: Incomplete | None = None, **kw): ... + def get_view_names(self, connection, schema: Incomplete | None = None, **kw): ... + def has_table(self, connection, table_name, schema: Incomplete | None = None): ... # type: ignore[override] diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pysybase.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pysybase.pyi index d0a7a81aa869..e88d8e6cef88 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pysybase.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pysybase.pyi @@ -22,7 +22,7 @@ class SybaseDialect_pysybase(SybaseDialect): @classmethod def dbapi(cls): ... def create_connect_args(self, url): ... - def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = ...) -> None: ... + def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... def is_disconnect(self, e, connection, cursor): ... dialect = SybaseDialect_pysybase diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/base.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/base.pyi index 9d7376520a9f..2b69e99d3378 100644 --- a/stubs/SQLAlchemy/sqlalchemy/engine/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/engine/base.pyi @@ -31,13 +31,13 @@ class Connection(Connectable): def __init__( self, engine: Engine, - connection: DBAPIConnection | None = ..., - close_with_result: bool = ..., - _branch_from: Incomplete | None = ..., - _execution_options: Incomplete | None = ..., - _dispatch: Incomplete | None = ..., - _has_events: Incomplete | None = ..., - _allow_revalidate: bool = ..., + connection: DBAPIConnection | None = None, + close_with_result: bool = False, + _branch_from: Incomplete | None = None, + _execution_options: Incomplete | None = None, + _dispatch: Incomplete | None = None, + _has_events: Incomplete | None = None, + _allow_revalidate: bool = True, ) -> None: ... def schema_for_object(self, obj) -> str | None: ... def __enter__(self) -> Self: ... @@ -57,15 +57,15 @@ class Connection(Connectable): def default_isolation_level(self): ... @property def info(self): ... - def connect(self, close_with_result: bool = ...): ... # type: ignore[override] - def invalidate(self, exception: Exception | None = ...) -> None: ... + def connect(self, close_with_result: bool = False): ... # type: ignore[override] + def invalidate(self, exception: Exception | None = None) -> None: ... def detach(self) -> None: ... def begin(self) -> Transaction: ... def begin_nested(self) -> Transaction | None: ... - def begin_twophase(self, xid: Incomplete | None = ...) -> TwoPhaseTransaction: ... + def begin_twophase(self, xid: Incomplete | None = None) -> TwoPhaseTransaction: ... def recover_twophase(self): ... - def rollback_prepared(self, xid, recover: bool = ...) -> None: ... - def commit_prepared(self, xid, recover: bool = ...) -> None: ... + def rollback_prepared(self, xid, recover: bool = False) -> None: ... + def commit_prepared(self, xid, recover: bool = False) -> None: ... def in_transaction(self) -> bool: ... def in_nested_transaction(self) -> bool: ... def get_transaction(self) -> Transaction | None: ... @@ -81,7 +81,7 @@ class Connection(Connectable): @overload def execute(self, statement: str, *multiparams: Any | tuple[Any, ...] | Mapping[str, Any], **params) -> CursorResult: ... def exec_driver_sql( - self, statement: str, parameters: Incomplete | None = ..., execution_options: Incomplete | None = ... + self, statement: str, parameters: Incomplete | None = None, execution_options: Incomplete | None = None ): ... def transaction(self, callable_: Callable[Concatenate[Connection, _P], _T], *args: _P.args, **kwargs: _P.kwargs) -> _T: ... def run_callable(self, callable_: Callable[Concatenate[Connection, _P], _T], *args: _P.args, **kwargs: _P.kwargs) -> _T: ... @@ -156,11 +156,11 @@ class Engine(Connectable, Identified): pool: Pool, dialect: Dialect, url: str | URL, - logging_name: str | None = ..., - echo: _EchoFlag = ..., - query_cache_size: int = ..., - execution_options: Mapping[str, Any] | None = ..., - hide_parameters: bool = ..., + logging_name: str | None = None, + echo: _EchoFlag = None, + query_cache_size: int = 500, + execution_options: Mapping[str, Any] | None = None, + hide_parameters: bool = False, ) -> None: ... @property def engine(self) -> Engine: ... @@ -172,7 +172,7 @@ class Engine(Connectable, Identified): def name(self) -> str: ... @property def driver(self): ... - def dispose(self, close: bool = ...) -> None: ... + def dispose(self, close: bool = True) -> None: ... class _trans_ctx: conn: Connection @@ -184,7 +184,7 @@ class Engine(Connectable, Identified): self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None ) -> None: ... - def begin(self, close_with_result: bool = ...) -> _trans_ctx: ... + def begin(self, close_with_result: bool = False) -> _trans_ctx: ... def transaction( self, callable_: Callable[Concatenate[Connection, _P], _T], *args: _P.args, **kwargs: _P.kwargs ) -> _T | None: ... @@ -197,10 +197,10 @@ class Engine(Connectable, Identified): def scalar(self, statement: _Executable, *multiparams: Mapping[str, Any], **params: Any) -> Any: ... @overload def scalar(self, statement: str, *multiparams: Any | tuple[Any, ...] | Mapping[str, Any], **params: Any) -> Any: ... - def connect(self, close_with_result: bool = ...) -> Connection: ... # type: ignore[override] - def table_names(self, schema: Incomplete | None = ..., connection: Connection | None = ...): ... - def has_table(self, table_name: str, schema: Incomplete | None = ...) -> bool: ... - def raw_connection(self, _connection: Connection | None = ...) -> DBAPIConnection: ... + def connect(self, close_with_result: bool = False) -> Connection: ... # type: ignore[override] + def table_names(self, schema: Incomplete | None = None, connection: Connection | None = None): ... + def has_table(self, table_name: str, schema: Incomplete | None = None) -> bool: ... + def raw_connection(self, _connection: Connection | None = None) -> DBAPIConnection: ... class OptionEngineMixin: url: URL diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/create.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/create.pyi index 97070a374a09..ae20f2002a80 100644 --- a/stubs/SQLAlchemy/sqlalchemy/engine/create.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/engine/create.pyi @@ -17,6 +17,6 @@ def create_engine( ) -> FutureEngine: ... @overload def create_engine( - url: URL | str, *, module: Incomplete | None = ..., enable_from_linting: bool = ..., future: Literal[False] = ..., **kwargs + url: URL | str, *, module: Incomplete | None = ..., enable_from_linting: bool = ..., future: Literal[False] = False, **kwargs ) -> Engine: ... -def engine_from_config(configuration: Mapping[str, Any], prefix: str = ..., **kwargs) -> Engine: ... +def engine_from_config(configuration: Mapping[str, Any], prefix: str = "sqlalchemy.", **kwargs) -> Engine: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/cursor.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/cursor.pyi index 76d0d369d6f7..7b67eba1f0a8 100644 --- a/stubs/SQLAlchemy/sqlalchemy/engine/cursor.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/engine/cursor.pyi @@ -26,16 +26,16 @@ class ResultFetchStrategy: def soft_close(self, result, dbapi_cursor) -> None: ... def hard_close(self, result, dbapi_cursor) -> None: ... def yield_per(self, result, dbapi_cursor, num) -> None: ... - def fetchone(self, result, dbapi_cursor, hard_close: bool = ...) -> None: ... - def fetchmany(self, result, dbapi_cursor, size: Incomplete | None = ...) -> None: ... + def fetchone(self, result, dbapi_cursor, hard_close: bool = False) -> None: ... + def fetchmany(self, result, dbapi_cursor, size: Incomplete | None = None) -> None: ... def fetchall(self, result) -> None: ... def handle_exception(self, result, dbapi_cursor, err) -> None: ... class NoCursorFetchStrategy(ResultFetchStrategy): def soft_close(self, result, dbapi_cursor) -> None: ... def hard_close(self, result, dbapi_cursor) -> None: ... - def fetchone(self, result, dbapi_cursor, hard_close: bool = ...): ... - def fetchmany(self, result, dbapi_cursor, size: Incomplete | None = ...): ... + def fetchone(self, result, dbapi_cursor, hard_close: bool = False): ... + def fetchmany(self, result, dbapi_cursor, size: Incomplete | None = None): ... def fetchall(self, result, dbapi_cursor): ... class NoCursorDQLFetchStrategy(NoCursorFetchStrategy): ... @@ -46,33 +46,33 @@ class CursorFetchStrategy(ResultFetchStrategy): def hard_close(self, result, dbapi_cursor) -> None: ... def handle_exception(self, result, dbapi_cursor, err) -> None: ... def yield_per(self, result, dbapi_cursor, num) -> None: ... - def fetchone(self, result, dbapi_cursor, hard_close: bool = ...): ... - def fetchmany(self, result, dbapi_cursor, size: Incomplete | None = ...): ... + def fetchone(self, result, dbapi_cursor, hard_close: bool = False): ... + def fetchmany(self, result, dbapi_cursor, size: Incomplete | None = None): ... def fetchall(self, result, dbapi_cursor): ... class BufferedRowCursorFetchStrategy(CursorFetchStrategy): def __init__( - self, dbapi_cursor, execution_options, growth_factor: int = ..., initial_buffer: Incomplete | None = ... + self, dbapi_cursor, execution_options, growth_factor: int = 5, initial_buffer: Incomplete | None = None ) -> None: ... @classmethod def create(cls, result): ... def yield_per(self, result, dbapi_cursor, num) -> None: ... def soft_close(self, result, dbapi_cursor) -> None: ... def hard_close(self, result, dbapi_cursor) -> None: ... - def fetchone(self, result, dbapi_cursor, hard_close: bool = ...): ... - def fetchmany(self, result, dbapi_cursor, size: Incomplete | None = ...): ... + def fetchone(self, result, dbapi_cursor, hard_close: bool = False): ... + def fetchmany(self, result, dbapi_cursor, size: Incomplete | None = None): ... def fetchall(self, result, dbapi_cursor): ... class FullyBufferedCursorFetchStrategy(CursorFetchStrategy): alternate_cursor_description: Any def __init__( - self, dbapi_cursor, alternate_description: Incomplete | None = ..., initial_buffer: Incomplete | None = ... + self, dbapi_cursor, alternate_description: Incomplete | None = None, initial_buffer: Incomplete | None = None ) -> None: ... def yield_per(self, result, dbapi_cursor, num) -> None: ... def soft_close(self, result, dbapi_cursor) -> None: ... def hard_close(self, result, dbapi_cursor) -> None: ... - def fetchone(self, result, dbapi_cursor, hard_close: bool = ...): ... - def fetchmany(self, result, dbapi_cursor, size: Incomplete | None = ...): ... + def fetchone(self, result, dbapi_cursor, hard_close: bool = False): ... + def fetchmany(self, result, dbapi_cursor, size: Incomplete | None = None): ... def fetchall(self, result, dbapi_cursor): ... class _NoResultMetaData(ResultMetaData): diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/default.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/default.pyi index fa725cb70d93..e7784485a074 100644 --- a/stubs/SQLAlchemy/sqlalchemy/engine/default.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/engine/default.pyi @@ -89,17 +89,17 @@ class DefaultDialect(interfaces.Dialect): # type: ignore[misc] compiler_linting: Any def __init__( self, - convert_unicode: bool = ..., - encoding: str = ..., - paramstyle: Incomplete | None = ..., - dbapi: Incomplete | None = ..., - implicit_returning: Incomplete | None = ..., - case_sensitive: bool = ..., - supports_native_boolean: Incomplete | None = ..., - max_identifier_length: Incomplete | None = ..., - label_length: Incomplete | None = ..., - compiler_linting=..., - server_side_cursors: bool = ..., + convert_unicode: bool = False, + encoding: str = "utf-8", + paramstyle: Incomplete | None = None, + dbapi: Incomplete | None = None, + implicit_returning: Incomplete | None = None, + case_sensitive: bool = True, + supports_native_boolean: Incomplete | None = None, + max_identifier_length: Incomplete | None = None, + label_length: Incomplete | None = None, + compiler_linting=0, + server_side_cursors: bool = False, **kwargs, ) -> None: ... @property @@ -116,7 +116,7 @@ class DefaultDialect(interfaces.Dialect): # type: ignore[misc] def on_connect(self) -> None: ... def get_default_isolation_level(self, dbapi_conn): ... def type_descriptor(self, typeobj): ... - def has_index(self, connection, table_name, index_name, schema: Incomplete | None = ...): ... + def has_index(self, connection, table_name, index_name, schema: Incomplete | None = None): ... def validate_identifier(self, ident) -> None: ... def connect(self, *cargs, **cparams): ... def create_connect_args(self, url): ... @@ -131,9 +131,9 @@ class DefaultDialect(interfaces.Dialect): # type: ignore[misc] def do_savepoint(self, connection, name) -> None: ... def do_rollback_to_savepoint(self, connection, name) -> None: ... def do_release_savepoint(self, connection, name) -> None: ... - def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = ...) -> None: ... - def do_execute(self, cursor, statement, parameters, context: Incomplete | None = ...) -> None: ... - def do_execute_no_params(self, cursor, statement, context: Incomplete | None = ...) -> None: ... # type: ignore[override] + def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... + def do_execute(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... + def do_execute_no_params(self, cursor, statement, context: Incomplete | None = None) -> None: ... # type: ignore[override] def is_disconnect(self, e, connection, cursor): ... def reset_isolation_level(self, dbapi_conn) -> None: ... def normalize_name(self, name): ... @@ -216,6 +216,6 @@ class DefaultExecutionContext(interfaces.ExecutionContext): def inserted_primary_key_rows(self): ... def lastrow_has_defaults(self): ... current_parameters: Any - def get_current_parameters(self, isolate_multiinsert_groups: bool = ...): ... + def get_current_parameters(self, isolate_multiinsert_groups: bool = True): ... def get_insert_default(self, column): ... def get_update_default(self, column): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/interfaces.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/interfaces.pyi index 7b6eac7d8ff0..3b4412abe499 100644 --- a/stubs/SQLAlchemy/sqlalchemy/engine/interfaces.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/engine/interfaces.pyi @@ -54,24 +54,24 @@ class Dialect: # as abstract. @classmethod def type_descriptor(cls, typeobj) -> None: ... - def get_columns(self, connection, table_name, schema: Incomplete | None = ..., **kw) -> None: ... - def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = ..., **kw) -> None: ... - def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = ..., **kw) -> None: ... - def get_table_names(self, connection, schema: Incomplete | None = ..., **kw) -> None: ... - def get_temp_table_names(self, connection, schema: Incomplete | None = ..., **kw) -> None: ... - def get_view_names(self, connection, schema: Incomplete | None = ..., **kw) -> None: ... - def get_sequence_names(self, connection, schema: Incomplete | None = ..., **kw) -> None: ... - def get_temp_view_names(self, connection, schema: Incomplete | None = ..., **kw) -> None: ... - def get_view_definition(self, connection, view_name, schema: Incomplete | None = ..., **kw) -> None: ... - def get_indexes(self, connection, table_name, schema: Incomplete | None = ..., **kw) -> None: ... - def get_unique_constraints(self, connection, table_name, schema: Incomplete | None = ..., **kw) -> None: ... - def get_check_constraints(self, connection, table_name, schema: Incomplete | None = ..., **kw) -> None: ... - def get_table_comment(self, connection, table_name, schema: Incomplete | None = ..., **kw) -> None: ... + def get_columns(self, connection, table_name, schema: Incomplete | None = None, **kw) -> None: ... + def get_pk_constraint(self, connection, table_name, schema: Incomplete | None = None, **kw) -> None: ... + def get_foreign_keys(self, connection, table_name, schema: Incomplete | None = None, **kw) -> None: ... + def get_table_names(self, connection, schema: Incomplete | None = None, **kw) -> None: ... + def get_temp_table_names(self, connection, schema: Incomplete | None = None, **kw) -> None: ... + def get_view_names(self, connection, schema: Incomplete | None = None, **kw) -> None: ... + def get_sequence_names(self, connection, schema: Incomplete | None = None, **kw) -> None: ... + def get_temp_view_names(self, connection, schema: Incomplete | None = None, **kw) -> None: ... + def get_view_definition(self, connection, view_name, schema: Incomplete | None = None, **kw) -> None: ... + def get_indexes(self, connection, table_name, schema: Incomplete | None = None, **kw) -> None: ... + def get_unique_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw) -> None: ... + def get_check_constraints(self, connection, table_name, schema: Incomplete | None = None, **kw) -> None: ... + def get_table_comment(self, connection, table_name, schema: Incomplete | None = None, **kw) -> None: ... def normalize_name(self, name) -> None: ... def denormalize_name(self, name) -> None: ... - def has_table(self, connection, table_name, schema: Incomplete | None = ..., **kw) -> None: ... - def has_index(self, connection, table_name, index_name, schema: Incomplete | None = ...) -> None: ... - def has_sequence(self, connection, sequence_name, schema: Incomplete | None = ..., **kw) -> None: ... + def has_table(self, connection, table_name, schema: Incomplete | None = None, **kw) -> None: ... + def has_index(self, connection, table_name, index_name, schema: Incomplete | None = None) -> None: ... + def has_sequence(self, connection, sequence_name, schema: Incomplete | None = None, **kw) -> None: ... def do_begin(self, dbapi_connection) -> None: ... def do_rollback(self, dbapi_connection) -> None: ... def do_commit(self, dbapi_connection) -> None: ... @@ -83,12 +83,12 @@ class Dialect: def do_release_savepoint(self, connection, name) -> None: ... def do_begin_twophase(self, connection, xid) -> None: ... def do_prepare_twophase(self, connection, xid) -> None: ... - def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ... - def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ... + def do_rollback_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... + def do_commit_twophase(self, connection, xid, is_prepared: bool = True, recover: bool = False) -> None: ... def do_recover_twophase(self, connection) -> None: ... - def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = ...) -> None: ... - def do_execute(self, cursor, statement, parameters, context: Incomplete | None = ...) -> None: ... - def do_execute_no_params(self, cursor, statement, parameters, context: Incomplete | None = ...) -> None: ... + def do_executemany(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... + def do_execute(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... + def do_execute_no_params(self, cursor, statement, parameters, context: Incomplete | None = None) -> None: ... def is_disconnect(self, e, connection, cursor) -> None: ... def connect(self, *cargs, **cparams) -> DBAPIConnection: ... def reset_isolation_level(self, dbapi_conn) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/reflection.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/reflection.pyi index 350ba42ee0df..242cf7868d78 100644 --- a/stubs/SQLAlchemy/sqlalchemy/engine/reflection.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/engine/reflection.pyi @@ -9,24 +9,24 @@ class Inspector: @property def default_schema_name(self): ... def get_schema_names(self): ... - def get_table_names(self, schema: Incomplete | None = ...): ... - def has_table(self, table_name, schema: Incomplete | None = ...): ... - def has_sequence(self, sequence_name, schema: Incomplete | None = ...): ... - def get_sorted_table_and_fkc_names(self, schema: Incomplete | None = ...): ... + def get_table_names(self, schema: Incomplete | None = None): ... + def has_table(self, table_name, schema: Incomplete | None = None): ... + def has_sequence(self, sequence_name, schema: Incomplete | None = None): ... + def get_sorted_table_and_fkc_names(self, schema: Incomplete | None = None): ... def get_temp_table_names(self): ... def get_temp_view_names(self): ... - def get_table_options(self, table_name, schema: Incomplete | None = ..., **kw): ... - def get_view_names(self, schema: Incomplete | None = ...): ... - def get_sequence_names(self, schema: Incomplete | None = ...): ... - def get_view_definition(self, view_name, schema: Incomplete | None = ...): ... - def get_columns(self, table_name, schema: Incomplete | None = ..., **kw): ... - def get_pk_constraint(self, table_name, schema: Incomplete | None = ..., **kw): ... - def get_foreign_keys(self, table_name, schema: Incomplete | None = ..., **kw): ... - def get_indexes(self, table_name, schema: Incomplete | None = ..., **kw): ... - def get_unique_constraints(self, table_name, schema: Incomplete | None = ..., **kw): ... - def get_table_comment(self, table_name, schema: Incomplete | None = ..., **kw): ... - def get_check_constraints(self, table_name, schema: Incomplete | None = ..., **kw): ... + def get_table_options(self, table_name, schema: Incomplete | None = None, **kw): ... + def get_view_names(self, schema: Incomplete | None = None): ... + def get_sequence_names(self, schema: Incomplete | None = None): ... + def get_view_definition(self, view_name, schema: Incomplete | None = None): ... + def get_columns(self, table_name, schema: Incomplete | None = None, **kw): ... + def get_pk_constraint(self, table_name, schema: Incomplete | None = None, **kw): ... + def get_foreign_keys(self, table_name, schema: Incomplete | None = None, **kw): ... + def get_indexes(self, table_name, schema: Incomplete | None = None, **kw): ... + def get_unique_constraints(self, table_name, schema: Incomplete | None = None, **kw): ... + def get_table_comment(self, table_name, schema: Incomplete | None = None, **kw): ... + def get_check_constraints(self, table_name, schema: Incomplete | None = None, **kw): ... def reflecttable(self, *args, **kwargs): ... def reflect_table( - self, table, include_columns, exclude_columns=..., resolve_fks: bool = ..., _extend_on: Incomplete | None = ... + self, table, include_columns, exclude_columns=(), resolve_fks: bool = True, _extend_on: Incomplete | None = None ) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/result.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/result.pyi index 7328eb5e2f4f..9500d7a11231 100644 --- a/stubs/SQLAlchemy/sqlalchemy/engine/result.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/engine/result.pyi @@ -22,14 +22,14 @@ class SimpleResultMetaData(ResultMetaData): def __init__( self, keys, - extra: Incomplete | None = ..., - _processors: Incomplete | None = ..., - _tuplefilter: Incomplete | None = ..., - _translated_indexes: Incomplete | None = ..., - _unique_filters: Incomplete | None = ..., + extra: Incomplete | None = None, + _processors: Incomplete | None = None, + _tuplefilter: Incomplete | None = None, + _translated_indexes: Incomplete | None = None, + _unique_filters: Incomplete | None = None, ) -> None: ... -def result_tuple(fields, extra: Incomplete | None = ...): ... +def result_tuple(fields, extra: Incomplete | None = None): ... class ResultInternal(InPlaceGenerative): ... @@ -40,16 +40,16 @@ class Result(_WithKeys, ResultInternal): def __init__(self, cursor_metadata) -> None: ... def close(self) -> None: ... def yield_per(self, num: int) -> Self: ... - def unique(self, strategy: Incomplete | None = ...) -> Self: ... + def unique(self, strategy: Incomplete | None = None) -> Self: ... def columns(self, *col_expressions): ... - def scalars(self, index: int = ...) -> ScalarResult: ... + def scalars(self, index: int = 0) -> ScalarResult: ... def mappings(self) -> MappingResult: ... def __iter__(self): ... def __next__(self): ... - def partitions(self, size: int | None = ...) -> Generator[list[Row], None, None]: ... + def partitions(self, size: int | None = None) -> Generator[list[Row], None, None]: ... def fetchall(self) -> list[Row]: ... def fetchone(self) -> Row | None: ... - def fetchmany(self, size: int | None = ...) -> list[Row]: ... + def fetchmany(self, size: int | None = None) -> list[Row]: ... def all(self) -> list[Row]: ... def first(self) -> Row | None: ... def one_or_none(self) -> Row | None: ... @@ -64,10 +64,10 @@ class FilterResult(ResultInternal): ... class ScalarResult(FilterResult): def __init__(self, real_result, index) -> None: ... - def unique(self, strategy: Incomplete | None = ...): ... - def partitions(self, size: Incomplete | None = ...) -> None: ... + def unique(self, strategy: Incomplete | None = None): ... + def partitions(self, size: Incomplete | None = None) -> None: ... def fetchall(self): ... - def fetchmany(self, size: Incomplete | None = ...): ... + def fetchmany(self, size: Incomplete | None = None): ... def all(self): ... def __iter__(self): ... def __next__(self): ... @@ -77,12 +77,12 @@ class ScalarResult(FilterResult): class MappingResult(_WithKeys, FilterResult): def __init__(self, result) -> None: ... - def unique(self, strategy: Incomplete | None = ...): ... + def unique(self, strategy: Incomplete | None = None): ... def columns(self, *col_expressions): ... - def partitions(self, size: Incomplete | None = ...) -> None: ... + def partitions(self, size: Incomplete | None = None) -> None: ... def fetchall(self): ... def fetchone(self): ... - def fetchmany(self, size: Incomplete | None = ...): ... + def fetchmany(self, size: Incomplete | None = None): ... def all(self): ... def __iter__(self): ... def __next__(self): ... @@ -101,7 +101,9 @@ class FrozenResult: class IteratorResult(Result): iterator: Any raw: Any - def __init__(self, cursor_metadata, iterator, raw: Incomplete | None = ..., _source_supports_scalars: bool = ...) -> None: ... + def __init__( + self, cursor_metadata, iterator, raw: Incomplete | None = None, _source_supports_scalars: bool = False + ) -> None: ... def null_result() -> IteratorResult: ... @@ -114,9 +116,9 @@ class ChunkedIteratorResult(IteratorResult): self, cursor_metadata, chunks, - source_supports_scalars: bool = ..., - raw: Incomplete | None = ..., - dynamic_yield_per: bool = ..., + source_supports_scalars: bool = False, + raw: Incomplete | None = None, + dynamic_yield_per: bool = False, ) -> None: ... class MergedResult(IteratorResult): diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/url.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/url.pyi index 6d42811133bd..0f2bfda2ea58 100644 --- a/stubs/SQLAlchemy/sqlalchemy/engine/url.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/engine/url.pyi @@ -26,31 +26,31 @@ class URL(_URLTuple): def create( cls, drivername: str, - username: str | None = ..., + username: str | None = None, password: str | _PasswordObject | None = None, - host: str | None = ..., - port: int | None = ..., - database: str | None = ..., + host: str | None = None, + port: int | None = None, + database: str | None = None, query: _Query | None = ..., ) -> URL: ... def set( self, - drivername: str | None = ..., - username: str | None = ..., + drivername: str | None = None, + username: str | None = None, password: str | _PasswordObject | None = None, - host: str | None = ..., - port: int | None = ..., - database: str | None = ..., - query: _Query | None = ..., + host: str | None = None, + port: int | None = None, + database: str | None = None, + query: _Query | None = None, ) -> Self: ... - def update_query_string(self, query_string: str, append: bool = ...) -> Self: ... - def update_query_pairs(self, key_value_pairs: Iterable[tuple[str, str]], append: bool = ...) -> Self: ... - def update_query_dict(self, query_parameters: SupportsItems[str, str | Sequence[str]], append: bool = ...) -> Self: ... + def update_query_string(self, query_string: str, append: bool = False) -> Self: ... + def update_query_pairs(self, key_value_pairs: Iterable[tuple[str, str]], append: bool = False) -> Self: ... + def update_query_dict(self, query_parameters: SupportsItems[str, str | Sequence[str]], append: bool = False) -> Self: ... def difference_update_query(self, names: Iterable[str]) -> URL: ... @property def normalized_query(self) -> immutabledict[str, tuple[str, ...]]: ... - def __to_string__(self, hide_password: bool = ...) -> str: ... - def render_as_string(self, hide_password: bool = ...) -> str: ... + def __to_string__(self, hide_password: bool = True) -> str: ... + def render_as_string(self, hide_password: bool = True) -> str: ... def __copy__(self) -> Self: ... def __deepcopy__(self, memo: Unused) -> Self: ... def __hash__(self) -> int: ... @@ -59,6 +59,6 @@ class URL(_URLTuple): def get_backend_name(self) -> str: ... def get_driver_name(self) -> str: ... def get_dialect(self) -> type[Dialect]: ... - def translate_connect_args(self, names: list[str] | None = ..., **kw: str) -> dict[str, Any]: ... + def translate_connect_args(self, names: list[str] | None = None, **kw: str) -> dict[str, Any]: ... def make_url(name_or_url: str | URL) -> URL: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/event/base.pyi b/stubs/SQLAlchemy/sqlalchemy/event/base.pyi index 9b1341c166e8..b3780d27b122 100644 --- a/stubs/SQLAlchemy/sqlalchemy/event/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/event/base.pyi @@ -5,7 +5,7 @@ class _UnpickleDispatch: def __call__(self, _instance_cls): ... class _Dispatch: - def __init__(self, parent, instance_cls: Incomplete | None = ...) -> None: ... + def __init__(self, parent, instance_cls: Incomplete | None = None) -> None: ... def __getattr__(self, name: str): ... def __reduce__(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/event/registry.pyi b/stubs/SQLAlchemy/sqlalchemy/event/registry.pyi index f513b9664f50..616d3d784803 100644 --- a/stubs/SQLAlchemy/sqlalchemy/event/registry.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/event/registry.pyi @@ -8,14 +8,19 @@ class _EventKey: fn_key: Any fn_wrap: Any dispatch_target: Any - def __init__(self, target, identifier, fn, dispatch_target, _fn_wrap: Incomplete | None = ...) -> None: ... + def __init__(self, target, identifier, fn, dispatch_target, _fn_wrap: Incomplete | None = None) -> None: ... def with_wrapper(self, fn_wrap): ... def with_dispatch_target(self, dispatch_target): ... def listen(self, *args, **kw) -> None: ... def remove(self) -> None: ... def contains(self): ... def base_listen( - self, propagate: bool = ..., insert: bool = ..., named: bool = ..., retval: Incomplete | None = ..., asyncio: bool = ... + self, + propagate: bool = False, + insert: bool = False, + named: bool = False, + retval: Incomplete | None = None, + asyncio: bool = False, ) -> None: ... def append_to_list(self, owner, list_): ... def remove_from_list(self, owner, list_) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/exc.pyi b/stubs/SQLAlchemy/sqlalchemy/exc.pyi index 30dba09fc49b..876de1270d83 100644 --- a/stubs/SQLAlchemy/sqlalchemy/exc.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/exc.pyi @@ -22,7 +22,7 @@ class AmbiguousForeignKeysError(ArgumentError): ... class CircularDependencyError(SQLAlchemyError): cycles: Any edges: Any - def __init__(self, message, cycles, edges, msg: Incomplete | None = ..., code: Incomplete | None = ...) -> None: ... + def __init__(self, message, cycles, edges, msg: Incomplete | None = None, code: Incomplete | None = None) -> None: ... def __reduce__(self): ... class CompileError(SQLAlchemyError): ... @@ -32,7 +32,7 @@ class UnsupportedCompilationError(CompileError): compiler: Any element_type: Any message: str | None - def __init__(self, compiler, element_type, message: str | None = ...) -> None: ... + def __init__(self, compiler, element_type, message: str | None = None) -> None: ... def __reduce__(self): ... class IdentifierError(SQLAlchemyError): ... @@ -88,9 +88,9 @@ class StatementError(SQLAlchemyError): statement, params, orig, - hide_parameters: bool = ..., - code: Incomplete | None = ..., - ismulti: Incomplete | None = ..., + hide_parameters: bool = False, + code: Incomplete | None = None, + ismulti: Incomplete | None = None, ) -> None: ... def add_detail(self, msg) -> None: ... def __reduce__(self): ... @@ -104,10 +104,10 @@ class DBAPIError(StatementError): params, orig, dbapi_base_err, - hide_parameters: bool = ..., - connection_invalidated: bool = ..., - dialect: Incomplete | None = ..., - ismulti: Incomplete | None = ..., + hide_parameters: bool = False, + connection_invalidated: bool = False, + dialect: Incomplete | None = None, + ismulti: Incomplete | None = None, ): ... def __reduce__(self): ... connection_invalidated: Any @@ -116,10 +116,10 @@ class DBAPIError(StatementError): statement, params, orig, - hide_parameters: bool = ..., - connection_invalidated: bool = ..., - code: Incomplete | None = ..., - ismulti: Incomplete | None = ..., + hide_parameters: bool = False, + connection_invalidated: bool = False, + code: Incomplete | None = None, + ismulti: Incomplete | None = None, ) -> None: ... class InterfaceError(DBAPIError): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/associationproxy.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/associationproxy.pyi index d72c6d7ee574..f75244e2a0e3 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/associationproxy.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/associationproxy.pyi @@ -25,17 +25,17 @@ class AssociationProxy(interfaces.InspectionAttrInfo): self, target_collection, attr, - creator: Incomplete | None = ..., - getset_factory: Incomplete | None = ..., - proxy_factory: Incomplete | None = ..., - proxy_bulk_set: Incomplete | None = ..., - info: Incomplete | None = ..., - cascade_scalar_deletes: bool = ..., + creator: Incomplete | None = None, + getset_factory: Incomplete | None = None, + proxy_factory: Incomplete | None = None, + proxy_bulk_set: Incomplete | None = None, + info: Incomplete | None = None, + cascade_scalar_deletes: bool = False, ) -> None: ... def __get__(self, obj, class_): ... def __set__(self, obj, values) -> None: ... def __delete__(self, obj) -> None: ... - def for_class(self, class_, obj: Incomplete | None = ...): ... + def for_class(self, class_, obj: Incomplete | None = None): ... class AssociationProxyInstance: parent: Any @@ -62,15 +62,15 @@ class AssociationProxyInstance: def get(self, obj): ... def set(self, obj, values) -> None: ... def delete(self, obj) -> None: ... - def any(self, criterion: Incomplete | None = ..., **kwargs): ... - def has(self, criterion: Incomplete | None = ..., **kwargs): ... + def any(self, criterion: Incomplete | None = None, **kwargs): ... + def has(self, criterion: Incomplete | None = None, **kwargs): ... class AmbiguousAssociationProxyInstance(AssociationProxyInstance): def get(self, obj): ... def __eq__(self, obj): ... def __ne__(self, obj): ... - def any(self, criterion: Incomplete | None = ..., **kwargs) -> None: ... - def has(self, criterion: Incomplete | None = ..., **kwargs) -> None: ... + def any(self, criterion: Incomplete | None = None, **kwargs) -> None: ... + def has(self, criterion: Incomplete | None = None, **kwargs) -> None: ... class ObjectAssociationProxyInstance(AssociationProxyInstance): def contains(self, obj): ... @@ -113,7 +113,7 @@ class _AssociationList(_AssociationCollection): def count(self, value): ... def extend(self, values) -> None: ... def insert(self, index, value) -> None: ... - def pop(self, index: int = ...): ... + def pop(self, index: int = -1): ... def remove(self, value) -> None: ... def reverse(self) -> None: ... def sort(self) -> None: ... @@ -150,8 +150,8 @@ class _AssociationDict(_AssociationCollection): def __gt__(self, other): ... def __ge__(self, other): ... def __cmp__(self, other): ... - def get(self, key, default: Incomplete | None = ...): ... - def setdefault(self, key, default: Incomplete | None = ...): ... + def get(self, key, default: Incomplete | None = None): ... + def setdefault(self, key, default: Incomplete | None = None): ... def keys(self): ... def items(self): ... def values(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/base.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/base.pyi index 61f3579aecf8..5e1b2c263496 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/base.pyi @@ -5,7 +5,7 @@ class ReversibleProxy: ... class StartableContext(abc.ABC, metaclass=abc.ABCMeta): @abc.abstractmethod - async def start(self, is_ctxmanager: bool = ...): ... + async def start(self, is_ctxmanager: bool = False): ... def __await__(self): ... async def __aenter__(self): ... @abc.abstractmethod diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/engine.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/engine.pyi index 26538f549e98..15aa848485fa 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/engine.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/engine.pyi @@ -12,8 +12,8 @@ class AsyncConnection(ProxyComparable, StartableContext, AsyncConnectable): engine: Any sync_engine: Any sync_connection: Any - def __init__(self, async_engine, sync_connection: Incomplete | None = ...) -> None: ... - async def start(self, is_ctxmanager: bool = ...): ... + def __init__(self, async_engine, sync_connection: Incomplete | None = None) -> None: ... + async def start(self, is_ctxmanager: bool = False): ... @property def connection(self) -> None: ... async def get_raw_connection(self): ... @@ -21,7 +21,7 @@ class AsyncConnection(ProxyComparable, StartableContext, AsyncConnectable): def info(self): ... def begin(self): ... def begin_nested(self): ... - async def invalidate(self, exception: Incomplete | None = ...): ... + async def invalidate(self, exception: Incomplete | None = None): ... async def get_isolation_level(self): ... async def set_isolation_level(self): ... def in_transaction(self): ... @@ -32,12 +32,12 @@ class AsyncConnection(ProxyComparable, StartableContext, AsyncConnectable): async def commit(self) -> None: ... async def rollback(self) -> None: ... async def close(self) -> None: ... - async def exec_driver_sql(self, statement, parameters: Incomplete | None = ..., execution_options=...): ... - async def stream(self, statement, parameters: Incomplete | None = ..., execution_options=...): ... - async def execute(self, statement, parameters: Incomplete | None = ..., execution_options=...): ... - async def scalar(self, statement, parameters: Incomplete | None = ..., execution_options=...): ... - async def scalars(self, statement, parameters: Incomplete | None = ..., execution_options=...): ... - async def stream_scalars(self, statement, parameters: Incomplete | None = ..., execution_options=...): ... + async def exec_driver_sql(self, statement, parameters: Incomplete | None = None, execution_options=...): ... + async def stream(self, statement, parameters: Incomplete | None = None, execution_options=...): ... + async def execute(self, statement, parameters: Incomplete | None = None, execution_options=...): ... + async def scalar(self, statement, parameters: Incomplete | None = None, execution_options=...): ... + async def scalars(self, statement, parameters: Incomplete | None = None, execution_options=...): ... + async def stream_scalars(self, statement, parameters: Incomplete | None = None, execution_options=...): ... async def run_sync(self, fn, *arg, **kw): ... def __await__(self): ... async def __aexit__( @@ -57,7 +57,7 @@ class AsyncEngine(ProxyComparable, AsyncConnectable): conn: Any def __init__(self, conn) -> None: ... transaction: Any - async def start(self, is_ctxmanager: bool = ...): ... + async def start(self, is_ctxmanager: bool = False): ... async def __aexit__( self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None ) -> None: ... @@ -87,7 +87,7 @@ class AsyncTransaction(ProxyComparable, StartableContext): connection: Any sync_transaction: Any nested: Any - def __init__(self, connection, nested: bool = ...) -> None: ... + def __init__(self, connection, nested: bool = False) -> None: ... @property def is_valid(self): ... @property @@ -95,7 +95,7 @@ class AsyncTransaction(ProxyComparable, StartableContext): async def close(self) -> None: ... async def rollback(self) -> None: ... async def commit(self) -> None: ... - async def start(self, is_ctxmanager: bool = ...): ... + async def start(self, is_ctxmanager: bool = False): ... async def __aexit__( self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None ) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/result.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/result.pyi index 43a2a3b0b879..ee9864e0b182 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/result.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/result.pyi @@ -8,11 +8,11 @@ class AsyncCommon(FilterResult): class AsyncResult(AsyncCommon): def __init__(self, real_result) -> None: ... def keys(self): ... - def unique(self, strategy: Incomplete | None = ...): ... + def unique(self, strategy: Incomplete | None = None): ... def columns(self, *col_expressions): ... - async def partitions(self, size: Incomplete | None = ...) -> None: ... + async def partitions(self, size: Incomplete | None = None) -> None: ... async def fetchone(self): ... - async def fetchmany(self, size: Incomplete | None = ...): ... + async def fetchmany(self, size: Incomplete | None = None): ... async def all(self): ... def __aiter__(self): ... async def __anext__(self): ... @@ -23,15 +23,15 @@ class AsyncResult(AsyncCommon): async def one(self): ... async def scalar(self): ... async def freeze(self): ... - def scalars(self, index: int = ...): ... + def scalars(self, index: int = 0): ... def mappings(self): ... class AsyncScalarResult(AsyncCommon): def __init__(self, real_result, index) -> None: ... - def unique(self, strategy: Incomplete | None = ...): ... - async def partitions(self, size: Incomplete | None = ...) -> None: ... + def unique(self, strategy: Incomplete | None = None): ... + async def partitions(self, size: Incomplete | None = None) -> None: ... async def fetchall(self): ... - async def fetchmany(self, size: Incomplete | None = ...): ... + async def fetchmany(self, size: Incomplete | None = None): ... async def all(self): ... def __aiter__(self): ... async def __anext__(self): ... @@ -42,12 +42,12 @@ class AsyncScalarResult(AsyncCommon): class AsyncMappingResult(AsyncCommon): def __init__(self, result) -> None: ... def keys(self): ... - def unique(self, strategy: Incomplete | None = ...): ... + def unique(self, strategy: Incomplete | None = None): ... def columns(self, *col_expressions): ... - async def partitions(self, size: Incomplete | None = ...) -> None: ... + async def partitions(self, size: Incomplete | None = None) -> None: ... async def fetchall(self): ... async def fetchone(self): ... - async def fetchmany(self, size: Incomplete | None = ...): ... + async def fetchmany(self, size: Incomplete | None = None): ... async def all(self): ... def __aiter__(self): ... async def __anext__(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/scoping.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/scoping.pyi index a71390ced527..2d6557caff95 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/scoping.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/scoping.pyi @@ -21,7 +21,7 @@ class async_scoped_session(ScopedSessionMixin): autoflush: Any def __contains__(self, instance): ... def __iter__(self): ... - def add(self, instance, _warn: bool = ...) -> None: ... + def add(self, instance, _warn: bool = True) -> None: ... def add_all(self, instances) -> None: ... def begin(self, **kw): ... def begin_nested(self, **kw): ... @@ -30,38 +30,40 @@ class async_scoped_session(ScopedSessionMixin): async def connection(self, **kw): ... async def delete(self, instance): ... async def execute( - self, statement, params: Incomplete | None = ..., execution_options=..., bind_arguments: Incomplete | None = ..., **kw + self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw ): ... - def expire(self, instance, attribute_names: Incomplete | None = ...) -> None: ... + def expire(self, instance, attribute_names: Incomplete | None = None) -> None: ... def expire_all(self) -> None: ... def expunge(self, instance) -> None: ... def expunge_all(self) -> None: ... - async def flush(self, objects: Incomplete | None = ...) -> None: ... + async def flush(self, objects: Incomplete | None = None) -> None: ... async def get( self, entity, ident, - options: Incomplete | None = ..., - populate_existing: bool = ..., - with_for_update: Incomplete | None = ..., - identity_token: Incomplete | None = ..., + options: Incomplete | None = None, + populate_existing: bool = False, + with_for_update: Incomplete | None = None, + identity_token: Incomplete | None = None, ): ... - def get_bind(self, mapper: Incomplete | None = ..., clause: Incomplete | None = ..., bind: Incomplete | None = ..., **kw): ... - def is_modified(self, instance, include_collections: bool = ...): ... - async def merge(self, instance, load: bool = ..., options: Incomplete | None = ...): ... - async def refresh(self, instance, attribute_names: Incomplete | None = ..., with_for_update: Incomplete | None = ...): ... + def get_bind( + self, mapper: Incomplete | None = None, clause: Incomplete | None = None, bind: Incomplete | None = None, **kw + ): ... + def is_modified(self, instance, include_collections: bool = True): ... + async def merge(self, instance, load: bool = True, options: Incomplete | None = None): ... + async def refresh(self, instance, attribute_names: Incomplete | None = None, with_for_update: Incomplete | None = None): ... async def rollback(self): ... async def scalar( - self, statement, params: Incomplete | None = ..., execution_options=..., bind_arguments: Incomplete | None = ..., **kw + self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw ): ... async def scalars( - self, statement, params: Incomplete | None = ..., execution_options=..., bind_arguments: Incomplete | None = ..., **kw + self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw ): ... async def stream( - self, statement, params: Incomplete | None = ..., execution_options=..., bind_arguments: Incomplete | None = ..., **kw + self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw ): ... async def stream_scalars( - self, statement, params: Incomplete | None = ..., execution_options=..., bind_arguments: Incomplete | None = ..., **kw + self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw ): ... @property def dirty(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/session.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/session.pyi index 02e1e942fc4d..aefe03ad9ee2 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/session.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/session.pyi @@ -13,40 +13,42 @@ class AsyncSession(ReversibleProxy): sync_session_class: Any sync_session: Any def __init__( - self, bind: Incomplete | None = ..., binds: Incomplete | None = ..., sync_session_class: Incomplete | None = ..., **kw + self, bind: Incomplete | None = None, binds: Incomplete | None = None, sync_session_class: Incomplete | None = None, **kw ) -> None: ... - async def refresh(self, instance, attribute_names: Incomplete | None = ..., with_for_update: Incomplete | None = ...): ... + async def refresh(self, instance, attribute_names: Incomplete | None = None, with_for_update: Incomplete | None = None): ... async def run_sync(self, fn, *arg, **kw): ... async def execute( - self, statement, params: Incomplete | None = ..., execution_options=..., bind_arguments: Incomplete | None = ..., **kw + self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw ): ... async def scalar( - self, statement, params: Incomplete | None = ..., execution_options=..., bind_arguments: Incomplete | None = ..., **kw + self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw ): ... async def scalars( - self, statement, params: Incomplete | None = ..., execution_options=..., bind_arguments: Incomplete | None = ..., **kw + self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw ): ... async def get( self, entity, ident, - options: Incomplete | None = ..., - populate_existing: bool = ..., - with_for_update: Incomplete | None = ..., - identity_token: Incomplete | None = ..., + options: Incomplete | None = None, + populate_existing: bool = False, + with_for_update: Incomplete | None = None, + identity_token: Incomplete | None = None, ): ... async def stream( - self, statement, params: Incomplete | None = ..., execution_options=..., bind_arguments: Incomplete | None = ..., **kw + self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw ): ... async def stream_scalars( - self, statement, params: Incomplete | None = ..., execution_options=..., bind_arguments: Incomplete | None = ..., **kw + self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw ): ... async def delete(self, instance): ... - async def merge(self, instance, load: bool = ..., options: Incomplete | None = ...): ... - async def flush(self, objects: Incomplete | None = ...) -> None: ... + async def merge(self, instance, load: bool = True, options: Incomplete | None = None): ... + async def flush(self, objects: Incomplete | None = None) -> None: ... def get_transaction(self): ... def get_nested_transaction(self): ... - def get_bind(self, mapper: Incomplete | None = ..., clause: Incomplete | None = ..., bind: Incomplete | None = ..., **kw): ... + def get_bind( + self, mapper: Incomplete | None = None, clause: Incomplete | None = None, bind: Incomplete | None = None, **kw + ): ... async def connection(self, **kw): ... def begin(self, **kw): ... def begin_nested(self, **kw): ... @@ -68,13 +70,13 @@ class AsyncSession(ReversibleProxy): def object_session(cls, instance): ... def __contains__(self, instance): ... def __iter__(self): ... - def add(self, instance, _warn: bool = ...) -> None: ... + def add(self, instance, _warn: bool = True) -> None: ... def add_all(self, instances) -> None: ... - def expire(self, instance, attribute_names: Incomplete | None = ...) -> None: ... + def expire(self, instance, attribute_names: Incomplete | None = None) -> None: ... def expire_all(self) -> None: ... def expunge(self, instance) -> None: ... def expunge_all(self) -> None: ... - def is_modified(self, instance, include_collections: bool = ...): ... + def is_modified(self, instance, include_collections: bool = True): ... def in_transaction(self): ... def in_nested_transaction(self): ... @property @@ -103,12 +105,12 @@ class AsyncSessionTransaction(ReversibleProxy, StartableContext): session: Any nested: Any sync_transaction: Any - def __init__(self, session, nested: bool = ...) -> None: ... + def __init__(self, session, nested: bool = False) -> None: ... @property def is_active(self): ... async def rollback(self) -> None: ... async def commit(self) -> None: ... - async def start(self, is_ctxmanager: bool = ...): ... + async def start(self, is_ctxmanager: bool = False): ... async def __aexit__( self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None ) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/automap.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/automap.pyi index f17b2d3b60ae..47a5793cb398 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/automap.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/automap.pyi @@ -12,16 +12,16 @@ class AutomapBase: @classmethod def prepare( cls, - autoload_with: Incomplete | None = ..., - engine: Incomplete | None = ..., - reflect: bool = ..., - schema: Incomplete | None = ..., - classname_for_table: Incomplete | None = ..., - collection_class: Incomplete | None = ..., - name_for_scalar_relationship: Incomplete | None = ..., - name_for_collection_relationship: Incomplete | None = ..., - generate_relationship: Incomplete | None = ..., + autoload_with: Incomplete | None = None, + engine: Incomplete | None = None, + reflect: bool = False, + schema: Incomplete | None = None, + classname_for_table: Incomplete | None = None, + collection_class: Incomplete | None = None, + name_for_scalar_relationship: Incomplete | None = None, + name_for_collection_relationship: Incomplete | None = None, + generate_relationship: Incomplete | None = None, reflection_options=..., ) -> None: ... -def automap_base(declarative_base: Incomplete | None = ..., **kw): ... +def automap_base(declarative_base: Incomplete | None = None, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/baked.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/baked.pyi index 2cf3c3250ac0..250844a1d85f 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/baked.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/baked.pyi @@ -11,16 +11,16 @@ class Bakery: class BakedQuery: steps: Any - def __init__(self, bakery, initial_fn, args=...) -> None: ... + def __init__(self, bakery, initial_fn, args=()) -> None: ... @classmethod - def bakery(cls, size: int = ..., _size_alert: Incomplete | None = ...): ... + def bakery(cls, size: int = 200, _size_alert: Incomplete | None = None): ... def __iadd__(self, other): ... def __add__(self, other): ... def add_criteria(self, fn, *args): ... def with_criteria(self, fn, *args): ... def for_session(self, session): ... def __call__(self, session): ... - def spoil(self, full: bool = ...): ... + def spoil(self, full: bool = False): ... def to_query(self, query_or_session): ... class Result: diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/horizontal_shard.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/horizontal_shard.pyi index 08a80eb03bce..b8355d51ced1 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/horizontal_shard.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/horizontal_shard.pyi @@ -22,13 +22,13 @@ class ShardedSession(Session): self, shard_chooser, id_chooser, - execute_chooser: Incomplete | None = ..., - shards: Incomplete | None = ..., + execute_chooser: Incomplete | None = None, + shards: Incomplete | None = None, query_cls=..., **kwargs, ): ... def connection_callable( - self, mapper: Incomplete | None = ..., instance: Incomplete | None = ..., shard_id: Incomplete | None = ..., **kwargs + self, mapper: Incomplete | None = None, instance: Incomplete | None = None, shard_id: Incomplete | None = None, **kwargs ): ... - def get_bind(self, mapper: Incomplete | None = ..., shard_id: Incomplete | None = ..., instance: Incomplete | None = ..., clause: Incomplete | None = ..., **kw): ... # type: ignore[override] + def get_bind(self, mapper: Incomplete | None = None, shard_id: Incomplete | None = None, instance: Incomplete | None = None, clause: Incomplete | None = None, **kw): ... # type: ignore[override] def bind_shard(self, shard_id, bind) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/hybrid.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/hybrid.pyi index eda35d683c6e..d9d20108f4ab 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/hybrid.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/hybrid.pyi @@ -10,7 +10,7 @@ class hybrid_method(interfaces.InspectionAttrInfo): is_attribute: bool extension_type: Any func: Any - def __init__(self, func, expr: Incomplete | None = ...) -> None: ... + def __init__(self, func, expr: Incomplete | None = None) -> None: ... def __get__(self, instance, owner): ... expr: Any def expression(self, expr): ... @@ -27,11 +27,11 @@ class hybrid_property(interfaces.InspectionAttrInfo): def __init__( self, fget, - fset: Incomplete | None = ..., - fdel: Incomplete | None = ..., - expr: Incomplete | None = ..., - custom_comparator: Incomplete | None = ..., - update_expr: Incomplete | None = ..., + fset: Incomplete | None = None, + fdel: Incomplete | None = None, + expr: Incomplete | None = None, + custom_comparator: Incomplete | None = None, + update_expr: Incomplete | None = None, ) -> None: ... def __get__(self, instance, owner): ... def __set__(self, instance, value) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/indexable.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/indexable.pyi index 1178ebd4fff4..8d34ff0db8b8 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/indexable.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/indexable.pyi @@ -10,7 +10,7 @@ class index_property(hybrid_property): datatype: Any onebased: Any def __init__( - self, attr_name, index, default=..., datatype: Incomplete | None = ..., mutable: bool = ..., onebased: bool = ... + self, attr_name, index, default=..., datatype: Incomplete | None = None, mutable: bool = True, onebased: bool = True ): ... def fget(self, instance): ... def fset(self, instance, value) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/instrumentation.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/instrumentation.pyi index d054f2def40d..d88af6e40c01 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/instrumentation.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/instrumentation.pyi @@ -39,7 +39,7 @@ class _ClassInstrumentationAdapter(ClassManager): def manage(self) -> None: ... def unregister(self) -> None: ... def manager_getter(self): ... - def instrument_attribute(self, key, inst, propagated: bool = ...) -> None: ... + def instrument_attribute(self, key, inst, propagated: bool = False) -> None: ... def post_configure_attribute(self, key) -> None: ... def install_descriptor(self, key, inst) -> None: ... def uninstall_descriptor(self, key) -> None: ... @@ -47,8 +47,8 @@ class _ClassInstrumentationAdapter(ClassManager): def uninstall_member(self, key) -> None: ... def instrument_collection_class(self, key, collection_class): ... def initialize_collection(self, key, state, factory): ... - def new_instance(self, state: Incomplete | None = ...): ... - def setup_instance(self, instance, state: Incomplete | None = ...): ... + def new_instance(self, state: Incomplete | None = None): ... + def setup_instance(self, instance, state: Incomplete | None = None): ... def teardown_instance(self, instance) -> None: ... def has_state(self, instance): ... def state_getter(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/orderinglist.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/orderinglist.pyi index 7c86012baa48..bebca695be58 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/orderinglist.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/orderinglist.pyi @@ -1,20 +1,20 @@ from _typeshed import Incomplete from typing import Any -def ordering_list(attr, count_from: Incomplete | None = ..., **kw): ... +def ordering_list(attr, count_from: Incomplete | None = None, **kw): ... class OrderingList(list[Any]): ordering_attr: Any ordering_func: Any reorder_on_append: Any def __init__( - self, ordering_attr: Incomplete | None = ..., ordering_func: Incomplete | None = ..., reorder_on_append: bool = ... + self, ordering_attr: Incomplete | None = None, ordering_func: Incomplete | None = None, reorder_on_append: bool = False ) -> None: ... def reorder(self) -> None: ... def append(self, entity) -> None: ... def insert(self, index, entity) -> None: ... def remove(self, entity) -> None: ... - def pop(self, index: int = ...): ... # type: ignore[override] + def pop(self, index: int = -1): ... # type: ignore[override] def __setitem__(self, index, entity) -> None: ... def __delitem__(self, index) -> None: ... def __setslice__(self, start, end, values) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/serializer.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/serializer.pyi index 4177beb2f2e5..3584cf3ebd4c 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/serializer.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/serializer.pyi @@ -2,7 +2,9 @@ from _typeshed import Incomplete def Serializer(*args, **kw): ... def Deserializer( - file, metadata: Incomplete | None = ..., scoped_session: Incomplete | None = ..., engine: Incomplete | None = ... + file, metadata: Incomplete | None = None, scoped_session: Incomplete | None = None, engine: Incomplete | None = None +): ... +def dumps(obj, protocol=5): ... +def loads( + data, metadata: Incomplete | None = None, scoped_session: Incomplete | None = None, engine: Incomplete | None = None ): ... -def dumps(obj, protocol=...): ... -def loads(data, metadata: Incomplete | None = ..., scoped_session: Incomplete | None = ..., engine: Incomplete | None = ...): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/future/engine.pyi b/stubs/SQLAlchemy/sqlalchemy/future/engine.pyi index f1b3362d14dc..049185fd8048 100644 --- a/stubs/SQLAlchemy/sqlalchemy/future/engine.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/future/engine.pyi @@ -22,8 +22,8 @@ class Connection(_LegacyConnection): def commit(self) -> None: ... def rollback(self) -> None: ... def close(self) -> None: ... - def execute(self, statement, parameters: Incomplete | None = ..., execution_options: Incomplete | None = ...): ... # type: ignore[override] - def scalar(self, statement, parameters: Incomplete | None = ..., execution_options: Incomplete | None = ...): ... # type: ignore[override] + def execute(self, statement, parameters: Incomplete | None = None, execution_options: Incomplete | None = None): ... # type: ignore[override] + def scalar(self, statement, parameters: Incomplete | None = None, execution_options: Incomplete | None = None): ... # type: ignore[override] class Engine(_LegacyEngine): transaction: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/inspection.pyi b/stubs/SQLAlchemy/sqlalchemy/inspection.pyi index d758818c57fc..3e92030a6f5d 100644 --- a/stubs/SQLAlchemy/sqlalchemy/inspection.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/inspection.pyi @@ -1 +1 @@ -def inspect(subject, raiseerr: bool = ...): ... +def inspect(subject, raiseerr: bool = True): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/log.pyi b/stubs/SQLAlchemy/sqlalchemy/log.pyi index 98b20ef91797..2bb42e332f15 100644 --- a/stubs/SQLAlchemy/sqlalchemy/log.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/log.pyi @@ -28,7 +28,7 @@ class InstanceLogger: def isEnabledFor(self, level): ... def getEffectiveLevel(self): ... -def instance_logger(instance: Identified, echoflag: _EchoFlag = ...) -> None: ... +def instance_logger(instance: Identified, echoflag: _EchoFlag = None) -> None: ... class echo_property: __doc__: str diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/__init__.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/__init__.pyi index 6e32aa68bacf..a0ba4126d5fa 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/__init__.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/__init__.pyi @@ -85,7 +85,7 @@ from .util import ( with_polymorphic as with_polymorphic, ) -def create_session(bind: Incomplete | None = ..., **kwargs): ... +def create_session(bind: Incomplete | None = None, **kwargs): ... with_loader_criteria: Any relationship: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/attributes.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/attributes.pyi index c054153eef86..d181cf386d9c 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/attributes.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/attributes.pyi @@ -32,10 +32,10 @@ class QueryableAttribute( class_, key, parententity, - impl: Incomplete | None = ..., - comparator: Incomplete | None = ..., - of_type: Incomplete | None = ..., - extra_criteria=..., + impl: Incomplete | None = None, + comparator: Incomplete | None = None, + of_type: Incomplete | None = None, + extra_criteria=(), ) -> None: ... def __reduce__(self): ... def get_history(self, instance, passive=...): ... @@ -52,7 +52,7 @@ class QueryableAttribute( def label(self, name): ... def operate(self, op, *other, **kwargs): ... def reverse_operate(self, op, other, **kwargs): ... - def hasparent(self, state, optimistic: bool = ...): ... + def hasparent(self, state, optimistic: bool = False): ... def __getattr__(self, key: str): ... @memoized_property def property(self): ... @@ -112,17 +112,17 @@ class AttributeImpl: key, callable_, dispatch, - trackparent: bool = ..., - compare_function: Incomplete | None = ..., - active_history: bool = ..., - parent_token: Incomplete | None = ..., - load_on_unexpire: bool = ..., - send_modified_events: bool = ..., - accepts_scalar_loader: Incomplete | None = ..., + trackparent: bool = False, + compare_function: Incomplete | None = None, + active_history: bool = False, + parent_token: Incomplete | None = None, + load_on_unexpire: bool = True, + send_modified_events: bool = True, + accepts_scalar_loader: Incomplete | None = None, **kwargs, ) -> None: ... active_history: Any - def hasparent(self, state, optimistic: bool = ...): ... + def hasparent(self, state, optimistic: bool = False): ... def sethasparent(self, state, parent_state, value) -> None: ... def get_history(self, state, dict_, passive=...) -> None: ... def get_all_pending(self, state, dict_, passive=...) -> None: ... @@ -130,7 +130,9 @@ class AttributeImpl: def append(self, state, dict_, value, initiator, passive=...) -> None: ... def remove(self, state, dict_, value, initiator, passive=...) -> None: ... def pop(self, state, dict_, value, initiator, passive=...) -> None: ... - def set(self, state, dict_, value, initiator, passive=..., check_old: Incomplete | None = ..., pop: bool = ...) -> None: ... + def set( + self, state, dict_, value, initiator, passive=..., check_old: Incomplete | None = None, pop: bool = False + ) -> None: ... def get_committed_value(self, state, dict_, passive=...): ... def set_committed_value(self, state, dict_, value): ... @@ -143,7 +145,9 @@ class ScalarAttributeImpl(AttributeImpl): def __init__(self, *arg, **kw) -> None: ... def delete(self, state, dict_) -> None: ... def get_history(self, state, dict_, passive=...): ... - def set(self, state, dict_, value, initiator, passive=..., check_old: Incomplete | None = ..., pop: bool = ...) -> None: ... + def set( + self, state, dict_, value, initiator, passive=..., check_old: Incomplete | None = None, pop: bool = False + ) -> None: ... def fire_replace_event(self, state, dict_, value, previous, initiator): ... def fire_remove_event(self, state, dict_, value, initiator) -> None: ... @property @@ -157,7 +161,9 @@ class ScalarObjectAttributeImpl(ScalarAttributeImpl): def delete(self, state, dict_) -> None: ... def get_history(self, state, dict_, passive=...): ... def get_all_pending(self, state, dict_, passive=...): ... - def set(self, state, dict_, value, initiator, passive=..., check_old: Incomplete | None = ..., pop: bool = ...) -> None: ... + def set( + self, state, dict_, value, initiator, passive=..., check_old: Incomplete | None = None, pop: bool = False + ) -> None: ... def fire_remove_event(self, state, dict_, value, initiator) -> None: ... def fire_replace_event(self, state, dict_, value, previous, initiator): ... @@ -175,10 +181,10 @@ class CollectionAttributeImpl(AttributeImpl): key, callable_, dispatch, - typecallable: Incomplete | None = ..., - trackparent: bool = ..., - copy_function: Incomplete | None = ..., - compare_function: Incomplete | None = ..., + typecallable: Incomplete | None = None, + trackparent: bool = False, + copy_function: Incomplete | None = None, + compare_function: Incomplete | None = None, **kwargs, ) -> None: ... def get_history(self, state, dict_, passive=...): ... @@ -196,14 +202,14 @@ class CollectionAttributeImpl(AttributeImpl): state, dict_, value, - initiator: Incomplete | None = ..., + initiator: Incomplete | None = None, passive=..., - check_old: Incomplete | None = ..., - pop: bool = ..., - _adapt: bool = ..., + check_old: Incomplete | None = None, + pop: bool = False, + _adapt: bool = True, ) -> None: ... def set_committed_value(self, state, dict_, value): ... - def get_collection(self, state, dict_, user_data: Incomplete | None = ..., passive=...): ... + def get_collection(self, state, dict_, user_data: Incomplete | None = None, passive=...): ... def backref_listeners(attribute, key, uselist): ... @@ -227,26 +233,26 @@ HISTORY_BLANK: Any def get_history(obj, key, passive=...): ... def get_state_history(state, key, passive=...): ... -def has_parent(cls, obj, key, optimistic: bool = ...): ... +def has_parent(cls, obj, key, optimistic: bool = False): ... def register_attribute(class_, key, **kw): ... def register_attribute_impl( class_, key, - uselist: bool = ..., - callable_: Incomplete | None = ..., - useobject: bool = ..., - impl_class: Incomplete | None = ..., - backref: Incomplete | None = ..., + uselist: bool = False, + callable_: Incomplete | None = None, + useobject: bool = False, + impl_class: Incomplete | None = None, + backref: Incomplete | None = None, **kw, ): ... def register_descriptor( - class_, key, comparator: Incomplete | None = ..., parententity: Incomplete | None = ..., doc: Incomplete | None = ... + class_, key, comparator: Incomplete | None = None, parententity: Incomplete | None = None, doc: Incomplete | None = None ): ... def unregister_attribute(class_, key) -> None: ... def init_collection(obj, key): ... def init_state_collection(state, dict_, key): ... def set_committed_value(instance, key, value) -> None: ... -def set_attribute(instance, key, value, initiator: Incomplete | None = ...) -> None: ... +def set_attribute(instance, key, value, initiator: Incomplete | None = None) -> None: ... def get_attribute(instance, key): ... def del_attribute(instance, key) -> None: ... def flag_modified(instance, key) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/base.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/base.pyi index 4d247f53c726..d231d89d4505 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/base.pyi @@ -55,7 +55,7 @@ def _is_mapped_class(entity): ... _state_mapper: Any -def class_mapper(class_, configure: bool = ...): ... +def class_mapper(class_, configure: bool = True): ... class InspectionAttr: is_selectable: bool diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/clsregistry.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/clsregistry.pyi index b21f02a3a35f..129b82fbbc6f 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/clsregistry.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/clsregistry.pyi @@ -7,7 +7,7 @@ def remove_class(classname, cls, decl_class_registry) -> None: ... class _MultipleClassMarker: on_remove: Any contents: Any - def __init__(self, classes, on_remove: Incomplete | None = ...) -> None: ... + def __init__(self, classes, on_remove: Incomplete | None = None) -> None: ... def remove_item(self, cls) -> None: ... def __iter__(self): ... def attempt_get(self, path, key): ... @@ -48,5 +48,5 @@ class _class_resolver: arg: Any fallback: Any favor_tables: Any - def __init__(self, cls, prop, fallback, arg, favor_tables: bool = ...) -> None: ... + def __init__(self, cls, prop, fallback, arg, favor_tables: bool = False) -> None: ... def __call__(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/collections.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/collections.pyi index 0160b4919214..acfc63049d5e 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/collections.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/collections.pyi @@ -64,22 +64,22 @@ class CollectionAdapter: @property def data(self): ... def bulk_appender(self): ... - def append_with_event(self, item, initiator: Incomplete | None = ...) -> None: ... + def append_with_event(self, item, initiator: Incomplete | None = None) -> None: ... def append_without_event(self, item) -> None: ... def append_multiple_without_event(self, items) -> None: ... def bulk_remover(self): ... - def remove_with_event(self, item, initiator: Incomplete | None = ...) -> None: ... + def remove_with_event(self, item, initiator: Incomplete | None = None) -> None: ... def remove_without_event(self, item) -> None: ... - def clear_with_event(self, initiator: Incomplete | None = ...) -> None: ... + def clear_with_event(self, initiator: Incomplete | None = None) -> None: ... def clear_without_event(self) -> None: ... def __iter__(self): ... def __len__(self) -> int: ... def __bool__(self) -> bool: ... def __nonzero__(self) -> bool: ... - def fire_append_wo_mutation_event(self, item, initiator: Incomplete | None = ...): ... - def fire_append_event(self, item, initiator: Incomplete | None = ...): ... - def fire_remove_event(self, item, initiator: Incomplete | None = ...) -> None: ... - def fire_pre_remove_event(self, initiator: Incomplete | None = ...) -> None: ... + def fire_append_wo_mutation_event(self, item, initiator: Incomplete | None = None): ... + def fire_append_event(self, item, initiator: Incomplete | None = None): ... + def fire_remove_event(self, item, initiator: Incomplete | None = None) -> None: ... + def fire_pre_remove_event(self, initiator: Incomplete | None = None) -> None: ... class InstrumentedList(list[Any]): ... class InstrumentedSet(set[Any]): ... @@ -88,5 +88,5 @@ class InstrumentedDict(dict[Any, Any]): ... class MappedCollection(dict[Any, Any]): keyfunc: Any def __init__(self, keyfunc) -> None: ... - def set(self, value, _sa_initiator: Incomplete | None = ...) -> None: ... - def remove(self, value, _sa_initiator: Incomplete | None = ...) -> None: ... + def set(self, value, _sa_initiator: Incomplete | None = None) -> None: ... + def remove(self, value, _sa_initiator: Incomplete | None = None) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/context.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/context.pyi index 423eeb985552..7986198b21ec 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/context.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/context.pyi @@ -37,8 +37,8 @@ class QueryContext: params, session, load_options, - execution_options: Incomplete | None = ..., - bind_arguments: Incomplete | None = ..., + execution_options: Incomplete | None = None, + bind_arguments: Incomplete | None = None, ) -> None: ... class ORMCompileState(CompileState): @@ -142,8 +142,8 @@ class _BundleEntity(_QueryEntity): expr, entities_collection, is_current_entities: bool, - setup_entities: bool = ..., - parent_bundle: Incomplete | None = ..., + setup_entities: bool = True, + parent_bundle: Incomplete | None = None, ) -> None: ... @property def mapper(self): ... @@ -178,7 +178,7 @@ class _RawColumnEntity(_ColumnEntity): entities_collection, raw_column_index, is_current_entities: bool, - parent_bundle: Incomplete | None = ..., + parent_bundle: Incomplete | None = None, ) -> None: ... def corresponds_to(self, entity): ... def setup_compile_state(self, compile_state) -> None: ... @@ -200,7 +200,7 @@ class _ORMColumnEntity(_ColumnEntity): parententity, raw_column_index, is_current_entities: bool, - parent_bundle: Incomplete | None = ..., + parent_bundle: Incomplete | None = None, ) -> None: ... def corresponds_to(self, entity): ... def setup_compile_state(self, compile_state) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/decl_api.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/decl_api.pyi index dc181862a452..f36163478c45 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/decl_api.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/decl_api.pyi @@ -32,10 +32,10 @@ class DeclarativeMeta(type): def __setattr__(cls, key: str, value: Any) -> None: ... def __delattr__(cls, key: str) -> None: ... -def synonym_for(name, map_column: bool = ...): ... +def synonym_for(name, map_column: bool = False): ... class declared_attr(interfaces._MappedAttribute, property): - def __init__(self, fget, cascading: bool = ...) -> None: ... + def __init__(self, fget, cascading: bool = False) -> None: ... def __get__(self, self_, cls): ... @hybridproperty def cascading(self): ... @@ -48,23 +48,23 @@ class _stateful_declared_attr(declared_attr): def declarative_mixin(cls: _ClsT) -> _ClsT: ... @overload def declarative_base( - bind: Connectable | None = ..., - metadata: MetaData | None = ..., - mapper: Incomplete | None = ..., + bind: Connectable | None = None, + metadata: MetaData | None = None, + mapper: Incomplete | None = None, cls: type[Any] | tuple[type[Any], ...] = ..., - name: str = ..., + name: str = "Base", constructor: Callable[..., None] = ..., - class_registry: dict[str, type[Any]] | None = ..., + class_registry: dict[str, type[Any]] | None = None, ) -> type[_DeclarativeBase]: ... @overload def declarative_base( - bind: Connectable | None = ..., - metadata: MetaData | None = ..., - mapper: Incomplete | None = ..., + bind: Connectable | None = None, + metadata: MetaData | None = None, + mapper: Incomplete | None = None, cls: type[Any] | tuple[type[Any], ...] = ..., - name: str = ..., + name: str = "Base", constructor: Callable[..., None] = ..., - class_registry: dict[str, type[Any]] | None = ..., + class_registry: dict[str, type[Any]] | None = None, *, metaclass: _DeclarativeBaseMeta[_DeclT], ) -> _DeclT: ... @@ -85,25 +85,25 @@ class registry: constructor: Callable[..., None] def __init__( self, - metadata: MetaData | None = ..., - class_registry: dict[str, type[Any]] | None = ..., + metadata: MetaData | None = None, + class_registry: dict[str, type[Any]] | None = None, constructor: Callable[..., None] = ..., - _bind: Connectable | None = ..., + _bind: Connectable | None = None, ) -> None: ... @property def mappers(self) -> frozenset[Any]: ... - def configure(self, cascade: bool = ...) -> None: ... - def dispose(self, cascade: bool = ...) -> None: ... + def configure(self, cascade: bool = False) -> None: ... + def dispose(self, cascade: bool = False) -> None: ... @overload def generate_base( - self, mapper: Incomplete | None = ..., cls: type[Any] | tuple[type[Any], ...] = ..., name: str = ... + self, mapper: Incomplete | None = None, cls: type[Any] | tuple[type[Any], ...] = ..., name: str = "Base" ) -> type[_DeclarativeBase]: ... @overload def generate_base( self, - mapper: Incomplete | None = ..., + mapper: Incomplete | None = None, cls: type[Any] | tuple[type[Any], ...] = ..., - name: str = ..., + name: str = "Base", *, metaclass: _DeclarativeBaseMeta[_DeclT], ) -> _DeclT: ... @@ -125,7 +125,7 @@ class registry: self, *, mapper: Incomplete | None = ..., metaclass: _DeclarativeBaseMeta[_DeclT] ) -> Callable[[_ClsT], _ClsT | _DeclT | Any]: ... def map_declaratively(self, cls): ... - def map_imperatively(self, class_, local_table: Incomplete | None = ..., **kw): ... + def map_imperatively(self, class_, local_table: Incomplete | None = None, **kw): ... @overload def as_declarative( diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/decl_base.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/decl_base.pyi index 9d5dbf1c0723..7aab93cf9046 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/decl_base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/decl_base.pyi @@ -43,5 +43,5 @@ class _DeferredMapperConfig(_ClassScanMapperConfig): @classmethod def config_for_cls(cls, class_): ... @classmethod - def classes_for_base(cls, base_cls, sort: bool = ...): ... + def classes_for_base(cls, base_cls, sort: bool = True): ... def map(self, mapper_kw=...): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/descriptor_props.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/descriptor_props.pyi index f4e8b7930dd9..119d974fa940 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/descriptor_props.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/descriptor_props.pyi @@ -61,11 +61,11 @@ class SynonymProperty(DescriptorProperty): def __init__( self, name, - map_column: Incomplete | None = ..., - descriptor: Incomplete | None = ..., - comparator_factory: Incomplete | None = ..., - doc: Incomplete | None = ..., - info: Incomplete | None = ..., + map_column: Incomplete | None = None, + descriptor: Incomplete | None = None, + comparator_factory: Incomplete | None = None, + doc: Incomplete | None = None, + info: Incomplete | None = None, ) -> None: ... @property def uses_objects(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/dynamic.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/dynamic.pyi index 40193a48f6be..6008d1d9f04a 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/dynamic.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/dynamic.pyi @@ -21,22 +21,22 @@ class DynamicAttributeImpl(attributes.AttributeImpl): target_mapper: Any query_class: Any def __init__( - self, class_, key, typecallable, dispatch, target_mapper, order_by, query_class: Incomplete | None = ..., **kw + self, class_, key, typecallable, dispatch, target_mapper, order_by, query_class: Incomplete | None = None, **kw ) -> None: ... def get(self, state, dict_, passive=...): ... - def get_collection(self, state, dict_, user_data: Incomplete | None = ..., passive=...): ... - def fire_append_event(self, state, dict_, value, initiator, collection_history: Incomplete | None = ...) -> None: ... - def fire_remove_event(self, state, dict_, value, initiator, collection_history: Incomplete | None = ...) -> None: ... + def get_collection(self, state, dict_, user_data: Incomplete | None = None, passive=...): ... + def fire_append_event(self, state, dict_, value, initiator, collection_history: Incomplete | None = None) -> None: ... + def fire_remove_event(self, state, dict_, value, initiator, collection_history: Incomplete | None = None) -> None: ... def set( self, state, dict_, value, - initiator: Incomplete | None = ..., + initiator: Incomplete | None = None, passive=..., - check_old: Incomplete | None = ..., - pop: bool = ..., - _adapt: bool = ..., + check_old: Incomplete | None = None, + pop: bool = False, + _adapt: bool = True, ) -> None: ... def delete(self, *args, **kwargs) -> None: ... def set_committed_value(self, state, dict_, value) -> None: ... @@ -74,7 +74,7 @@ class CollectionHistory: unchanged_items: Any added_items: Any deleted_items: Any - def __init__(self, attr, state, apply_to: Incomplete | None = ...) -> None: ... + def __init__(self, attr, state, apply_to: Incomplete | None = None) -> None: ... @property def added_plus_unchanged(self): ... @property diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/evaluator.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/evaluator.pyi index 9091e9694c89..1e4cf1b01419 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/evaluator.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/evaluator.pyi @@ -11,7 +11,7 @@ class _NoObject(operators.ColumnOperators[Any]): class EvaluatorCompiler: target_cls: Any - def __init__(self, target_cls: Incomplete | None = ...) -> None: ... + def __init__(self, target_cls: Incomplete | None = None) -> None: ... def process(self, *clauses): ... def visit_grouping(self, clause): ... def visit_null(self, clause): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/exc.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/exc.pyi index 384ffdf114cb..b589abf2f489 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/exc.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/exc.pyi @@ -18,15 +18,15 @@ class DetachedInstanceError(sa_exc.SQLAlchemyError): code: str class UnmappedInstanceError(UnmappedError): - def __init__(self, obj, msg: Incomplete | None = ...) -> None: ... + def __init__(self, obj, msg: Incomplete | None = None) -> None: ... def __reduce__(self): ... class UnmappedClassError(UnmappedError): - def __init__(self, cls, msg: Incomplete | None = ...) -> None: ... + def __init__(self, cls, msg: Incomplete | None = None) -> None: ... def __reduce__(self): ... class ObjectDeletedError(sa_exc.InvalidRequestError): - def __init__(self, state, msg: Incomplete | None = ...) -> None: ... + def __init__(self, state, msg: Incomplete | None = None) -> None: ... def __reduce__(self): ... class UnmappedColumnError(sa_exc.InvalidRequestError): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/identity.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/identity.pyi index 062e91c0c095..59f767906eed 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/identity.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/identity.pyi @@ -10,7 +10,7 @@ class IdentityMap: def has_key(self, key): ... def popitem(self) -> None: ... def pop(self, key, *args) -> None: ... - def setdefault(self, key, default: Incomplete | None = ...) -> None: ... + def setdefault(self, key, default: Incomplete | None = None) -> None: ... def __len__(self) -> int: ... def copy(self) -> None: ... def __setitem__(self, key, value) -> None: ... @@ -22,7 +22,7 @@ class WeakInstanceDict(IdentityMap): def contains_state(self, state): ... def replace(self, state): ... def add(self, state): ... - def get(self, key, default: Incomplete | None = ...): ... + def get(self, key, default: Incomplete | None = None): ... def items(self): ... def values(self): ... def __iter__(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/instrumentation.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/instrumentation.pyi index 6c972cef57ad..cfdfa096db9d 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/instrumentation.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/instrumentation.pyi @@ -38,10 +38,10 @@ class ClassManager(HasMemoized, dict[Any, Any]): def state_getter(self): ... @hybridmethod def dict_getter(self): ... - def instrument_attribute(self, key, inst, propagated: bool = ...) -> None: ... + def instrument_attribute(self, key, inst, propagated: bool = False) -> None: ... def subclass_managers(self, recursive) -> None: ... def post_configure_attribute(self, key) -> None: ... - def uninstrument_attribute(self, key, propagated: bool = ...) -> None: ... + def uninstrument_attribute(self, key, propagated: bool = False) -> None: ... def unregister(self) -> None: ... def install_descriptor(self, key, inst) -> None: ... def uninstall_descriptor(self, key) -> None: ... @@ -49,15 +49,15 @@ class ClassManager(HasMemoized, dict[Any, Any]): def uninstall_member(self, key) -> None: ... def instrument_collection_class(self, key, collection_class): ... def initialize_collection(self, key, state, factory): ... - def is_instrumented(self, key, search: bool = ...): ... + def is_instrumented(self, key, search: bool = False): ... def get_impl(self, key): ... @property def attributes(self): ... - def new_instance(self, state: Incomplete | None = ...): ... - def setup_instance(self, instance, state: Incomplete | None = ...) -> None: ... + def new_instance(self, state: Incomplete | None = None): ... + def setup_instance(self, instance, state: Incomplete | None = None) -> None: ... def teardown_instance(self, instance) -> None: ... def has_state(self, instance): ... - def has_parent(self, state, key, optimistic: bool = ...): ... + def has_parent(self, state, key, optimistic: bool = False): ... def __bool__(self) -> bool: ... def __nonzero__(self) -> bool: ... @@ -77,12 +77,12 @@ manager_of_class = base.manager_of_class def register_class( class_, - finalize: bool = ..., - mapper: Incomplete | None = ..., - registry: Incomplete | None = ..., - declarative_scan: Incomplete | None = ..., - expired_attribute_loader: Incomplete | None = ..., - init_method: Incomplete | None = ..., + finalize: bool = True, + mapper: Incomplete | None = None, + registry: Incomplete | None = None, + declarative_scan: Incomplete | None = None, + expired_attribute_loader: Incomplete | None = None, + init_method: Incomplete | None = None, ): ... def unregister_class(class_) -> None: ... def is_instrumented(instance, key): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/interfaces.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/interfaces.pyi index 61b1c7f7eb0a..07a8975782b8 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/interfaces.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/interfaces.pyi @@ -46,7 +46,7 @@ class MapperProperty(HasCacheKey, _MappedAttribute, InspectionAttr, util.Memoize is_property: bool def setup(self, context, query_entity, path, adapter, **kwargs) -> None: ... def create_row_processor(self, context, query_entity, path, mapper, result, adapter, populators) -> None: ... - def cascade_iterator(self, type_, state, dict_, visited_states, halt_on: Incomplete | None = ...): ... + def cascade_iterator(self, type_, state, dict_, visited_states, halt_on: Incomplete | None = None): ... parent: Any def set_parent(self, parent, init) -> None: ... def instrument_class(self, mapper) -> None: ... @@ -64,7 +64,7 @@ class PropComparator(operators.ColumnOperators[_T], Generic[_T]): __visit_name__: str prop: Any property: Any - def __init__(self, prop, parentmapper, adapt_to_entity: Incomplete | None = ...) -> None: ... + def __init__(self, prop, parentmapper, adapt_to_entity: Incomplete | None = None) -> None: ... def __clause_element__(self) -> None: ... def adapt_to_entity(self, adapt_to_entity): ... @property @@ -79,8 +79,8 @@ class PropComparator(operators.ColumnOperators[_T], Generic[_T]): def of_type_op(a, class_): ... def of_type(self, class_): ... def and_(self, *criteria): ... - def any(self, criterion: Incomplete | None = ..., **kwargs): ... - def has(self, criterion: Incomplete | None = ..., **kwargs): ... + def any(self, criterion: Incomplete | None = None, **kwargs): ... + def has(self, criterion: Incomplete | None = None, **kwargs): ... class StrategizedProperty(MapperProperty): inherit_cache: bool @@ -111,7 +111,7 @@ class CriteriaOption(CompileStateOption): class UserDefinedOption(ORMOption): propagate_to_loaders: bool payload: Any - def __init__(self, payload: Incomplete | None = ...) -> None: ... + def __init__(self, payload: Incomplete | None = None) -> None: ... class MapperOption(ORMOption): propagate_to_loaders: bool diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/loading.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/loading.pyi index 8341245981e4..328b33ef126b 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/loading.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/loading.pyi @@ -2,18 +2,18 @@ from _typeshed import Incomplete from typing import Any def instances(cursor, context): ... -def merge_frozen_result(session, statement, frozen_result, load: bool = ...): ... -def merge_result(query, iterator, load: bool = ...): ... +def merge_frozen_result(session, statement, frozen_result, load: bool = True): ... +def merge_result(query, iterator, load: bool = True): ... def get_from_identity(session, mapper, key, passive): ... def load_on_ident( session, statement, key, - load_options: Incomplete | None = ..., - refresh_state: Incomplete | None = ..., - with_for_update: Incomplete | None = ..., - only_load_props: Incomplete | None = ..., - no_autoflush: bool = ..., + load_options: Incomplete | None = None, + refresh_state: Incomplete | None = None, + with_for_update: Incomplete | None = None, + only_load_props: Incomplete | None = None, + no_autoflush: bool = False, bind_arguments=..., execution_options=..., ): ... @@ -21,12 +21,12 @@ def load_on_pk_identity( session, statement, primary_key_identity, - load_options: Incomplete | None = ..., - refresh_state: Incomplete | None = ..., - with_for_update: Incomplete | None = ..., - only_load_props: Incomplete | None = ..., - identity_token: Incomplete | None = ..., - no_autoflush: bool = ..., + load_options: Incomplete | None = None, + refresh_state: Incomplete | None = None, + with_for_update: Incomplete | None = None, + only_load_props: Incomplete | None = None, + identity_token: Incomplete | None = None, + no_autoflush: bool = False, bind_arguments=..., execution_options=..., ): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/mapper.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/mapper.pyi index 999ad8981258..816e98eb102f 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/mapper.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/mapper.pyi @@ -46,33 +46,33 @@ class Mapper(ORMFromClauseRole, ORMEntityColumnsClauseRole, sql_base.MemoizedHas def __init__( self, class_, - local_table: Incomplete | None = ..., - properties: Incomplete | None = ..., - primary_key: Incomplete | None = ..., - non_primary: bool = ..., - inherits: Incomplete | None = ..., - inherit_condition: Incomplete | None = ..., - inherit_foreign_keys: Incomplete | None = ..., - always_refresh: bool = ..., - version_id_col: Incomplete | None = ..., - version_id_generator: Incomplete | None = ..., - polymorphic_on: Incomplete | None = ..., - _polymorphic_map: Incomplete | None = ..., - polymorphic_identity: Incomplete | None = ..., - concrete: bool = ..., - with_polymorphic: Incomplete | None = ..., - polymorphic_load: Incomplete | None = ..., - allow_partial_pks: bool = ..., - batch: bool = ..., - column_prefix: Incomplete | None = ..., - include_properties: Incomplete | None = ..., - exclude_properties: Incomplete | None = ..., - passive_updates: bool = ..., - passive_deletes: bool = ..., - confirm_deleted_rows: bool = ..., - eager_defaults: bool = ..., - legacy_is_orphan: bool = ..., - _compiled_cache_size: int = ..., + local_table: Incomplete | None = None, + properties: Incomplete | None = None, + primary_key: Incomplete | None = None, + non_primary: bool = False, + inherits: Incomplete | None = None, + inherit_condition: Incomplete | None = None, + inherit_foreign_keys: Incomplete | None = None, + always_refresh: bool = False, + version_id_col: Incomplete | None = None, + version_id_generator: Incomplete | None = None, + polymorphic_on: Incomplete | None = None, + _polymorphic_map: Incomplete | None = None, + polymorphic_identity: Incomplete | None = None, + concrete: bool = False, + with_polymorphic: Incomplete | None = None, + polymorphic_load: Incomplete | None = None, + allow_partial_pks: bool = True, + batch: bool = True, + column_prefix: Incomplete | None = None, + include_properties: Incomplete | None = None, + exclude_properties: Incomplete | None = None, + passive_updates: bool = True, + passive_deletes: bool = False, + confirm_deleted_rows: bool = True, + eager_defaults: bool = False, + legacy_is_orphan: bool = False, + _compiled_cache_size: int = 100, ): ... is_mapper: bool represents_outer_join: bool @@ -92,7 +92,7 @@ class Mapper(ORMFromClauseRole, ORMEntityColumnsClauseRole, sql_base.MemoizedHas def add_properties(self, dict_of_properties) -> None: ... def add_property(self, key, prop) -> None: ... def has_property(self, key): ... - def get_property(self, key, _configure_mappers: bool = ...): ... + def get_property(self, key, _configure_mappers: bool = True): ... def get_property_by_column(self, column): ... @property def iterate_properties(self): ... @@ -126,11 +126,11 @@ class Mapper(ORMFromClauseRole, ORMEntityColumnsClauseRole, sql_base.MemoizedHas def primary_mapper(self): ... @property def primary_base_mapper(self): ... - def identity_key_from_row(self, row, identity_token: Incomplete | None = ..., adapter: Incomplete | None = ...): ... - def identity_key_from_primary_key(self, primary_key, identity_token: Incomplete | None = ...): ... + def identity_key_from_row(self, row, identity_token: Incomplete | None = None, adapter: Incomplete | None = None): ... + def identity_key_from_primary_key(self, primary_key, identity_token: Incomplete | None = None): ... def identity_key_from_instance(self, instance): ... def primary_key_from_instance(self, instance): ... - def cascade_iterator(self, type_, state, halt_on: Incomplete | None = ...) -> None: ... + def cascade_iterator(self, type_, state, halt_on: Incomplete | None = None) -> None: ... class _OptGetColumnsNotAvailable(Exception): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/path_registry.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/path_registry.pyi index 9da5d3161f46..8b7e2303352f 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/path_registry.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/path_registry.pyi @@ -15,7 +15,7 @@ class PathRegistry(HasCacheKey): def __ne__(self, other): ... def set(self, attributes, key, value) -> None: ... def setdefault(self, attributes, key, value) -> None: ... - def get(self, attributes, key, value: Incomplete | None = ...): ... + def get(self, attributes, key, value: Incomplete | None = None): ... def __len__(self) -> int: ... def __hash__(self) -> int: ... @property diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/persistence.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/persistence.pyi index 8d5d721e7d5e..f6bef4909bd2 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/persistence.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/persistence.pyi @@ -3,7 +3,7 @@ from typing import Any from ..sql.base import CompileState, Options from ..sql.dml import DeleteDMLState, UpdateDMLState -def save_obj(base_mapper, states, uowtransaction, single: bool = ...) -> None: ... +def save_obj(base_mapper, states, uowtransaction, single: bool = False) -> None: ... def post_update(base_mapper, states, uowtransaction, post_update_cols) -> None: ... def delete_obj(base_mapper, states, uowtransaction) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/query.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/query.pyi index ab769f034319..30fd701100d8 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/query.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/query.pyi @@ -19,11 +19,11 @@ class Query(_SelectFromElements, SupportsCloneAnnotations, HasPrefixes, HasSuffi logger: Any load_options: Any session: Any - def __init__(self, entities, session: Incomplete | None = ...) -> None: ... + def __init__(self, entities, session: Incomplete | None = None) -> None: ... @property def statement(self): ... - def subquery(self, name: str | None = ..., with_labels: bool = ..., reduce_columns: bool = ...): ... - def cte(self, name: Incomplete | None = ..., recursive: bool = ..., nesting: bool = ...): ... + def subquery(self, name: str | None = None, with_labels: bool = False, reduce_columns: bool = False): ... + def cte(self, name: Incomplete | None = None, recursive: bool = False, nesting: bool = False): ... def label(self, name): ... def as_scalar(self): ... def scalar_subquery(self): ... @@ -43,7 +43,7 @@ class Query(_SelectFromElements, SupportsCloneAnnotations, HasPrefixes, HasSuffi @property def whereclause(self): ... def with_polymorphic( - self, cls_or_mappers, selectable: Incomplete | None = ..., polymorphic_on: Incomplete | None = ... + self, cls_or_mappers, selectable: Incomplete | None = None, polymorphic_on: Incomplete | None = None ) -> Self: ... def yield_per(self, count) -> Self: ... def get(self, ident): ... @@ -52,8 +52,8 @@ class Query(_SelectFromElements, SupportsCloneAnnotations, HasPrefixes, HasSuffi def correlate(self, *fromclauses) -> Self: ... def autoflush(self, setting) -> Self: ... def populate_existing(self) -> Self: ... - def with_parent(self, instance, property: Incomplete | None = ..., from_entity: Incomplete | None = ...): ... - def add_entity(self, entity, alias: Incomplete | None = ...) -> Self: ... + def with_parent(self, instance, property: Incomplete | None = None, from_entity: Incomplete | None = None): ... + def add_entity(self, entity, alias: Incomplete | None = None) -> Self: ... def with_session(self, session) -> Self: ... def from_self(self, *entities): ... def values(self, *columns): ... @@ -66,7 +66,12 @@ class Query(_SelectFromElements, SupportsCloneAnnotations, HasPrefixes, HasSuffi def get_execution_options(self): ... def execution_options(self, **kwargs) -> Self: ... def with_for_update( - self, read: bool = ..., nowait: bool = ..., of: Incomplete | None = ..., skip_locked: bool = ..., key_share: bool = ... + self, + read: bool = False, + nowait: bool = False, + of: Incomplete | None = None, + skip_locked: bool = False, + key_share: bool = False, ) -> Self: ... def params(self, *args, **kwargs) -> Self: ... def where(self, *criterion): ... @@ -100,12 +105,14 @@ class Query(_SelectFromElements, SupportsCloneAnnotations, HasPrefixes, HasSuffi def __iter__(self) -> Iterator[_T]: ... @property def column_descriptions(self): ... - def instances(self, result_proxy, context: Incomplete | None = ...): ... - def merge_result(self, iterator, load: bool = ...): ... + def instances(self, result_proxy, context: Incomplete | None = None): ... + def merge_result(self, iterator, load: bool = True): ... def exists(self): ... def count(self) -> int: ... - def delete(self, synchronize_session: _SynchronizeSessionArgument = ...) -> int: ... - def update(self, values, synchronize_session: _SynchronizeSessionArgument = ..., update_args: Incomplete | None = ...): ... + def delete(self, synchronize_session: _SynchronizeSessionArgument = "evaluate") -> int: ... + def update( + self, values, synchronize_session: _SynchronizeSessionArgument = "evaluate", update_args: Incomplete | None = None + ): ... class FromStatement(GroupedElement, SelectBase, Executable): __visit_name__: str diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/relationships.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/relationships.pyi index e7382a512721..cac546132331 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/relationships.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/relationships.pyi @@ -51,40 +51,40 @@ class RelationshipProperty(StrategizedProperty): def __init__( self, argument, - secondary: Incomplete | None = ..., - primaryjoin: Incomplete | None = ..., - secondaryjoin: Incomplete | None = ..., - foreign_keys: Incomplete | None = ..., - uselist: Incomplete | None = ..., - order_by: bool = ..., - backref: Incomplete | None = ..., - back_populates: Incomplete | None = ..., - overlaps: Incomplete | None = ..., - post_update: bool = ..., - cascade: bool = ..., - viewonly: bool = ..., - lazy: str = ..., - collection_class: Incomplete | None = ..., - passive_deletes=..., - passive_updates=..., - remote_side: Incomplete | None = ..., - enable_typechecks=..., - join_depth: Incomplete | None = ..., - comparator_factory: Incomplete | None = ..., - single_parent: bool = ..., - innerjoin: bool = ..., - distinct_target_key: Incomplete | None = ..., - doc: Incomplete | None = ..., - active_history=..., - cascade_backrefs=..., - load_on_pending: bool = ..., - bake_queries: bool = ..., - _local_remote_pairs: Incomplete | None = ..., - query_class: Incomplete | None = ..., - info: Incomplete | None = ..., - omit_join: Incomplete | None = ..., - sync_backref: Incomplete | None = ..., - _legacy_inactive_history_style: bool = ..., + secondary: Incomplete | None = None, + primaryjoin: Incomplete | None = None, + secondaryjoin: Incomplete | None = None, + foreign_keys: Incomplete | None = None, + uselist: Incomplete | None = None, + order_by: bool = False, + backref: Incomplete | None = None, + back_populates: Incomplete | None = None, + overlaps: Incomplete | None = None, + post_update: bool = False, + cascade: bool = False, + viewonly: bool = False, + lazy: str = "select", + collection_class: Incomplete | None = None, + passive_deletes=False, + passive_updates=True, + remote_side: Incomplete | None = None, + enable_typechecks=True, + join_depth: Incomplete | None = None, + comparator_factory: Incomplete | None = None, + single_parent: bool = False, + innerjoin: bool = False, + distinct_target_key: Incomplete | None = None, + doc: Incomplete | None = None, + active_history=False, + cascade_backrefs=True, + load_on_pending: bool = False, + bake_queries: bool = True, + _local_remote_pairs: Incomplete | None = None, + query_class: Incomplete | None = None, + info: Incomplete | None = None, + omit_join: Incomplete | None = None, + sync_backref: Incomplete | None = None, + _legacy_inactive_history_style: bool = False, ) -> None: ... def instrument_class(self, mapper) -> None: ... @@ -94,9 +94,9 @@ class RelationshipProperty(StrategizedProperty): self, prop, parentmapper, - adapt_to_entity: Incomplete | None = ..., - of_type: Incomplete | None = ..., - extra_criteria=..., + adapt_to_entity: Incomplete | None = None, + of_type: Incomplete | None = None, + extra_criteria=(), ) -> None: ... def adapt_to_entity(self, adapt_to_entity): ... @memoized_property @@ -109,8 +109,8 @@ class RelationshipProperty(StrategizedProperty): def in_(self, other) -> ColumnOperators[_T]: ... __hash__: ClassVar[None] # type: ignore[assignment] def __eq__(self, other): ... - def any(self, criterion: Incomplete | None = ..., **kwargs): ... - def has(self, criterion: Incomplete | None = ..., **kwargs): ... + def any(self, criterion: Incomplete | None = None, **kwargs): ... + def has(self, criterion: Incomplete | None = None, **kwargs): ... def contains(self, other, **kwargs) -> ColumnOperators[_T]: ... def __ne__(self, other) -> ColumnOperators[_T]: ... # type: ignore[override] @memoized_property @@ -119,7 +119,7 @@ class RelationshipProperty(StrategizedProperty): def merge( self, session, source_state, source_dict, dest_state, dest_dict, load, _recursive, _resolve_conflict_map ) -> None: ... - def cascade_iterator(self, type_, state, dict_, visited_states, halt_on: Incomplete | None = ...) -> None: ... + def cascade_iterator(self, type_, state, dict_, visited_states, halt_on: Incomplete | None = None) -> None: ... @memoized_property def entity(self): ... @memoized_property @@ -151,17 +151,17 @@ class JoinCondition: child_persist_selectable, parent_local_selectable, child_local_selectable, - primaryjoin: Incomplete | None = ..., - secondary: Incomplete | None = ..., - secondaryjoin: Incomplete | None = ..., - parent_equivalents: Incomplete | None = ..., - child_equivalents: Incomplete | None = ..., - consider_as_foreign_keys: Incomplete | None = ..., - local_remote_pairs: Incomplete | None = ..., - remote_side: Incomplete | None = ..., - self_referential: bool = ..., - prop: Incomplete | None = ..., - support_sync: bool = ..., + primaryjoin: Incomplete | None = None, + secondary: Incomplete | None = None, + secondaryjoin: Incomplete | None = None, + parent_equivalents: Incomplete | None = None, + child_equivalents: Incomplete | None = None, + consider_as_foreign_keys: Incomplete | None = None, + local_remote_pairs: Incomplete | None = None, + remote_side: Incomplete | None = None, + self_referential: bool = False, + prop: Incomplete | None = None, + support_sync: bool = True, can_be_synced_fn=..., ): ... @property @@ -177,9 +177,9 @@ class JoinCondition: @memoized_property def foreign_key_columns(self): ... def join_targets( - self, source_selectable, dest_selectable, aliased, single_crit: Incomplete | None = ..., extra_criteria=... + self, source_selectable, dest_selectable, aliased, single_crit: Incomplete | None = None, extra_criteria=() ): ... - def create_lazy_clause(self, reverse_direction: bool = ...): ... + def create_lazy_clause(self, reverse_direction: bool = False): ... class _ColInAnnotations: name: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/scoping.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/scoping.pyi index 0731e46169c0..4f007eae9b9c 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/scoping.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/scoping.pyi @@ -10,9 +10,9 @@ class ScopedSessionMixin: class scoped_session(ScopedSessionMixin): session_factory: Any registry: Any - def __init__(self, session_factory, scopefunc: Incomplete | None = ...) -> None: ... + def __init__(self, session_factory, scopefunc: Incomplete | None = None) -> None: ... def remove(self) -> None: ... - def query_property(self, query_cls: Incomplete | None = ...): ... + def query_property(self, query_cls: Incomplete | None = None): ... # dynamically proxied from class Session bind: Any identity_map: Any @@ -38,68 +38,68 @@ class scoped_session(ScopedSessionMixin): def object_session(cls, instance): ... def __contains__(self, instance): ... def __iter__(self): ... - def add(self, instance, _warn: bool = ...) -> None: ... + def add(self, instance, _warn: bool = True) -> None: ... def add_all(self, instances) -> None: ... - def begin(self, subtransactions: bool = ..., nested: bool = ..., _subtrans: bool = ...): ... + def begin(self, subtransactions: bool = False, nested: bool = False, _subtrans: bool = False): ... def begin_nested(self): ... def close(self) -> None: ... def commit(self) -> None: ... def connection( self, - bind_arguments: Incomplete | None = ..., - close_with_result: bool = ..., - execution_options: Incomplete | None = ..., + bind_arguments: Incomplete | None = None, + close_with_result: bool = False, + execution_options: Incomplete | None = None, **kw, ): ... def delete(self, instance) -> None: ... def execute( self, statement, - params: Incomplete | None = ..., + params: Incomplete | None = None, execution_options=..., - bind_arguments: Incomplete | None = ..., - _parent_execute_state: Incomplete | None = ..., - _add_event: Incomplete | None = ..., + bind_arguments: Incomplete | None = None, + _parent_execute_state: Incomplete | None = None, + _add_event: Incomplete | None = None, **kw, ): ... - def expire(self, instance, attribute_names: Incomplete | None = ...) -> None: ... + def expire(self, instance, attribute_names: Incomplete | None = None) -> None: ... def expire_all(self) -> None: ... def expunge(self, instance) -> None: ... def expunge_all(self) -> None: ... - def flush(self, objects: Incomplete | None = ...) -> None: ... + def flush(self, objects: Incomplete | None = None) -> None: ... def get( self, entity, ident, - options: Incomplete | None = ..., - populate_existing: bool = ..., - with_for_update: Incomplete | None = ..., - identity_token: Incomplete | None = ..., - execution_options: Incomplete | None = ..., + options: Incomplete | None = None, + populate_existing: bool = False, + with_for_update: Incomplete | None = None, + identity_token: Incomplete | None = None, + execution_options: Incomplete | None = None, ): ... def get_bind( self, - mapper: Incomplete | None = ..., - clause: Incomplete | None = ..., - bind: Incomplete | None = ..., - _sa_skip_events: Incomplete | None = ..., - _sa_skip_for_implicit_returning: bool = ..., + mapper: Incomplete | None = None, + clause: Incomplete | None = None, + bind: Incomplete | None = None, + _sa_skip_events: Incomplete | None = None, + _sa_skip_for_implicit_returning: bool = False, ): ... - def is_modified(self, instance, include_collections: bool = ...): ... + def is_modified(self, instance, include_collections: bool = True): ... def bulk_save_objects( - self, objects, return_defaults: bool = ..., update_changed_only: bool = ..., preserve_order: bool = ... + self, objects, return_defaults: bool = False, update_changed_only: bool = True, preserve_order: bool = True ): ... - def bulk_insert_mappings(self, mapper, mappings, return_defaults: bool = ..., render_nulls: bool = ...) -> None: ... + def bulk_insert_mappings(self, mapper, mappings, return_defaults: bool = False, render_nulls: bool = False) -> None: ... def bulk_update_mappings(self, mapper, mappings) -> None: ... - def merge(self, instance, load: bool = ..., options: Incomplete | None = ...): ... + def merge(self, instance, load: bool = True, options: Incomplete | None = None): ... def query(self, *entities, **kwargs): ... - def refresh(self, instance, attribute_names: Incomplete | None = ..., with_for_update: Incomplete | None = ...) -> None: ... + def refresh(self, instance, attribute_names: Incomplete | None = None, with_for_update: Incomplete | None = None) -> None: ... def rollback(self) -> None: ... def scalar( - self, statement, params: Incomplete | None = ..., execution_options=..., bind_arguments: Incomplete | None = ..., **kw + self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw ): ... def scalars( - self, statement, params: Incomplete | None = ..., execution_options=..., bind_arguments: Incomplete | None = ..., **kw + self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw ): ... ScopedSession = scoped_session diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/session.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/session.pyi index 9f60a2669e58..91ef8ebe299d 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/session.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/session.pyi @@ -34,10 +34,10 @@ class ORMExecuteState(MemoizedSlots): ) -> None: ... def invoke_statement( self, - statement: Incomplete | None = ..., - params: Incomplete | None = ..., - execution_options: Incomplete | None = ..., - bind_arguments: Incomplete | None = ..., + statement: Incomplete | None = None, + params: Incomplete | None = None, + execution_options: Incomplete | None = None, + bind_arguments: Incomplete | None = None, ): ... @property def bind_mapper(self): ... @@ -72,16 +72,16 @@ class ORMExecuteState(MemoizedSlots): class SessionTransaction(TransactionalContext): session: Any nested: Any - def __init__(self, session, parent: Incomplete | None = ..., nested: bool = ..., autobegin: bool = ...) -> None: ... + def __init__(self, session, parent: Incomplete | None = None, nested: bool = False, autobegin: bool = False) -> None: ... @property def parent(self): ... @property def is_active(self): ... - def connection(self, bindkey, execution_options: Incomplete | None = ..., **kwargs): ... + def connection(self, bindkey, execution_options: Incomplete | None = None, **kwargs): ... def prepare(self) -> None: ... - def commit(self, _to_root: bool = ...): ... - def rollback(self, _capture_exception: bool = ..., _to_root: bool = ...): ... - def close(self, invalidate: bool = ...) -> None: ... + def commit(self, _to_root: bool = False): ... + def rollback(self, _capture_exception: bool = False, _to_root: bool = False): ... + def close(self, invalidate: bool = False) -> None: ... class Session(_SessionClassMethods): identity_map: Any @@ -95,16 +95,16 @@ class Session(_SessionClassMethods): twophase: Any def __init__( self, - bind: Incomplete | None = ..., - autoflush: bool = ..., - future: bool = ..., - expire_on_commit: bool = ..., - autocommit: bool = ..., - twophase: bool = ..., - binds: Incomplete | None = ..., - enable_baked_queries: bool = ..., - info: Incomplete | None = ..., - query_cls: Incomplete | None = ..., + bind: Incomplete | None = None, + autoflush: bool = True, + future: bool = False, + expire_on_commit: bool = True, + autocommit: bool = False, + twophase: bool = False, + binds: Incomplete | None = None, + enable_baked_queries: bool = True, + info: Incomplete | None = None, + query_cls: Incomplete | None = None, ) -> None: ... connection_callable: Any def __enter__(self) -> Self: ... @@ -119,7 +119,7 @@ class Session(_SessionClassMethods): def get_nested_transaction(self): ... @memoized_property def info(self): ... - def begin(self, subtransactions: bool = ..., nested: bool = ..., _subtrans: bool = ...): ... + def begin(self, subtransactions: bool = False, nested: bool = False, _subtrans: bool = False): ... def begin_nested(self): ... def rollback(self) -> None: ... def commit(self) -> None: ... @@ -127,26 +127,26 @@ class Session(_SessionClassMethods): # TODO: bind_arguments could use a TypedDict def connection( self, - bind_arguments: Mapping[str, Any] | None = ..., - close_with_result: bool = ..., - execution_options: Mapping[str, Any] | None = ..., + bind_arguments: Mapping[str, Any] | None = None, + close_with_result: bool = False, + execution_options: Mapping[str, Any] | None = None, **kw: Any, ) -> Connection: ... def execute( self, statement, - params: Incomplete | None = ..., + params: Incomplete | None = None, execution_options=..., - bind_arguments: Incomplete | None = ..., - _parent_execute_state: Incomplete | None = ..., - _add_event: Incomplete | None = ..., + bind_arguments: Incomplete | None = None, + _parent_execute_state: Incomplete | None = None, + _add_event: Incomplete | None = None, **kw, ) -> Result: ... def scalar( - self, statement, params: Incomplete | None = ..., execution_options=..., bind_arguments: Incomplete | None = ..., **kw + self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw ): ... def scalars( - self, statement, params: Incomplete | None = ..., execution_options=..., bind_arguments: Incomplete | None = ..., **kw + self, statement, params: Incomplete | None = None, execution_options=..., bind_arguments: Incomplete | None = None, **kw ): ... def close(self) -> None: ... def invalidate(self) -> None: ... @@ -155,11 +155,11 @@ class Session(_SessionClassMethods): def bind_table(self, table, bind) -> None: ... def get_bind( self, - mapper: Incomplete | None = ..., - clause: Incomplete | None = ..., - bind: Incomplete | None = ..., - _sa_skip_events: Incomplete | None = ..., - _sa_skip_for_implicit_returning: bool = ..., + mapper: Incomplete | None = None, + clause: Incomplete | None = None, + bind: Incomplete | None = None, + _sa_skip_events: Incomplete | None = None, + _sa_skip_for_implicit_returning: bool = False, ): ... @overload def query(self, entities: Table, **kwargs: Any) -> Query[Any]: ... @@ -171,34 +171,34 @@ class Session(_SessionClassMethods): def query(self, *entities: type[_T], **kwargs: Any) -> Query[_T]: ... @property def no_autoflush(self) -> None: ... - def refresh(self, instance, attribute_names: Incomplete | None = ..., with_for_update: Incomplete | None = ...) -> None: ... + def refresh(self, instance, attribute_names: Incomplete | None = None, with_for_update: Incomplete | None = None) -> None: ... def expire_all(self) -> None: ... - def expire(self, instance, attribute_names: Incomplete | None = ...) -> None: ... + def expire(self, instance, attribute_names: Incomplete | None = None) -> None: ... def expunge(self, instance) -> None: ... - def add(self, instance, _warn: bool = ...) -> None: ... + def add(self, instance, _warn: bool = True) -> None: ... def add_all(self, instances) -> None: ... def delete(self, instance) -> None: ... def get( self, entity, ident, - options: Incomplete | None = ..., - populate_existing: bool = ..., - with_for_update: Incomplete | None = ..., - identity_token: Incomplete | None = ..., - execution_options: Incomplete | None = ..., + options: Incomplete | None = None, + populate_existing: bool = False, + with_for_update: Incomplete | None = None, + identity_token: Incomplete | None = None, + execution_options: Incomplete | None = None, ): ... - def merge(self, instance, load: bool = ..., options: Incomplete | None = ...): ... + def merge(self, instance, load: bool = True, options: Incomplete | None = None): ... def enable_relationship_loading(self, obj) -> None: ... def __contains__(self, instance): ... def __iter__(self): ... - def flush(self, objects: Incomplete | None = ...) -> None: ... + def flush(self, objects: Incomplete | None = None) -> None: ... def bulk_save_objects( - self, objects, return_defaults: bool = ..., update_changed_only: bool = ..., preserve_order: bool = ... + self, objects, return_defaults: bool = False, update_changed_only: bool = True, preserve_order: bool = True ): ... - def bulk_insert_mappings(self, mapper, mappings, return_defaults: bool = ..., render_nulls: bool = ...) -> None: ... + def bulk_insert_mappings(self, mapper, mappings, return_defaults: bool = False, render_nulls: bool = False) -> None: ... def bulk_update_mappings(self, mapper, mappings) -> None: ... - def is_modified(self, instance, include_collections: bool = ...): ... + def is_modified(self, instance, include_collections: bool = True): ... @property def is_active(self): ... @property @@ -213,12 +213,12 @@ class sessionmaker(_SessionClassMethods): class_: Any def __init__( self, - bind: Incomplete | None = ..., + bind: Incomplete | None = None, class_=..., - autoflush: bool = ..., - autocommit: bool = ..., - expire_on_commit: bool = ..., - info: Incomplete | None = ..., + autoflush: bool = True, + autocommit: bool = False, + expire_on_commit: bool = True, + info: Incomplete | None = None, **kw, ) -> None: ... def begin(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/strategies.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/strategies.pyi index f4b9508149f5..7ca4a1c2dcf4 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/strategies.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/strategies.pyi @@ -8,7 +8,7 @@ class UninstrumentedColumnLoader(LoaderStrategy): columns: Any def __init__(self, parent, strategy_key) -> None: ... def setup_query( - self, compile_state, query_entity, path, loadopt, adapter, column_collection: Incomplete | None = ..., **kwargs + self, compile_state, query_entity, path, loadopt, adapter, column_collection: Incomplete | None = None, **kwargs ) -> None: ... def create_row_processor(self, context, query_entity, path, loadopt, mapper, result, adapter, populators) -> None: ... @@ -17,7 +17,7 @@ class ColumnLoader(LoaderStrategy): columns: Any is_composite: Any def __init__(self, parent, strategy_key) -> None: ... - def setup_query(self, compile_state, query_entity, path, loadopt, adapter, column_collection, memoized_populators, check_for_adapt: bool = ..., **kwargs) -> None: ... # type: ignore[override] + def setup_query(self, compile_state, query_entity, path, loadopt, adapter, column_collection, memoized_populators, check_for_adapt: bool = False, **kwargs) -> None: ... # type: ignore[override] is_class_level: bool def init_class_attribute(self, mapper) -> None: ... def create_row_processor(self, context, query_entity, path, loadopt, mapper, result, adapter, populators) -> None: ... @@ -39,12 +39,12 @@ class DeferredColumnLoader(LoaderStrategy): def create_row_processor(self, context, query_entity, path, loadopt, mapper, result, adapter, populators) -> None: ... is_class_level: bool def init_class_attribute(self, mapper) -> None: ... - def setup_query(self, compile_state, query_entity, path, loadopt, adapter, column_collection, memoized_populators, only_load_props: Incomplete | None = ..., **kw) -> None: ... # type: ignore[override] + def setup_query(self, compile_state, query_entity, path, loadopt, adapter, column_collection, memoized_populators, only_load_props: Incomplete | None = None, **kw) -> None: ... # type: ignore[override] class LoadDeferredColumns: key: Any raiseload: Any - def __init__(self, key, raiseload: bool = ...) -> None: ... + def __init__(self, key, raiseload: bool = False) -> None: ... def __call__(self, state, passive=...): ... class AbstractRelationshipLoader(LoaderStrategy): @@ -116,9 +116,9 @@ class JoinedLoader(AbstractRelationshipLoader): path, loadopt, adapter, - column_collection: Incomplete | None = ..., - parentmapper: Incomplete | None = ..., - chained_from_outerjoin: bool = ..., + column_collection: Incomplete | None = None, + parentmapper: Incomplete | None = None, + chained_from_outerjoin: bool = False, **kwargs, ) -> None: ... def create_row_processor(self, context, query_entity, path, loadopt, mapper, result, adapter, populators) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/strategy_options.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/strategy_options.pyi index 5422cfffb5c5..7147a204fce7 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/strategy_options.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/strategy_options.pyi @@ -18,22 +18,22 @@ class Load(Generative, LoaderOption): def process_compile_state_replaced_entities(self, compile_state, mapper_entities) -> None: ... def process_compile_state(self, compile_state) -> None: ... def options(self, *opts) -> None: ... - def set_relationship_strategy(self, attr, strategy, propagate_to_loaders: bool = ...) -> None: ... - def set_column_strategy(self, attrs, strategy, opts: Incomplete | None = ..., opts_only: bool = ...) -> None: ... + def set_relationship_strategy(self, attr, strategy, propagate_to_loaders: bool = True) -> None: ... + def set_column_strategy(self, attrs, strategy, opts: Incomplete | None = None, opts_only: bool = False) -> None: ... def set_generic_strategy(self, attrs, strategy) -> None: ... def set_class_strategy(self, strategy, opts) -> None: ... # added dynamically at runtime - def contains_eager(self, attr, alias: Incomplete | None = ...): ... + def contains_eager(self, attr, alias: Incomplete | None = None): ... def load_only(self, *attrs): ... - def joinedload(self, attr, innerjoin: Incomplete | None = ...): ... + def joinedload(self, attr, innerjoin: Incomplete | None = None): ... def subqueryload(self, attr): ... def selectinload(self, attr): ... def lazyload(self, attr): ... def immediateload(self, attr): ... def noload(self, attr): ... - def raiseload(self, attr, sql_only: bool = ...): ... + def raiseload(self, attr, sql_only: bool = False): ... def defaultload(self, attr): ... - def defer(self, key, raiseload: bool = ...): ... + def defer(self, key, raiseload: bool = False): ... def undefer(self, key): ... def undefer_group(self, name): ... def with_expression(self, key, expression): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/unitofwork.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/unitofwork.pyi index 20de2df97427..26b13e383029 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/unitofwork.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/unitofwork.pyi @@ -26,11 +26,11 @@ class UOWTransaction: def register_object( self, state, - isdelete: bool = ..., - listonly: bool = ..., - cancel_delete: bool = ..., - operation: Incomplete | None = ..., - prop: Incomplete | None = ..., + isdelete: bool = False, + listonly: bool = False, + cancel_delete: bool = False, + operation: Incomplete | None = None, + prop: Incomplete | None = None, ): ... def register_post_update(self, state, post_update_cols) -> None: ... def filter_states_for_dep(self, dep, states): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/util.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/util.pyi index b7c6fd4f7d78..cb7e9f809ea9 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/util.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/util.pyi @@ -32,7 +32,7 @@ class CascadeOptions(frozenset[Any]): @classmethod def from_string(cls, arg): ... -def polymorphic_union(table_map, typecolname, aliasname: str = ..., cast_nulls: bool = ...): ... +def polymorphic_union(table_map, typecolname, aliasname: str = "p_union", cast_nulls: bool = True): ... def identity_key(*args, **kwargs): ... class ORMAdapter(sql_util.ColumnAdapter): @@ -41,10 +41,10 @@ class ORMAdapter(sql_util.ColumnAdapter): def __init__( self, entity, - equivalents: Incomplete | None = ..., - adapt_required: bool = ..., - allow_label_resolve: bool = ..., - anonymize_labels: bool = ..., + equivalents: Incomplete | None = None, + adapt_required: bool = False, + allow_label_resolve: bool = True, + anonymize_labels: bool = False, ) -> None: ... class AliasedClass: @@ -52,15 +52,15 @@ class AliasedClass: def __init__( self, mapped_class_or_ac, - alias: Incomplete | None = ..., - name: Incomplete | None = ..., - flat: bool = ..., - adapt_on_names: bool = ..., - with_polymorphic_mappers=..., - with_polymorphic_discriminator: Incomplete | None = ..., - base_alias: Incomplete | None = ..., - use_mapper_path: bool = ..., - represents_outer_join: bool = ..., + alias: Incomplete | None = None, + name: Incomplete | None = None, + flat: bool = False, + adapt_on_names: bool = False, + with_polymorphic_mappers=(), + with_polymorphic_discriminator: Incomplete | None = None, + base_alias: Incomplete | None = None, + use_mapper_path: bool = False, + represents_outer_join: bool = False, ) -> None: ... def __getattr__(self, key: str): ... @@ -110,29 +110,29 @@ class LoaderCriteriaOption(CriteriaOption): self, entity_or_base, where_criteria, - loader_only: bool = ..., - include_aliases: bool = ..., - propagate_to_loaders: bool = ..., - track_closure_variables: bool = ..., + loader_only: bool = False, + include_aliases: bool = False, + propagate_to_loaders: bool = True, + track_closure_variables: bool = True, ) -> None: ... def process_compile_state_replaced_entities(self, compile_state, mapper_entities): ... def process_compile_state(self, compile_state) -> None: ... def get_global_criteria(self, attributes) -> None: ... def aliased( - element, alias: Incomplete | None = ..., name: Incomplete | None = ..., flat: bool = ..., adapt_on_names: bool = ... + element, alias: Incomplete | None = None, name: Incomplete | None = None, flat: bool = False, adapt_on_names: bool = False ): ... def with_polymorphic( base, classes, - selectable: bool = ..., - flat: bool = ..., - polymorphic_on: Incomplete | None = ..., - aliased: bool = ..., - adapt_on_names: bool = ..., - innerjoin: bool = ..., - _use_mapper_path: bool = ..., - _existing_alias: Incomplete | None = ..., + selectable: bool = False, + flat: bool = False, + polymorphic_on: Incomplete | None = None, + aliased: bool = False, + adapt_on_names: bool = False, + innerjoin: bool = False, + _use_mapper_path: bool = False, + _existing_alias: Incomplete | None = None, ) -> AliasedClass: ... class Bundle(ORMColumnsClauseRole, SupportsCloneAnnotations, sql_base.MemoizedHasCacheKey, InspectionAttr): @@ -166,28 +166,35 @@ class _ORMJoin(expression.Join): self, left, right, - onclause: Incomplete | None = ..., - isouter: bool = ..., - full: bool = ..., - _left_memo: Incomplete | None = ..., - _right_memo: Incomplete | None = ..., - _extra_criteria=..., + onclause: Incomplete | None = None, + isouter: bool = False, + full: bool = False, + _left_memo: Incomplete | None = None, + _right_memo: Incomplete | None = None, + _extra_criteria=(), ) -> None: ... def join( self, right, - onclause: Incomplete | None = ..., - isouter: bool = ..., - full: bool = ..., - join_to_left: Incomplete | None = ..., + onclause: Incomplete | None = None, + isouter: bool = False, + full: bool = False, + join_to_left: Incomplete | None = None, + ): ... + def outerjoin( + self, right, onclause: Incomplete | None = None, full: bool = False, join_to_left: Incomplete | None = None ): ... - def outerjoin(self, right, onclause: Incomplete | None = ..., full: bool = ..., join_to_left: Incomplete | None = ...): ... def join( - left, right, onclause: Incomplete | None = ..., isouter: bool = ..., full: bool = ..., join_to_left: Incomplete | None = ... + left, + right, + onclause: Incomplete | None = None, + isouter: bool = False, + full: bool = False, + join_to_left: Incomplete | None = None, ): ... -def outerjoin(left, right, onclause: Incomplete | None = ..., full: bool = ..., join_to_left: Incomplete | None = ...): ... -def with_parent(instance, prop, from_entity: Incomplete | None = ...): ... +def outerjoin(left, right, onclause: Incomplete | None = None, full: bool = False, join_to_left: Incomplete | None = None): ... +def with_parent(instance, prop, from_entity: Incomplete | None = None): ... def has_identity(object_): ... def was_deleted(object_): ... def randomize_unitofwork() -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/pool/base.pyi b/stubs/SQLAlchemy/sqlalchemy/pool/base.pyi index b169e6d8e166..464a884c4944 100644 --- a/stubs/SQLAlchemy/sqlalchemy/pool/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/pool/base.pyi @@ -25,14 +25,14 @@ class Pool(log.Identified): def __init__( self, creator, - recycle: int = ..., - echo: Incomplete | None = ..., - logging_name: Incomplete | None = ..., - reset_on_return: bool = ..., - events: Incomplete | None = ..., - dialect: Incomplete | None = ..., - pre_ping: bool = ..., - _dispatch: Incomplete | None = ..., + recycle: int = -1, + echo: Incomplete | None = None, + logging_name: Incomplete | None = None, + reset_on_return: bool = True, + events: Incomplete | None = None, + dialect: Incomplete | None = None, + pre_ping: bool = False, + _dispatch: Incomplete | None = None, ) -> None: ... def recreate(self) -> None: ... def dispose(self) -> None: ... @@ -41,7 +41,7 @@ class Pool(log.Identified): class _ConnectionRecord: finalize_callback: Any - def __init__(self, pool, connect: bool = ...) -> None: ... + def __init__(self, pool, connect: bool = True) -> None: ... fresh: bool fairy_ref: Any starttime: Any @@ -58,13 +58,13 @@ class _ConnectionRecord: def record_info(self): ... @classmethod def checkout(cls, pool): ... - def checkin(self, _fairy_was_created: bool = ...) -> None: ... + def checkin(self, _fairy_was_created: bool = True) -> None: ... @property def in_use(self): ... @property def last_connect_time(self): ... def close(self) -> None: ... - def invalidate(self, e: Incomplete | None = ..., soft: bool = ...) -> None: ... + def invalidate(self, e: Incomplete | None = None, soft: bool = False) -> None: ... def get_connection(self): ... class _ConnectionFairy: @@ -82,7 +82,7 @@ class _ConnectionFairy: def info(self): ... @property def record_info(self): ... - def invalidate(self, e: Incomplete | None = ..., soft: bool = ...) -> None: ... + def invalidate(self, e: Incomplete | None = None, soft: bool = False) -> None: ... def cursor(self, *args, **kwargs): ... def __getattr__(self, key: str): ... def detach(self) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/pool/impl.pyi b/stubs/SQLAlchemy/sqlalchemy/pool/impl.pyi index 2646cafd536d..88eb1fb2ea60 100644 --- a/stubs/SQLAlchemy/sqlalchemy/pool/impl.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/pool/impl.pyi @@ -5,7 +5,7 @@ from .base import Pool class QueuePool(Pool): def __init__( - self, creator, pool_size: int = ..., max_overflow: int = ..., timeout: float = ..., use_lifo: bool = ..., **kw + self, creator, pool_size: int = 5, max_overflow: int = 10, timeout: float = 30.0, use_lifo: bool = False, **kw ) -> None: ... def recreate(self): ... def dispose(self) -> None: ... @@ -26,7 +26,7 @@ class NullPool(Pool): class SingletonThreadPool(Pool): size: Any - def __init__(self, creator, pool_size: int = ..., **kw) -> None: ... + def __init__(self, creator, pool_size: int = 5, **kw) -> None: ... def recreate(self): ... def dispose(self) -> None: ... def status(self): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/processors.pyi b/stubs/SQLAlchemy/sqlalchemy/processors.pyi index 2c74bf49992d..26ee40a7c386 100644 --- a/stubs/SQLAlchemy/sqlalchemy/processors.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/processors.pyi @@ -2,6 +2,6 @@ from _typeshed import Incomplete def str_to_datetime_processor_factory(regexp, type_): ... def py_fallback(): ... -def to_unicode_processor_factory(encoding, errors: Incomplete | None = ...): ... -def to_conditional_unicode_processor_factory(encoding, errors: Incomplete | None = ...): ... +def to_unicode_processor_factory(encoding, errors: Incomplete | None = None): ... +def to_conditional_unicode_processor_factory(encoding, errors: Incomplete | None = None): ... def to_decimal_processor_factory(target_class, scale): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/base.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/base.pyi index 885aac1d0045..e2bd4daa9e57 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/base.pyi @@ -116,7 +116,7 @@ class SchemaVisitor(ClauseVisitor): __traverse_options__: Any class ColumnCollection: - def __init__(self, columns: Incomplete | None = ...) -> None: ... + def __init__(self, columns: Incomplete | None = None) -> None: ... def keys(self): ... def values(self): ... def items(self): ... @@ -128,7 +128,7 @@ class ColumnCollection: def __contains__(self, key): ... def compare(self, other): ... def __eq__(self, other): ... - def get(self, key, default: Incomplete | None = ...): ... + def get(self, key, default: Incomplete | None = None): ... def __setitem__(self, key, value) -> None: ... def __delitem__(self, key) -> None: ... def __setattr__(self, key: str, obj) -> None: ... @@ -136,13 +136,13 @@ class ColumnCollection: def remove(self, column) -> None: ... def update(self, iter_) -> None: ... __hash__: ClassVar[None] # type: ignore[assignment] - def add(self, column, key: Incomplete | None = ...) -> None: ... + def add(self, column, key: Incomplete | None = None) -> None: ... def contains_column(self, col): ... def as_immutable(self): ... - def corresponding_column(self, column, require_embedded: bool = ...): ... + def corresponding_column(self, column, require_embedded: bool = False): ... class DedupeColumnCollection(ColumnCollection): - def add(self, column, key: Incomplete | None = ...) -> None: ... + def add(self, column, key: Incomplete | None = None) -> None: ... def extend(self, iter_) -> None: ... def remove(self, column) -> None: ... def replace(self, column) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/coercions.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/coercions.pyi index 034252252300..605ed309ac66 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/coercions.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/coercions.pyi @@ -13,9 +13,9 @@ traversals: Any def expect( role, element, - apply_propagate_attrs: Incomplete | None = ..., - argname: Incomplete | None = ..., - post_inspect: bool = ..., + apply_propagate_attrs: Incomplete | None = None, + argname: Incomplete | None = None, + post_inspect: bool = False, **kw, ): ... def expect_as_key(role, element, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/compiler.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/compiler.pyi index 44178d7f6de8..f33bda45a2d8 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/compiler.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/compiler.pyi @@ -36,7 +36,7 @@ WARN_LINTING: Incomplete FROM_LINTING: Incomplete class FromLinter: - def lint(self, start: Incomplete | None = ...): ... + def lint(self, start: Incomplete | None = None): ... def warn(self) -> None: ... class Compiled: @@ -53,8 +53,8 @@ class Compiled: self, dialect, statement, - schema_translate_map: Incomplete | None = ..., - render_schema_translate: bool = ..., + schema_translate_map: Incomplete | None = None, + render_schema_translate: bool = False, compile_kwargs=..., ) -> None: ... def visit_unsupported_compilation(self, element, err) -> None: ... @@ -62,7 +62,7 @@ class Compiled: def sql_compiler(self) -> None: ... def process(self, obj, **kwargs): ... def construct_params( - self, params: Incomplete | None = ..., extracted_parameters: Incomplete | None = ..., escape_names: bool = ... + self, params: Incomplete | None = None, extracted_parameters: Incomplete | None = None, escape_names: bool = True ) -> None: ... @property def params(self): ... @@ -78,7 +78,7 @@ class _CompileLabel(elements.ColumnElement[Incomplete]): __visit_name__: str element: Incomplete name: Incomplete - def __init__(self, col, name, alt_names=...) -> None: ... + def __init__(self, col, name, alt_names=()) -> None: ... @property def proxy_set(self): ... @property @@ -123,9 +123,9 @@ class SQLCompiler(Compiled): self, dialect, statement, - cache_key: Incomplete | None = ..., - column_keys: Incomplete | None = ..., - for_executemany: bool = ..., + cache_key: Incomplete | None = None, + column_keys: Incomplete | None = None, + for_executemany: bool = False, linting=..., **kwargs, ) -> None: ... @@ -136,27 +136,27 @@ class SQLCompiler(Compiled): def is_subquery(self): ... @property def sql_compiler(self): ... - def construct_params(self, params: Incomplete | None = ..., _group_number: Incomplete | None = ..., _check: bool = ..., extracted_parameters: Incomplete | None = ..., escape_names: bool = ...): ... # type: ignore[override] + def construct_params(self, params: Incomplete | None = None, _group_number: Incomplete | None = None, _check: bool = True, extracted_parameters: Incomplete | None = None, escape_names: bool = True): ... # type: ignore[override] @property def params(self): ... def default_from(self): ... - def visit_grouping(self, grouping, asfrom: bool = ..., **kwargs): ... + def visit_grouping(self, grouping, asfrom: bool = False, **kwargs): ... def visit_select_statement_grouping(self, grouping, **kwargs): ... - def visit_label_reference(self, element, within_columns_clause: bool = ..., **kwargs): ... - def visit_textual_label_reference(self, element, within_columns_clause: bool = ..., **kwargs): ... + def visit_label_reference(self, element, within_columns_clause: bool = False, **kwargs): ... + def visit_textual_label_reference(self, element, within_columns_clause: bool = False, **kwargs): ... def visit_label( self, label, - add_to_result_map: Incomplete | None = ..., - within_label_clause: bool = ..., - within_columns_clause: bool = ..., - render_label_as_label: Incomplete | None = ..., - result_map_targets=..., + add_to_result_map: Incomplete | None = None, + within_label_clause: bool = False, + within_columns_clause: bool = False, + render_label_as_label: Incomplete | None = None, + result_map_targets=(), **kw, ): ... def visit_lambda_element(self, element, **kw): ... def visit_column( - self, column, add_to_result_map: Incomplete | None = ..., include_table: bool = ..., result_map_targets=..., **kwargs + self, column, add_to_result_map: Incomplete | None = None, include_table: bool = True, result_map_targets=(), **kwargs ): ... def visit_collation(self, element, **kw): ... def visit_fromclause(self, fromclause, **kwargs): ... @@ -164,8 +164,8 @@ class SQLCompiler(Compiled): def visit_typeclause(self, typeclause, **kw): ... def post_process_text(self, text): ... def escape_literal_column(self, text): ... - def visit_textclause(self, textclause, add_to_result_map: Incomplete | None = ..., **kw): ... - def visit_textual_select(self, taf, compound_index: Incomplete | None = ..., asfrom: bool = ..., **kw): ... + def visit_textclause(self, textclause, add_to_result_map: Incomplete | None = None, **kw): ... + def visit_textual_select(self, taf, compound_index: Incomplete | None = None, asfrom: bool = False, **kw): ... def visit_null(self, expr, **kw): ... def visit_true(self, expr, **kw): ... def visit_false(self, expr, **kw): ... @@ -179,13 +179,13 @@ class SQLCompiler(Compiled): def visit_funcfilter(self, funcfilter, **kwargs): ... def visit_extract(self, extract, **kwargs): ... def visit_scalar_function_column(self, element, **kw): ... - def visit_function(self, func, add_to_result_map: Incomplete | None = ..., **kwargs): ... + def visit_function(self, func, add_to_result_map: Incomplete | None = None, **kwargs): ... def visit_next_value_func(self, next_value, **kw): ... def visit_sequence(self, sequence, **kw) -> None: ... def function_argspec(self, func, **kwargs): ... compile_state: Incomplete - def visit_compound_select(self, cs, asfrom: bool = ..., compound_index: Incomplete | None = ..., **kwargs): ... - def visit_unary(self, unary, add_to_result_map: Incomplete | None = ..., result_map_targets=..., **kw): ... + def visit_compound_select(self, cs, asfrom: bool = False, compound_index: Incomplete | None = None, **kwargs): ... + def visit_unary(self, unary, add_to_result_map: Incomplete | None = None, result_map_targets=(), **kw): ... def visit_is_true_unary_operator(self, element, operator, **kw): ... def visit_is_false_unary_operator(self, element, operator, **kw): ... def visit_not_match_op_binary(self, binary, operator, **kw): ... @@ -195,10 +195,10 @@ class SQLCompiler(Compiled): def visit_binary( self, binary, - override_operator: Incomplete | None = ..., - eager_grouping: bool = ..., - from_linter: Incomplete | None = ..., - lateral_from_linter: Incomplete | None = ..., + override_operator: Incomplete | None = None, + eager_grouping: bool = False, + from_linter: Incomplete | None = None, + lateral_from_linter: Incomplete | None = None, **kw, ): ... def visit_function_as_comparison_op_binary(self, element, operator, **kw): ... @@ -224,24 +224,24 @@ class SQLCompiler(Compiled): def visit_bindparam( self, bindparam, - within_columns_clause: bool = ..., - literal_binds: bool = ..., - skip_bind_expression: bool = ..., - literal_execute: bool = ..., - render_postcompile: bool = ..., + within_columns_clause: bool = False, + literal_binds: bool = False, + skip_bind_expression: bool = False, + literal_execute: bool = False, + render_postcompile: bool = False, **kwargs, ): ... def render_literal_bindparam( - self, bindparam, render_literal_value=..., bind_expression_template: Incomplete | None = ..., **kw + self, bindparam, render_literal_value=..., bind_expression_template: Incomplete | None = None, **kw ): ... def render_literal_value(self, value, type_): ... def bindparam_string( self, name, - positional_names: Incomplete | None = ..., - post_compile: bool = ..., - expanding: bool = ..., - escaped_from: Incomplete | None = ..., + positional_names: Incomplete | None = None, + post_compile: bool = False, + expanding: bool = False, + escaped_from: Incomplete | None = None, **kw, ): ... execution_options: Incomplete @@ -249,11 +249,11 @@ class SQLCompiler(Compiled): def visit_cte( self, cte, - asfrom: bool = ..., - ashint: bool = ..., - fromhints: Incomplete | None = ..., - visiting_cte: Incomplete | None = ..., - from_linter: Incomplete | None = ..., + asfrom: bool = False, + ashint: bool = False, + fromhints: Incomplete | None = None, + visiting_cte: Incomplete | None = None, + from_linter: Incomplete | None = None, **kwargs, ): ... def visit_table_valued_alias(self, element, **kw): ... @@ -261,20 +261,20 @@ class SQLCompiler(Compiled): def visit_alias( self, alias, - asfrom: bool = ..., - ashint: bool = ..., - iscrud: bool = ..., - fromhints: Incomplete | None = ..., - subquery: bool = ..., - lateral: bool = ..., - enclosing_alias: Incomplete | None = ..., - from_linter: Incomplete | None = ..., + asfrom: bool = False, + ashint: bool = False, + iscrud: bool = False, + fromhints: Incomplete | None = None, + subquery: bool = False, + lateral: bool = False, + enclosing_alias: Incomplete | None = None, + from_linter: Incomplete | None = None, **kwargs, ): ... def visit_subquery(self, subquery, **kw): ... def visit_lateral(self, lateral_, **kw): ... - def visit_tablesample(self, tablesample, asfrom: bool = ..., **kw): ... - def visit_values(self, element, asfrom: bool = ..., from_linter: Incomplete | None = ..., **kw): ... + def visit_tablesample(self, tablesample, asfrom: bool = False, **kw): ... + def visit_values(self, element, asfrom: bool = False, from_linter: Incomplete | None = None, **kw): ... def get_render_as_alias_suffix(self, alias_name_text): ... def format_from_hint_text(self, sqltext, table, hint, iscrud): ... def get_select_hint_text(self, byfroms) -> None: ... @@ -285,13 +285,13 @@ class SQLCompiler(Compiled): def visit_select( self, select_stmt, - asfrom: bool = ..., - insert_into: bool = ..., - fromhints: Incomplete | None = ..., - compound_index: Incomplete | None = ..., - select_wraps_for: Incomplete | None = ..., - lateral: bool = ..., - from_linter: Incomplete | None = ..., + asfrom: bool = False, + insert_into: bool = False, + fromhints: Incomplete | None = None, + compound_index: Incomplete | None = None, + select_wraps_for: Incomplete | None = None, + lateral: bool = False, + from_linter: Incomplete | None = None, **kwargs, ): ... def get_cte_preamble(self, recursive): ... @@ -305,15 +305,15 @@ class SQLCompiler(Compiled): def visit_table( self, table, - asfrom: bool = ..., - iscrud: bool = ..., - ashint: bool = ..., - fromhints: Incomplete | None = ..., - use_schema: bool = ..., - from_linter: Incomplete | None = ..., + asfrom: bool = False, + iscrud: bool = False, + ashint: bool = False, + fromhints: Incomplete | None = None, + use_schema: bool = True, + from_linter: Incomplete | None = None, **kwargs, ): ... - def visit_join(self, join, asfrom: bool = ..., from_linter: Incomplete | None = ..., **kwargs): ... + def visit_join(self, join, asfrom: bool = False, from_linter: Incomplete | None = None, **kwargs): ... def visit_insert(self, insert_stmt, **kw): ... def update_limit_clause(self, update_stmt) -> None: ... def update_tables_clause(self, update_stmt, from_table, extra_froms, **kw): ... @@ -347,17 +347,17 @@ class DDLCompiler(Compiled): @memoized_property def type_compiler(self): ... def construct_params( - self, params: Incomplete | None = ..., extracted_parameters: Incomplete | None = ..., escape_names: bool = ... + self, params: Incomplete | None = None, extracted_parameters: Incomplete | None = None, escape_names: bool = True ) -> None: ... def visit_ddl(self, ddl, **kwargs): ... def visit_create_schema(self, create, **kw): ... def visit_drop_schema(self, drop, **kw): ... def visit_create_table(self, create, **kw): ... - def visit_create_column(self, create, first_pk: bool = ..., **kw): ... - def create_table_constraints(self, table, _include_foreign_key_constraints: Incomplete | None = ..., **kw): ... + def visit_create_column(self, create, first_pk: bool = False, **kw): ... + def create_table_constraints(self, table, _include_foreign_key_constraints: Incomplete | None = None, **kw): ... def visit_drop_table(self, drop, **kw): ... def visit_drop_view(self, drop, **kw): ... - def visit_create_index(self, create, include_schema: bool = ..., include_table_schema: bool = ..., **kw): ... + def visit_create_index(self, create, include_schema: bool = False, include_table_schema: bool = True, **kw): ... def visit_drop_index(self, drop, **kw): ... def visit_add_constraint(self, create, **kw): ... def visit_set_table_comment(self, create, **kw): ... @@ -365,7 +365,7 @@ class DDLCompiler(Compiled): def visit_set_column_comment(self, create, **kw): ... def visit_drop_column_comment(self, drop, **kw): ... def get_identity_options(self, identity_options): ... - def visit_create_sequence(self, create, prefix: Incomplete | None = ..., **kw): ... + def visit_create_sequence(self, create, prefix: Incomplete | None = None, **kw): ... def visit_drop_sequence(self, drop, **kw): ... def visit_drop_constraint(self, drop, **kw): ... def get_column_specification(self, column, **kwargs): ... @@ -449,36 +449,36 @@ class IdentifierPreparer: def __init__( self, dialect, - initial_quote: str = ..., - final_quote: Incomplete | None = ..., - escape_quote: str = ..., - quote_case_sensitive_collations: bool = ..., - omit_schema: bool = ..., + initial_quote: str = '"', + final_quote: Incomplete | None = None, + escape_quote: str = '"', + quote_case_sensitive_collations: bool = True, + omit_schema: bool = False, ) -> None: ... def validate_sql_phrase(self, element, reg): ... def quote_identifier(self, value): ... - def quote_schema(self, schema, force: Incomplete | None = ...): ... - def quote(self, ident, force: Incomplete | None = ...): ... + def quote_schema(self, schema, force: Incomplete | None = None): ... + def quote(self, ident, force: Incomplete | None = None): ... def format_collation(self, collation_name): ... - def format_sequence(self, sequence, use_schema: bool = ...): ... - def format_label(self, label, name: Incomplete | None = ...): ... - def format_alias(self, alias, name: Incomplete | None = ...): ... - def format_savepoint(self, savepoint, name: Incomplete | None = ...): ... - def format_constraint(self, constraint, _alembic_quote: bool = ...): ... - def truncate_and_render_index_name(self, name, _alembic_quote: bool = ...): ... - def truncate_and_render_constraint_name(self, name, _alembic_quote: bool = ...): ... + def format_sequence(self, sequence, use_schema: bool = True): ... + def format_label(self, label, name: Incomplete | None = None): ... + def format_alias(self, alias, name: Incomplete | None = None): ... + def format_savepoint(self, savepoint, name: Incomplete | None = None): ... + def format_constraint(self, constraint, _alembic_quote: bool = True): ... + def truncate_and_render_index_name(self, name, _alembic_quote: bool = True): ... + def truncate_and_render_constraint_name(self, name, _alembic_quote: bool = True): ... def format_index(self, index): ... - def format_table(self, table, use_schema: bool = ..., name: Incomplete | None = ...): ... + def format_table(self, table, use_schema: bool = True, name: Incomplete | None = None): ... def format_schema(self, name): ... - def format_label_name(self, name, anon_map: Incomplete | None = ...): ... + def format_label_name(self, name, anon_map: Incomplete | None = None): ... def format_column( self, column, - use_table: bool = ..., - name: Incomplete | None = ..., - table_name: Incomplete | None = ..., - use_schema: bool = ..., - anon_map: Incomplete | None = ..., + use_table: bool = False, + name: Incomplete | None = None, + table_name: Incomplete | None = None, + use_schema: bool = False, + anon_map: Incomplete | None = None, ): ... - def format_table_seq(self, table, use_schema: bool = ...): ... + def format_table_seq(self, table, use_schema: bool = True): ... def unformat_identifiers(self, identifiers): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/ddl.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/ddl.pyi index 5d34ce026300..4749fedd2bba 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/ddl.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/ddl.pyi @@ -12,11 +12,11 @@ class DDLElement(roles.DDLRole, Executable, _DDLCompiles): on: Any dialect: Any callable_: Any - def execute(self, bind: Incomplete | None = ..., target: Incomplete | None = ...): ... # type: ignore[override] + def execute(self, bind: Incomplete | None = None, target: Incomplete | None = None): ... # type: ignore[override] def against(self, target) -> None: ... state: Any def execute_if( - self, dialect: Incomplete | None = ..., callable_: Incomplete | None = ..., state: Incomplete | None = ... + self, dialect: Incomplete | None = None, callable_: Incomplete | None = None, state: Incomplete | None = None ) -> None: ... def __call__(self, target, bind, **kw): ... bind: Any @@ -25,7 +25,7 @@ class DDL(DDLElement): __visit_name__: str statement: Any context: Any - def __init__(self, statement, context: Incomplete | None = ..., bind: Incomplete | None = ...) -> None: ... + def __init__(self, statement, context: Incomplete | None = None, bind: Incomplete | None = None) -> None: ... class _CreateDropBase(DDLElement): element: Any @@ -35,10 +35,10 @@ class _CreateDropBase(DDLElement): def __init__( self, element, - bind: Incomplete | None = ..., - if_exists: bool = ..., - if_not_exists: bool = ..., - _legacy_bind: Incomplete | None = ..., + bind: Incomplete | None = None, + if_exists: bool = False, + if_not_exists: bool = False, + _legacy_bind: Incomplete | None = None, ) -> None: ... @property def stringify_dialect(self): ... @@ -46,13 +46,13 @@ class _CreateDropBase(DDLElement): class CreateSchema(_CreateDropBase): __visit_name__: str quote: Any - def __init__(self, name, quote: Incomplete | None = ..., **kw) -> None: ... + def __init__(self, name, quote: Incomplete | None = None, **kw) -> None: ... class DropSchema(_CreateDropBase): __visit_name__: str quote: Any cascade: Any - def __init__(self, name, quote: Incomplete | None = ..., cascade: bool = ..., **kw) -> None: ... + def __init__(self, name, quote: Incomplete | None = None, cascade: bool = False, **kw) -> None: ... class CreateTable(_CreateDropBase): __visit_name__: str @@ -61,9 +61,9 @@ class CreateTable(_CreateDropBase): def __init__( self, element, - bind: Incomplete | None = ..., - include_foreign_key_constraints: Incomplete | None = ..., - if_not_exists: bool = ..., + bind: Incomplete | None = None, + include_foreign_key_constraints: Incomplete | None = None, + if_not_exists: bool = False, ) -> None: ... class _DropView(_CreateDropBase): @@ -76,7 +76,7 @@ class CreateColumn(_DDLCompiles): class DropTable(_CreateDropBase): __visit_name__: str - def __init__(self, element, bind: Incomplete | None = ..., if_exists: bool = ...) -> None: ... + def __init__(self, element, bind: Incomplete | None = None, if_exists: bool = False) -> None: ... class CreateSequence(_CreateDropBase): __visit_name__: str @@ -86,11 +86,11 @@ class DropSequence(_CreateDropBase): class CreateIndex(_CreateDropBase): __visit_name__: str - def __init__(self, element, bind: Incomplete | None = ..., if_not_exists: bool = ...) -> None: ... + def __init__(self, element, bind: Incomplete | None = None, if_not_exists: bool = False) -> None: ... class DropIndex(_CreateDropBase): __visit_name__: str - def __init__(self, element, bind: Incomplete | None = ..., if_exists: bool = ...) -> None: ... + def __init__(self, element, bind: Incomplete | None = None, if_exists: bool = False) -> None: ... class AddConstraint(_CreateDropBase): __visit_name__: str @@ -99,7 +99,7 @@ class AddConstraint(_CreateDropBase): class DropConstraint(_CreateDropBase): __visit_name__: str cascade: Any - def __init__(self, element, cascade: bool = ..., **kw) -> None: ... + def __init__(self, element, cascade: bool = False, **kw) -> None: ... class SetTableComment(_CreateDropBase): __visit_name__: str @@ -123,18 +123,18 @@ class SchemaGenerator(DDLBase): preparer: Any dialect: Any memo: Any - def __init__(self, dialect, connection, checkfirst: bool = ..., tables: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, dialect, connection, checkfirst: bool = False, tables: Incomplete | None = None, **kwargs) -> None: ... def visit_metadata(self, metadata) -> None: ... def visit_table( self, table, - create_ok: bool = ..., - include_foreign_key_constraints: Incomplete | None = ..., - _is_metadata_operation: bool = ..., + create_ok: bool = False, + include_foreign_key_constraints: Incomplete | None = None, + _is_metadata_operation: bool = False, ) -> None: ... def visit_foreign_key_constraint(self, constraint) -> None: ... - def visit_sequence(self, sequence, create_ok: bool = ...) -> None: ... - def visit_index(self, index, create_ok: bool = ...) -> None: ... + def visit_sequence(self, sequence, create_ok: bool = False) -> None: ... + def visit_index(self, index, create_ok: bool = False) -> None: ... class SchemaDropper(DDLBase): checkfirst: Any @@ -142,14 +142,14 @@ class SchemaDropper(DDLBase): preparer: Any dialect: Any memo: Any - def __init__(self, dialect, connection, checkfirst: bool = ..., tables: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, dialect, connection, checkfirst: bool = False, tables: Incomplete | None = None, **kwargs) -> None: ... def visit_metadata(self, metadata): ... - def visit_index(self, index, drop_ok: bool = ...) -> None: ... - def visit_table(self, table, drop_ok: bool = ..., _is_metadata_operation: bool = ..., _ignore_sequences=...) -> None: ... + def visit_index(self, index, drop_ok: bool = False) -> None: ... + def visit_table(self, table, drop_ok: bool = False, _is_metadata_operation: bool = False, _ignore_sequences=()) -> None: ... def visit_foreign_key_constraint(self, constraint) -> None: ... - def visit_sequence(self, sequence, drop_ok: bool = ...) -> None: ... + def visit_sequence(self, sequence, drop_ok: bool = False) -> None: ... -def sort_tables(tables, skip_fn: Incomplete | None = ..., extra_dependencies: Incomplete | None = ...): ... +def sort_tables(tables, skip_fn: Incomplete | None = None, extra_dependencies: Incomplete | None = None): ... def sort_tables_and_constraints( - tables, filter_fn: Incomplete | None = ..., extra_dependencies: Incomplete | None = ..., _warn_for_cycles: bool = ... + tables, filter_fn: Incomplete | None = None, extra_dependencies: Incomplete | None = None, _warn_for_cycles: bool = False ): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/dml.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/dml.pyi index 8dbc7c04b8b8..891beefdf4a4 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/dml.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/dml.pyi @@ -42,7 +42,7 @@ class UpdateBase(roles.DMLRole, HasCTE, HasCompileState, DialectKWArgs, HasPrefi def returning(self, *cols) -> None: ... @property def exported_columns(self): ... - def with_hint(self, text, selectable: Incomplete | None = ..., dialect_name: str = ...) -> None: ... + def with_hint(self, text, selectable: Incomplete | None = None, dialect_name: str = "*") -> None: ... class ValuesBase(UpdateBase): __visit_name__: str @@ -60,16 +60,16 @@ class Insert(ValuesBase): def __init__( self, table, - values: Incomplete | None = ..., - inline: bool = ..., - bind: Incomplete | None = ..., - prefixes: Incomplete | None = ..., - returning: Incomplete | None = ..., - return_defaults: bool = ..., + values: Incomplete | None = None, + inline: bool = False, + bind: Incomplete | None = None, + prefixes: Incomplete | None = None, + returning: Incomplete | None = None, + return_defaults: bool = False, **dialect_kw, ) -> None: ... def inline(self) -> None: ... - def from_select(self, names, select, include_defaults: bool = ...) -> None: ... + def from_select(self, names, select, include_defaults: bool = True) -> None: ... class DMLWhereBase: def where(self, *whereclause) -> None: ... @@ -84,14 +84,14 @@ class Update(DMLWhereBase, ValuesBase): def __init__( self, table, - whereclause: Incomplete | None = ..., - values: Incomplete | None = ..., - inline: bool = ..., - bind: Incomplete | None = ..., - prefixes: Incomplete | None = ..., - returning: Incomplete | None = ..., - return_defaults: bool = ..., - preserve_parameter_order: bool = ..., + whereclause: Incomplete | None = None, + values: Incomplete | None = None, + inline: bool = False, + bind: Incomplete | None = None, + prefixes: Incomplete | None = None, + returning: Incomplete | None = None, + return_defaults: bool = False, + preserve_parameter_order: bool = False, **dialect_kw, ) -> None: ... def ordered_values(self, *args) -> None: ... @@ -104,9 +104,9 @@ class Delete(DMLWhereBase, UpdateBase): def __init__( self, table, - whereclause: Incomplete | None = ..., - bind: Incomplete | None = ..., - returning: Incomplete | None = ..., - prefixes: Incomplete | None = ..., + whereclause: Incomplete | None = None, + bind: Incomplete | None = None, + returning: Incomplete | None = None, + prefixes: Incomplete | None = None, **dialect_kw, ) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/elements.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/elements.pyi index 93c53c0c5c65..48be8c4669d7 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/elements.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/elements.pyi @@ -13,9 +13,9 @@ from .visitors import Traversible _T = TypeVar("_T") def collate(expression, collation): ... -def between(expr, lower_bound, upper_bound, symmetric: bool = ...): ... -def literal(value, type_: Incomplete | None = ...): ... -def outparam(key, type_: Incomplete | None = ...): ... +def between(expr, lower_bound, upper_bound, symmetric: bool = False): ... +def literal(value, type_: Incomplete | None = None): ... +def outparam(key, type_: Incomplete | None = None): ... def not_(clause): ... class ClauseElement(roles.SQLRole, SupportsWrappingAnnotations, MemoizedHasCacheKey, HasCopyInternals, Traversible): @@ -31,8 +31,8 @@ class ClauseElement(roles.SQLRole, SupportsWrappingAnnotations, MemoizedHasCache def unique_params(self, *optionaldict, **kwargs): ... def params(self, *optionaldict, **kwargs): ... def compare(self, other, **kw): ... - def self_group(self, against: Incomplete | None = ...): ... - def compile(self, bind: Incomplete | None = ..., dialect: Incomplete | None = ..., **kw): ... + def self_group(self, against: Incomplete | None = None): ... + def compile(self, bind: Incomplete | None = None, dialect: Incomplete | None = None, **kw): ... def __invert__(self): ... def __bool__(self) -> bool: ... def __nonzero__(self) -> bool: ... @@ -56,7 +56,7 @@ class ColumnElement( primary_key: bool foreign_keys: Any key: Any - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... @memoized_property def type(self): ... @HasMemoized.memoized_attribute @@ -99,17 +99,17 @@ class BindParameter(roles.InElementRole, ColumnElement[_T], Generic[_T]): self, key, value=..., - type_: Incomplete | None = ..., - unique: bool = ..., + type_: Incomplete | None = None, + unique: bool = False, required=..., - quote: Incomplete | None = ..., - callable_: Incomplete | None = ..., - expanding: bool = ..., - isoutparam: bool = ..., - literal_execute: bool = ..., - _compared_to_operator: Incomplete | None = ..., - _compared_to_type: Incomplete | None = ..., - _is_crud: bool = ..., + quote: Incomplete | None = None, + callable_: Incomplete | None = None, + expanding: bool = False, + isoutparam: bool = False, + literal_execute: bool = False, + _compared_to_operator: Incomplete | None = None, + _compared_to_type: Incomplete | None = None, + _is_crud: bool = False, ) -> None: ... @property def effective_value(self): ... @@ -144,7 +144,7 @@ class TextClause( def type(self): ... @property def comparator(self): ... - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... class Null(SingletonConstant, roles.ConstExprRole, ColumnElement[None]): __visit_name__: str @@ -171,7 +171,7 @@ class ClauseList(roles.InElementRole, roles.OrderByRole, roles.ColumnsClauseRole def __iter__(self): ... def __len__(self) -> int: ... def append(self, clause) -> None: ... - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... class BooleanClauseList(ClauseList, ColumnElement[Any]): __visit_name__: str @@ -181,7 +181,7 @@ class BooleanClauseList(ClauseList, ColumnElement[Any]): def and_(cls, *clauses): ... @classmethod def or_(cls, *clauses): ... - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... and_: Any or_: Any @@ -190,7 +190,7 @@ class Tuple(ClauseList, ColumnElement[Any]): __visit_name__: str type: Any def __init__(self, *clauses, **kw) -> None: ... - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... class Case(ColumnElement[Any]): __visit_name__: str @@ -200,7 +200,7 @@ class Case(ColumnElement[Any]): else_: Any def __init__(self, *whens, **kw) -> None: ... -def literal_column(text, type_: Incomplete | None = ...): ... +def literal_column(text, type_: Incomplete | None = None): ... class Cast(WrapsColumnExpression, ColumnElement[Any]): __visit_name__: str @@ -220,7 +220,7 @@ class TypeCoerce(WrapsColumnExpression, ColumnElement[Any]): def typed_expression(self): ... @property def wrapped_column_expression(self): ... - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... class Extract(ColumnElement[Any]): __visit_name__: str @@ -249,12 +249,12 @@ class UnaryExpression(ColumnElement[Any]): def __init__( self, element, - operator: Incomplete | None = ..., - modifier: Incomplete | None = ..., - type_: Incomplete | None = ..., - wraps_column_expression: bool = ..., + operator: Incomplete | None = None, + modifier: Incomplete | None = None, + type_: Incomplete | None = None, + wraps_column_expression: bool = False, ) -> None: ... - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... class CollectionAggregate(UnaryExpression): inherit_cache: bool @@ -272,7 +272,7 @@ class AsBoolean(WrapsColumnExpression, UnaryExpression): def __init__(self, element, operator, negate) -> None: ... @property def wrapped_column_expression(self): ... - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... class BinaryExpression(ColumnElement[Any]): __visit_name__: str @@ -287,15 +287,15 @@ class BinaryExpression(ColumnElement[Any]): left, right, operator, - type_: Incomplete | None = ..., - negate: Incomplete | None = ..., - modifiers: Incomplete | None = ..., + type_: Incomplete | None = None, + negate: Incomplete | None = None, + modifiers: Incomplete | None = None, ) -> None: ... def __bool__(self) -> bool: ... def __nonzero__(self) -> bool: ... @property def is_comparison(self): ... - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... class Slice(ColumnElement[Any]): __visit_name__: str @@ -303,15 +303,15 @@ class Slice(ColumnElement[Any]): stop: Any step: Any type: Any - def __init__(self, start, stop, step, _name: Incomplete | None = ...) -> None: ... - def self_group(self, against: Incomplete | None = ...): ... + def __init__(self, start, stop, step, _name: Incomplete | None = None) -> None: ... + def self_group(self, against: Incomplete | None = None): ... class IndexExpression(BinaryExpression): inherit_cache: bool class GroupedElement(ClauseElement): __visit_name__: str - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... class Grouping(GroupedElement, ColumnElement[Any]): element: Any @@ -332,10 +332,10 @@ class Over(ColumnElement[Any]): def __init__( self, element, - partition_by: Incomplete | None = ..., - order_by: Incomplete | None = ..., - range_: Incomplete | None = ..., - rows: Incomplete | None = ..., + partition_by: Incomplete | None = None, + order_by: Incomplete | None = None, + range_: Incomplete | None = None, + rows: Incomplete | None = None, ) -> None: ... def __reduce__(self): ... @memoized_property @@ -349,10 +349,10 @@ class WithinGroup(ColumnElement[Any]): def __reduce__(self): ... def over( self, - partition_by: Incomplete | None = ..., - order_by: Incomplete | None = ..., - range_: Incomplete | None = ..., - rows: Incomplete | None = ..., + partition_by: Incomplete | None = None, + order_by: Incomplete | None = None, + range_: Incomplete | None = None, + rows: Incomplete | None = None, ): ... @memoized_property def type(self): ... @@ -365,12 +365,12 @@ class FunctionFilter(ColumnElement[Any]): def filter(self, *criterion): ... def over( self, - partition_by: Incomplete | None = ..., - order_by: Incomplete | None = ..., - range_: Incomplete | None = ..., - rows: Incomplete | None = ..., + partition_by: Incomplete | None = None, + order_by: Incomplete | None = None, + range_: Incomplete | None = None, + rows: Incomplete | None = None, ): ... - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... @memoized_property def type(self): ... @@ -378,13 +378,13 @@ class Label(roles.LabeledColumnExprRole, ColumnElement[Any]): __visit_name__: str name: Any key: Any - def __init__(self, name, element, type_: Incomplete | None = ...) -> None: ... + def __init__(self, name, element, type_: Incomplete | None = None) -> None: ... def __reduce__(self): ... @memoized_property def type(self): ... @HasMemoized.memoized_attribute def element(self): ... - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... @property def primary_key(self): ... @property @@ -407,9 +407,9 @@ class ColumnClause(roles.DDLReferredColumnRole, roles.LabeledColumnExprRole, rol key: Any type: Any def __init__( - self, text, type_: Incomplete | None = ..., is_literal: bool = ..., _selectable: Incomplete | None = ... + self, text, type_: Incomplete | None = None, is_literal: bool = False, _selectable: Incomplete | None = None ) -> None: ... - def get_children(self, column_tables: bool = ..., **kw): ... # type: ignore[override] + def get_children(self, column_tables: bool = False, **kw): ... # type: ignore[override] @property def entity_namespace(self): ... @@ -459,7 +459,7 @@ class AnnotatedColumnElement(Annotated): def info(self): ... class _truncated_label(quoted_name): - def __new__(cls, value, quote: Incomplete | None = ...): ... + def __new__(cls, value, quote: Incomplete | None = None): ... def __reduce__(self): ... def apply_map(self, map_): ... @@ -467,7 +467,7 @@ class conv(_truncated_label): ... class _anonymous_label(_truncated_label): @classmethod - def safe_construct(cls, seed, body, enclosing_label: Incomplete | None = ..., sanitize_key: bool = ...): ... + def safe_construct(cls, seed, body, enclosing_label: Incomplete | None = None, sanitize_key: bool = False): ... def __add__(self, other): ... def __radd__(self, other): ... def apply_map(self, map_): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi index c1a0d1ec43ae..1cf78c365ab2 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi @@ -7,15 +7,15 @@ from .elements import BinaryExpression, ColumnElement, NamedColumn from .selectable import FromClause, TableValuedAlias from .visitors import TraversibleType -def register_function(identifier, fn, package: str = ...) -> None: ... +def register_function(identifier, fn, package: str = "_default") -> None: ... class FunctionElement(Executable, ColumnElement[Any], FromClause, Generative): # type: ignore[misc] packagenames: Incomplete clause_expr: Incomplete def __init__(self, *clauses, **kwargs) -> None: ... - def scalar_table_valued(self, name, type_: Incomplete | None = ...): ... + def scalar_table_valued(self, name, type_: Incomplete | None = None): ... def table_valued(self, *expr, **kw): ... - def column_valued(self, name: str | None = ..., joins_implicitly: bool = ...): ... + def column_valued(self, name: str | None = None, joins_implicitly: bool = False): ... @property def columns(self): ... @property @@ -24,20 +24,20 @@ class FunctionElement(Executable, ColumnElement[Any], FromClause, Generative): def clauses(self): ... def over( self, - partition_by: Incomplete | None = ..., - order_by: Incomplete | None = ..., - rows: Incomplete | None = ..., - range_: Incomplete | None = ..., + partition_by: Incomplete | None = None, + order_by: Incomplete | None = None, + rows: Incomplete | None = None, + range_: Incomplete | None = None, ): ... def within_group(self, *order_by): ... def filter(self, *criterion): ... def as_comparison(self, left_index, right_index): ... def within_group_type(self, within_group) -> None: ... - def alias(self, name: str | None = ..., joins_implicitly: bool = ...) -> TableValuedAlias: ... # type: ignore[override] + def alias(self, name: str | None = None, joins_implicitly: bool = False) -> TableValuedAlias: ... # type: ignore[override] def select(self): ... def scalar(self): ... def execute(self): ... - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... @property def entity_namespace(self): ... @@ -66,7 +66,7 @@ class ScalarFunctionColumn(NamedColumn): fn: Incomplete name: Incomplete type: Incomplete - def __init__(self, fn, name, type_: Incomplete | None = ...) -> None: ... + def __init__(self, fn, name, type_: Incomplete | None = None) -> None: ... class _FunctionGenerator: opts: Incomplete @@ -143,7 +143,7 @@ class random(GenericFunction): class count(GenericFunction): type: Incomplete inherit_cache: bool - def __init__(self, expression: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, expression: Incomplete | None = None, **kwargs) -> None: ... class current_date(AnsiFunction): type: Incomplete diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/lambdas.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/lambdas.pyi index b6ada6db4382..49c91eefc3c5 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/lambdas.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/lambdas.pyi @@ -17,12 +17,12 @@ class LambdaOptions(Options): def lambda_stmt( lmb, - enable_tracking: bool = ..., - track_closure_variables: bool = ..., - track_on: Incomplete | None = ..., - global_track_bound_values: bool = ..., - track_bound_values: bool = ..., - lambda_cache: Incomplete | None = ..., + enable_tracking: bool = True, + track_closure_variables: bool = True, + track_on: Incomplete | None = None, + global_track_bound_values: bool = True, + track_bound_values: bool = True, + lambda_cache: Incomplete | None = None, ): ... class LambdaElement(elements.ClauseElement): @@ -32,22 +32,22 @@ class LambdaElement(elements.ClauseElement): role: Incomplete tracker_key: Incomplete opts: Incomplete - def __init__(self, fn, role, opts=..., apply_propagate_attrs: Incomplete | None = ...) -> None: ... + def __init__(self, fn, role, opts=..., apply_propagate_attrs: Incomplete | None = None) -> None: ... def __getattr__(self, key: str): ... class DeferredLambdaElement(LambdaElement): lambda_args: Incomplete - def __init__(self, fn, role, opts=..., lambda_args=...) -> None: ... + def __init__(self, fn, role, opts=..., lambda_args=()) -> None: ... class StatementLambdaElement(roles.AllowsLambdaRole, LambdaElement): def __add__(self, other): ... def add_criteria( self, other, - enable_tracking: bool = ..., - track_on: Incomplete | None = ..., - track_closure_variables: bool = ..., - track_bound_values: bool = ..., + enable_tracking: bool = True, + track_on: Incomplete | None = None, + track_closure_variables: bool = True, + track_bound_values: bool = True, ): ... def spoil(self): ... @@ -105,9 +105,9 @@ class PyWrapper(ColumnOperators[_T], Generic[_T]): fn, name, to_evaluate, - closure_index: Incomplete | None = ..., - getter: Incomplete | None = ..., - track_bound_values: bool = ..., + closure_index: Incomplete | None = None, + getter: Incomplete | None = None, + track_bound_values: bool = True, ) -> None: ... def __call__(self, *arg, **kw): ... def operate(self, op, *other, **kwargs): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/operators.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/operators.pyi index abfafe7c2e63..cb91ff53553d 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/operators.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/operators.pyi @@ -11,8 +11,8 @@ class Operators: def __and__(self, other): ... def __or__(self, other): ... def __invert__(self): ... - def op(self, opstring, precedence: int = ..., is_comparison: bool = ..., return_type: Incomplete | None = ...): ... - def bool_op(self, opstring, precedence: int = ...): ... + def op(self, opstring, precedence: int = 0, is_comparison: bool = False, return_type: Incomplete | None = None): ... + def bool_op(self, opstring, precedence: int = 0): ... def operate(self, op, *other, **kwargs): ... def reverse_operate(self, op, other, **kwargs): ... @@ -27,11 +27,11 @@ class custom_op: def __init__( self, opstring, - precedence: int = ..., - is_comparison: bool = ..., - return_type: Incomplete | None = ..., - natural_self_precedent: bool = ..., - eager_grouping: bool = ..., + precedence: int = 0, + is_comparison: bool = False, + return_type: Incomplete | None = None, + natural_self_precedent: bool = False, + eager_grouping: bool = False, ) -> None: ... def __eq__(self, other): ... def __hash__(self) -> int: ... @@ -55,15 +55,15 @@ class ColumnOperators(Operators, Generic[_T]): def __lshift__(self, other) -> ColumnOperators[_T]: ... def __rshift__(self, other) -> ColumnOperators[_T]: ... def concat(self, other: _T | ColumnOperators[_T] | None) -> ColumnOperators[_T]: ... - def like(self, other: _T, escape: str | None = ...) -> ColumnOperators[_T]: ... - def ilike(self, other: _T, escape: str | None = ...) -> ColumnOperators[_T]: ... + def like(self, other: _T, escape: str | None = None) -> ColumnOperators[_T]: ... + def ilike(self, other: _T, escape: str | None = None) -> ColumnOperators[_T]: ... def in_(self, other: Container[_T] | Iterable[_T]) -> ColumnOperators[_T]: ... def not_in(self, other: Container[_T] | Iterable[_T]) -> ColumnOperators[_T]: ... def notin_(self, other: Container[_T] | Iterable[_T]) -> ColumnOperators[_T]: ... - def not_like(self, other: _T, escape: str | None = ...) -> ColumnOperators[_T]: ... - def notlike(self, other: _T, escape: str | None = ...) -> ColumnOperators[_T]: ... - def not_ilike(self, other: _T, escape: str | None = ...) -> ColumnOperators[_T]: ... - def notilike(self, other: _T, escape: str | None = ...) -> ColumnOperators[_T]: ... + def not_like(self, other: _T, escape: str | None = None) -> ColumnOperators[_T]: ... + def notlike(self, other: _T, escape: str | None = None) -> ColumnOperators[_T]: ... + def not_ilike(self, other: _T, escape: str | None = None) -> ColumnOperators[_T]: ... + def notilike(self, other: _T, escape: str | None = None) -> ColumnOperators[_T]: ... def is_(self, other: _T) -> ColumnOperators[_T]: ... def is_not(self, other: _T) -> ColumnOperators[_T]: ... def isnot(self, other: _T) -> ColumnOperators[_T]: ... @@ -71,8 +71,8 @@ class ColumnOperators(Operators, Generic[_T]): def endswith(self, other: str, **kwargs) -> ColumnOperators[_T]: ... def contains(self, other: str, **kwargs) -> ColumnOperators[_T]: ... def match(self, other: str, **kwargs) -> ColumnOperators[_T]: ... - def regexp_match(self, pattern, flags: Incomplete | None = ...) -> ColumnOperators[_T]: ... - def regexp_replace(self, pattern, replacement, flags: Incomplete | None = ...) -> ColumnOperators[_T]: ... + def regexp_match(self, pattern, flags: Incomplete | None = None) -> ColumnOperators[_T]: ... + def regexp_replace(self, pattern, replacement, flags: Incomplete | None = None) -> ColumnOperators[_T]: ... def desc(self) -> ColumnOperators[_T]: ... def asc(self) -> ColumnOperators[_T]: ... def nulls_first(self) -> ColumnOperators[_T]: ... @@ -85,7 +85,7 @@ class ColumnOperators(Operators, Generic[_T]): def __rmul__(self, other) -> ColumnOperators[_T]: ... def __rdiv__(self, other) -> ColumnOperators[_T]: ... def __rmod__(self, other) -> ColumnOperators[_T]: ... - def between(self, cleft, cright, symmetric: bool = ...) -> ColumnOperators[_T]: ... + def between(self, cleft, cright, symmetric: bool = False) -> ColumnOperators[_T]: ... def distinct(self) -> ColumnOperators[_T]: ... def any_(self) -> ColumnOperators[_T]: ... def all_(self) -> ColumnOperators[_T]: ... @@ -123,18 +123,18 @@ isnot = is_not def collate(a, b): ... def op(a, opstring, b): ... -def like_op(a, b, escape: Incomplete | None = ...): ... -def not_like_op(a, b, escape: Incomplete | None = ...): ... +def like_op(a, b, escape: Incomplete | None = None): ... +def not_like_op(a, b, escape: Incomplete | None = None): ... notlike_op = not_like_op -def ilike_op(a, b, escape: Incomplete | None = ...): ... -def not_ilike_op(a, b, escape: Incomplete | None = ...): ... +def ilike_op(a, b, escape: Incomplete | None = None): ... +def not_ilike_op(a, b, escape: Incomplete | None = None): ... notilike_op = not_ilike_op -def between_op(a, b, c, symmetric: bool = ...): ... -def not_between_op(a, b, c, symmetric: bool = ...): ... +def between_op(a, b, c, symmetric: bool = False): ... +def not_between_op(a, b, c, symmetric: bool = False): ... notbetween_op = not_between_op @@ -146,25 +146,25 @@ notin_op = not_in_op def distinct_op(a): ... def any_op(a): ... def all_op(a): ... -def startswith_op(a, b, escape: Incomplete | None = ..., autoescape: bool = ...): ... -def not_startswith_op(a, b, escape: Incomplete | None = ..., autoescape: bool = ...): ... +def startswith_op(a, b, escape: Incomplete | None = None, autoescape: bool = False): ... +def not_startswith_op(a, b, escape: Incomplete | None = None, autoescape: bool = False): ... notstartswith_op = not_startswith_op -def endswith_op(a, b, escape: Incomplete | None = ..., autoescape: bool = ...): ... -def not_endswith_op(a, b, escape: Incomplete | None = ..., autoescape: bool = ...): ... +def endswith_op(a, b, escape: Incomplete | None = None, autoescape: bool = False): ... +def not_endswith_op(a, b, escape: Incomplete | None = None, autoescape: bool = False): ... notendswith_op = not_endswith_op -def contains_op(a, b, escape: Incomplete | None = ..., autoescape: bool = ...): ... -def not_contains_op(a, b, escape: Incomplete | None = ..., autoescape: bool = ...): ... +def contains_op(a, b, escape: Incomplete | None = None, autoescape: bool = False): ... +def not_contains_op(a, b, escape: Incomplete | None = None, autoescape: bool = False): ... notcontains_op = not_contains_op def match_op(a, b, **kw): ... -def regexp_match_op(a, b, flags: Incomplete | None = ...): ... -def not_regexp_match_op(a, b, flags: Incomplete | None = ...): ... -def regexp_replace_op(a, b, replacement, flags: Incomplete | None = ...): ... +def regexp_match_op(a, b, flags: Incomplete | None = None): ... +def not_regexp_match_op(a, b, flags: Incomplete | None = None): ... +def regexp_replace_op(a, b, replacement, flags: Incomplete | None = None): ... def not_match_op(a, b, **kw): ... notmatch_op = not_match_op diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi index 21656beed655..3199c6d3dcd2 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi @@ -30,13 +30,13 @@ class Table(DialectKWArgs, SchemaItem, TableClause): @property def bind(self): ... def add_is_dependent_on(self, table) -> None: ... - def append_column(self, column, replace_existing: bool = ...) -> None: ... # type: ignore[override] + def append_column(self, column, replace_existing: bool = False) -> None: ... # type: ignore[override] def append_constraint(self, constraint) -> None: ... - def exists(self, bind: Incomplete | None = ...): ... - def create(self, bind: Incomplete | None = ..., checkfirst: bool = ...) -> None: ... - def drop(self, bind: Incomplete | None = ..., checkfirst: bool = ...) -> None: ... - def tometadata(self, metadata, schema=..., referred_schema_fn: Incomplete | None = ..., name: Incomplete | None = ...): ... - def to_metadata(self, metadata, schema=..., referred_schema_fn: Incomplete | None = ..., name: Incomplete | None = ...): ... + def exists(self, bind: Incomplete | None = None): ... + def create(self, bind: Incomplete | None = None, checkfirst: bool = False) -> None: ... + def drop(self, bind: Incomplete | None = None, checkfirst: bool = False) -> None: ... + def tometadata(self, metadata, schema=..., referred_schema_fn: Incomplete | None = None, name: Incomplete | None = None): ... + def to_metadata(self, metadata, schema=..., referred_schema_fn: Incomplete | None = None, name: Incomplete | None = None): ... class Column(DialectKWArgs, SchemaItem, ColumnClause): __visit_name__: str @@ -80,20 +80,20 @@ class ForeignKey(DialectKWArgs, SchemaItem): def __init__( self, column, - _constraint: Incomplete | None = ..., - use_alter: bool = ..., - name: Incomplete | None = ..., - onupdate: Incomplete | None = ..., - ondelete: Incomplete | None = ..., - deferrable: Incomplete | None = ..., - initially: Incomplete | None = ..., - link_to_name: bool = ..., - match: Incomplete | None = ..., - info: Incomplete | None = ..., - _unresolvable: bool = ..., + _constraint: Incomplete | None = None, + use_alter: bool = False, + name: Incomplete | None = None, + onupdate: Incomplete | None = None, + ondelete: Incomplete | None = None, + deferrable: Incomplete | None = None, + initially: Incomplete | None = None, + link_to_name: bool = False, + match: Incomplete | None = None, + info: Incomplete | None = None, + _unresolvable: bool = False, **dialect_kw, ) -> None: ... - def copy(self, schema: Incomplete | None = ..., **kw): ... + def copy(self, schema: Incomplete | None = None, **kw): ... @property def target_fullname(self): ... def references(self, table): ... @@ -107,8 +107,8 @@ class DefaultGenerator(Executable, SchemaItem): is_server_default: bool column: Any for_update: Any - def __init__(self, for_update: bool = ...) -> None: ... - def execute(self, bind: Incomplete | None = ...): ... # type: ignore[override] + def __init__(self, for_update: bool = False) -> None: ... + def execute(self, bind: Incomplete | None = None): ... # type: ignore[override] @property def bind(self): ... @@ -134,15 +134,15 @@ class IdentityOptions: order: Any def __init__( self, - start: Incomplete | None = ..., - increment: Incomplete | None = ..., - minvalue: Incomplete | None = ..., - maxvalue: Incomplete | None = ..., - nominvalue: Incomplete | None = ..., - nomaxvalue: Incomplete | None = ..., - cycle: Incomplete | None = ..., - cache: Incomplete | None = ..., - order: Incomplete | None = ..., + start: Incomplete | None = None, + increment: Incomplete | None = None, + minvalue: Incomplete | None = None, + maxvalue: Incomplete | None = None, + nominvalue: Incomplete | None = None, + nomaxvalue: Incomplete | None = None, + cycle: Incomplete | None = None, + cache: Incomplete | None = None, + order: Incomplete | None = None, ) -> None: ... class Sequence(IdentityOptions, DefaultGenerator): @@ -156,22 +156,22 @@ class Sequence(IdentityOptions, DefaultGenerator): def __init__( self, name, - start: Incomplete | None = ..., - increment: Incomplete | None = ..., - minvalue: Incomplete | None = ..., - maxvalue: Incomplete | None = ..., - nominvalue: Incomplete | None = ..., - nomaxvalue: Incomplete | None = ..., - cycle: Incomplete | None = ..., - schema: Incomplete | None = ..., - cache: Incomplete | None = ..., - order: Incomplete | None = ..., - data_type: Incomplete | None = ..., - optional: bool = ..., - quote: Incomplete | None = ..., - metadata: Incomplete | None = ..., - quote_schema: Incomplete | None = ..., - for_update: bool = ..., + start: Incomplete | None = None, + increment: Incomplete | None = None, + minvalue: Incomplete | None = None, + maxvalue: Incomplete | None = None, + nominvalue: Incomplete | None = None, + nomaxvalue: Incomplete | None = None, + cycle: Incomplete | None = None, + schema: Incomplete | None = None, + cache: Incomplete | None = None, + order: Incomplete | None = None, + data_type: Incomplete | None = None, + optional: bool = False, + quote: Incomplete | None = None, + metadata: Incomplete | None = None, + quote_schema: Incomplete | None = None, + for_update: bool = False, ) -> None: ... @memoized_property def is_callable(self): ... @@ -180,8 +180,8 @@ class Sequence(IdentityOptions, DefaultGenerator): def next_value(self): ... @property def bind(self): ... - def create(self, bind: Incomplete | None = ..., checkfirst: bool = ...) -> None: ... - def drop(self, bind: Incomplete | None = ..., checkfirst: bool = ...) -> None: ... + def create(self, bind: Incomplete | None = None, checkfirst: bool = True) -> None: ... + def drop(self, bind: Incomplete | None = None, checkfirst: bool = True) -> None: ... class FetchedValue(SchemaEventTarget): is_server_default: bool @@ -189,13 +189,13 @@ class FetchedValue(SchemaEventTarget): has_argument: bool is_clause_element: bool for_update: Any - def __init__(self, for_update: bool = ...) -> None: ... + def __init__(self, for_update: bool = False) -> None: ... class DefaultClause(FetchedValue): has_argument: bool arg: Any reflected: Any - def __init__(self, arg, for_update: bool = ..., _reflected: bool = ...) -> None: ... + def __init__(self, arg, for_update: bool = False, _reflected: bool = False) -> None: ... class Constraint(DialectKWArgs, SchemaItem): __visit_name__: str @@ -205,12 +205,12 @@ class Constraint(DialectKWArgs, SchemaItem): info: Any def __init__( self, - name: Incomplete | None = ..., - deferrable: Incomplete | None = ..., - initially: Incomplete | None = ..., - _create_rule: Incomplete | None = ..., - info: Incomplete | None = ..., - _type_bound: bool = ..., + name: Incomplete | None = None, + deferrable: Incomplete | None = None, + initially: Incomplete | None = None, + _create_rule: Incomplete | None = None, + info: Incomplete | None = None, + _type_bound: bool = False, **dialect_kw, ) -> None: ... @property @@ -225,7 +225,7 @@ class ColumnCollectionConstraint(ColumnCollectionMixin, Constraint): def __init__(self, *columns, **kw) -> None: ... columns: Any def __contains__(self, x): ... - def copy(self, target_table: Incomplete | None = ..., **kw): ... + def copy(self, target_table: Incomplete | None = None, **kw): ... def contains_column(self, col): ... def __iter__(self): ... def __len__(self) -> int: ... @@ -236,19 +236,19 @@ class CheckConstraint(ColumnCollectionConstraint): def __init__( self, sqltext, - name: Incomplete | None = ..., - deferrable: Incomplete | None = ..., - initially: Incomplete | None = ..., - table: Incomplete | None = ..., - info: Incomplete | None = ..., - _create_rule: Incomplete | None = ..., - _autoattach: bool = ..., - _type_bound: bool = ..., + name: Incomplete | None = None, + deferrable: Incomplete | None = None, + initially: Incomplete | None = None, + table: Incomplete | None = None, + info: Incomplete | None = None, + _create_rule: Incomplete | None = None, + _autoattach: bool = True, + _type_bound: bool = False, **kw, ) -> None: ... @property def is_column_level(self): ... - def copy(self, target_table: Incomplete | None = ..., **kw): ... + def copy(self, target_table: Incomplete | None = None, **kw): ... class ForeignKeyConstraint(ColumnCollectionConstraint): __visit_name__: str @@ -262,16 +262,16 @@ class ForeignKeyConstraint(ColumnCollectionConstraint): self, columns, refcolumns, - name: Incomplete | None = ..., - onupdate: Incomplete | None = ..., - ondelete: Incomplete | None = ..., - deferrable: Incomplete | None = ..., - initially: Incomplete | None = ..., - use_alter: bool = ..., - link_to_name: bool = ..., - match: Incomplete | None = ..., - table: Incomplete | None = ..., - info: Incomplete | None = ..., + name: Incomplete | None = None, + onupdate: Incomplete | None = None, + ondelete: Incomplete | None = None, + deferrable: Incomplete | None = None, + initially: Incomplete | None = None, + use_alter: bool = False, + link_to_name: bool = False, + match: Incomplete | None = None, + table: Incomplete | None = None, + info: Incomplete | None = None, **dialect_kw, ) -> None: ... columns: Any @@ -279,7 +279,7 @@ class ForeignKeyConstraint(ColumnCollectionConstraint): def referred_table(self): ... @property def column_keys(self): ... - def copy(self, schema: Incomplete | None = ..., target_table: Incomplete | None = ..., **kw): ... # type: ignore[override] + def copy(self, schema: Incomplete | None = None, target_table: Incomplete | None = None, **kw): ... # type: ignore[override] class PrimaryKeyConstraint(ColumnCollectionConstraint): __visit_name__: str @@ -300,8 +300,8 @@ class Index(DialectKWArgs, ColumnCollectionMixin, SchemaItem): def __init__(self, name, *expressions, **kw) -> None: ... @property def bind(self): ... - def create(self, bind: Incomplete | None = ..., checkfirst: bool = ...): ... - def drop(self, bind: Incomplete | None = ..., checkfirst: bool = ...) -> None: ... + def create(self, bind: Incomplete | None = None, checkfirst: bool = False): ... + def drop(self, bind: Incomplete | None = None, checkfirst: bool = False) -> None: ... DEFAULT_NAMING_CONVENTION: Any @@ -313,11 +313,11 @@ class MetaData(SchemaItem): info: Any def __init__( self, - bind: Incomplete | None = ..., - schema: Incomplete | None = ..., - quote_schema: Incomplete | None = ..., - naming_convention: Incomplete | None = ..., - info: Incomplete | None = ..., + bind: Incomplete | None = None, + schema: Incomplete | None = None, + quote_schema: Incomplete | None = None, + naming_convention: Incomplete | None = None, + info: Incomplete | None = None, ) -> None: ... def __contains__(self, table_or_key) -> bool: ... def is_bound(self): ... @@ -328,17 +328,17 @@ class MetaData(SchemaItem): def sorted_tables(self): ... def reflect( self, - bind: Incomplete | None = ..., - schema: Incomplete | None = ..., - views: bool = ..., - only: Incomplete | None = ..., - extend_existing: bool = ..., - autoload_replace: bool = ..., - resolve_fks: bool = ..., + bind: Incomplete | None = None, + schema: Incomplete | None = None, + views: bool = False, + only: Incomplete | None = None, + extend_existing: bool = False, + autoload_replace: bool = True, + resolve_fks: bool = True, **dialect_kwargs, ) -> None: ... - def create_all(self, bind: Incomplete | None = ..., tables: Incomplete | None = ..., checkfirst: bool = ...) -> None: ... - def drop_all(self, bind: Incomplete | None = ..., tables: Incomplete | None = ..., checkfirst: bool = ...) -> None: ... + def create_all(self, bind: Incomplete | None = None, tables: Incomplete | None = None, checkfirst: bool = True) -> None: ... + def drop_all(self, bind: Incomplete | None = None, tables: Incomplete | None = None, checkfirst: bool = True) -> None: ... class ThreadLocalMetaData(MetaData): __visit_name__: str @@ -353,8 +353,8 @@ class Computed(FetchedValue, SchemaItem): sqltext: Any persisted: Any column: Any - def __init__(self, sqltext, persisted: Incomplete | None = ...) -> None: ... - def copy(self, target_table: Incomplete | None = ..., **kw): ... + def __init__(self, sqltext, persisted: Incomplete | None = None) -> None: ... + def copy(self, target_table: Incomplete | None = None, **kw): ... class Identity(IdentityOptions, FetchedValue, SchemaItem): __visit_name__: str @@ -363,16 +363,16 @@ class Identity(IdentityOptions, FetchedValue, SchemaItem): column: Any def __init__( self, - always: bool = ..., - on_null: Incomplete | None = ..., - start: Incomplete | None = ..., - increment: Incomplete | None = ..., - minvalue: Incomplete | None = ..., - maxvalue: Incomplete | None = ..., - nominvalue: Incomplete | None = ..., - nomaxvalue: Incomplete | None = ..., - cycle: Incomplete | None = ..., - cache: Incomplete | None = ..., - order: Incomplete | None = ..., + always: bool = False, + on_null: Incomplete | None = None, + start: Incomplete | None = None, + increment: Incomplete | None = None, + minvalue: Incomplete | None = None, + maxvalue: Incomplete | None = None, + nominvalue: Incomplete | None = None, + nomaxvalue: Incomplete | None = None, + cycle: Incomplete | None = None, + cache: Incomplete | None = None, + order: Incomplete | None = None, ) -> None: ... def copy(self, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/selectable.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/selectable.pyi index eb24ab00c8f7..c9ddc58d3df7 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/selectable.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/selectable.pyi @@ -34,9 +34,9 @@ class ReturnsRows(roles.ReturnsRowsRole, ClauseElement): class Selectable(ReturnsRows): __visit_name__: str is_selectable: bool - def lateral(self, name: Incomplete | None = ...): ... + def lateral(self, name: Incomplete | None = None): ... def replace_selectable(self, old, alias): ... - def corresponding_column(self, column, require_embedded: bool = ...): ... + def corresponding_column(self, column, require_embedded: bool = False): ... class HasPrefixes: def prefix_with(self, *expr, **kw) -> Self: ... @@ -45,20 +45,20 @@ class HasSuffixes: def suffix_with(self, *expr, **kw) -> Self: ... class HasHints: - def with_statement_hint(self, text, dialect_name: str = ...): ... - def with_hint(self, selectable, text: str, dialect_name: str = ...) -> Self: ... + def with_statement_hint(self, text, dialect_name: str = "*"): ... + def with_hint(self, selectable, text: str, dialect_name: str = "*") -> Self: ... class FromClause(roles.AnonymizedFromClauseRole, Selectable): __visit_name__: str named_with_column: bool schema: Any is_selectable: bool - def select(self, whereclause: Incomplete | None = ..., **kwargs): ... - def join(self, right, onclause: Incomplete | None = ..., isouter: bool = ..., full: bool = ...): ... - def outerjoin(self, right, onclause: Incomplete | None = ..., full: bool = ...): ... - def alias(self, name: Incomplete | None = ..., flat: bool = ...): ... + def select(self, whereclause: Incomplete | None = None, **kwargs): ... + def join(self, right, onclause: Incomplete | None = None, isouter: bool = False, full: bool = False): ... + def outerjoin(self, right, onclause: Incomplete | None = None, full: bool = False): ... + def alias(self, name: Incomplete | None = None, flat: bool = False): ... def table_valued(self): ... - def tablesample(self, sampling, name: Incomplete | None = ..., seed: Incomplete | None = ...): ... + def tablesample(self, sampling, name: Incomplete | None = None, seed: Incomplete | None = None): ... def is_derived_from(self, fromclause): ... @property def description(self): ... @@ -87,15 +87,15 @@ class Join(roles.DMLTableRole, FromClause): onclause: Any isouter: Any full: Any - def __init__(self, left, right, onclause: Incomplete | None = ..., isouter: bool = ..., full: bool = ...) -> None: ... + def __init__(self, left, right, onclause: Incomplete | None = None, isouter: bool = False, full: bool = False) -> None: ... @property def description(self): ... def is_derived_from(self, fromclause): ... - def self_group(self, against: Incomplete | None = ...): ... - def select(self, whereclause: Incomplete | None = ..., **kwargs): ... + def self_group(self, against: Incomplete | None = None): ... + def select(self, whereclause: Incomplete | None = None, **kwargs): ... @property def bind(self): ... - def alias(self, name: Incomplete | None = ..., flat: bool = ...): ... + def alias(self, name: Incomplete | None = None, flat: bool = False): ... class NoInit: def __init__(self, *arg, **kw) -> None: ... @@ -118,9 +118,9 @@ class TableValuedAlias(Alias): __visit_name__: str @HasMemoized.memoized_attribute def column(self): ... - def alias(self, name: Incomplete | None = ...): ... # type: ignore[override] - def lateral(self, name: Incomplete | None = ...): ... - def render_derived(self, name: Incomplete | None = ..., with_types: bool = ...): ... + def alias(self, name: Incomplete | None = None): ... # type: ignore[override] + def lateral(self, name: Incomplete | None = None): ... + def render_derived(self, name: Incomplete | None = None, with_types: bool = False): ... class Lateral(AliasedReturnsRows): __visit_name__: str @@ -131,13 +131,13 @@ class TableSample(AliasedReturnsRows): class CTE(roles.DMLTableRole, roles.IsCTERole, Generative, HasPrefixes, HasSuffixes, AliasedReturnsRows): __visit_name__: str - def alias(self, name: Incomplete | None = ..., flat: bool = ...): ... + def alias(self, name: Incomplete | None = None, flat: bool = False): ... def union(self, *other): ... def union_all(self, *other): ... class HasCTE(roles.HasCTERole): def add_cte(self, cte) -> None: ... - def cte(self, name: Incomplete | None = ..., recursive: bool = ..., nesting: bool = ...): ... + def cte(self, name: Incomplete | None = None, recursive: bool = False, nesting: bool = False): ... class Subquery(AliasedReturnsRows): __visit_name__: str @@ -169,9 +169,9 @@ class TableClause(roles.DMLTableRole, Immutable, FromClause): @memoized_property def description(self): ... def append_column(self, c, **kw) -> None: ... - def insert(self, values: Incomplete | None = ..., inline: bool = ..., **kwargs): ... - def update(self, whereclause: Incomplete | None = ..., values: Incomplete | None = ..., inline: bool = ..., **kwargs): ... - def delete(self, whereclause: Incomplete | None = ..., **kwargs): ... + def insert(self, values: Incomplete | None = None, inline: bool = False, **kwargs): ... + def update(self, whereclause: Incomplete | None = None, values: Incomplete | None = None, inline: bool = False, **kwargs): ... + def delete(self, whereclause: Incomplete | None = None, **kwargs): ... class ForUpdateArg(ClauseElement): def __eq__(self, other): ... @@ -183,7 +183,12 @@ class ForUpdateArg(ClauseElement): key_share: Any of: Any def __init__( - self, nowait: bool = ..., read: bool = ..., of: Incomplete | None = ..., skip_locked: bool = ..., key_share: bool = ... + self, + nowait: bool = False, + read: bool = False, + of: Incomplete | None = None, + skip_locked: bool = False, + key_share: bool = False, ) -> None: ... class Values(Generative, FromClause): @@ -193,7 +198,7 @@ class Values(Generative, FromClause): literal_binds: Any def __init__(self, *columns, **kw) -> None: ... def alias(self, name: Incomplete | None, **kw) -> Self: ... # type: ignore[override] - def lateral(self, name: Incomplete | None = ...) -> Self: ... + def lateral(self, name: Incomplete | None = None) -> Self: ... def data(self, values) -> Self: ... class SelectBase( @@ -220,9 +225,9 @@ class SelectBase( def exists(self): ... def scalar_subquery(self): ... def label(self, name): ... - def lateral(self, name: Incomplete | None = ...): ... - def subquery(self, name: Incomplete | None = ...): ... - def alias(self, name: Incomplete | None = ..., flat: bool = ...): ... + def lateral(self, name: Incomplete | None = None): ... + def subquery(self, name: Incomplete | None = None): ... + def alias(self, name: Incomplete | None = None, flat: bool = False): ... class SelectStatementGrouping(GroupedElement, SelectBase): __visit_name__: str @@ -232,7 +237,7 @@ class SelectStatementGrouping(GroupedElement, SelectBase): def set_label_style(self, label_style): ... @property def select_statement(self): ... - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... @property def selected_columns(self): ... @@ -244,21 +249,26 @@ class GenerativeSelect(DeprecatedSelectBaseGenerations, SelectBase): def __init__( self, _label_style=..., - use_labels: bool = ..., - limit: Incomplete | None = ..., - offset: Incomplete | None = ..., - order_by: Incomplete | None = ..., - group_by: Incomplete | None = ..., - bind: Incomplete | None = ..., + use_labels: bool = False, + limit: Incomplete | None = None, + offset: Incomplete | None = None, + order_by: Incomplete | None = None, + group_by: Incomplete | None = None, + bind: Incomplete | None = None, ) -> None: ... def with_for_update( - self, nowait: bool = ..., read: bool = ..., of: Incomplete | None = ..., skip_locked: bool = ..., key_share: bool = ... + self, + nowait: bool = False, + read: bool = False, + of: Incomplete | None = None, + skip_locked: bool = False, + key_share: bool = False, ) -> Self: ... def get_label_style(self): ... def set_label_style(self, style): ... def apply_labels(self): ... def limit(self, limit: Incomplete | None) -> Self: ... - def fetch(self, count: Incomplete | None, with_ties: bool = ..., percent: bool = ...) -> Self: ... + def fetch(self, count: Incomplete | None, with_ties: bool = False, percent: bool = False) -> Self: ... def offset(self, offset: Incomplete | None) -> Self: ... def slice(self, start: Incomplete | None, stop: Incomplete | None) -> Self: ... def order_by(self, *clauses) -> Self: ... @@ -277,7 +287,7 @@ class CompoundSelect(HasCompileState, GenerativeSelect): keyword: Any selects: Any def __init__(self, keyword, *selects, **kwargs) -> None: ... - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... def is_derived_from(self, fromclause): ... @property def selected_columns(self): ... @@ -324,14 +334,14 @@ class Select( @classmethod def create_legacy_select( cls, - columns: Incomplete | None = ..., - whereclause: Incomplete | None = ..., - from_obj: Incomplete | None = ..., - distinct: bool = ..., - having: Incomplete | None = ..., - correlate: bool = ..., - prefixes: Incomplete | None = ..., - suffixes: Incomplete | None = ..., + columns: Incomplete | None = None, + whereclause: Incomplete | None = None, + from_obj: Incomplete | None = None, + distinct: bool = False, + having: Incomplete | None = None, + correlate: bool = True, + prefixes: Incomplete | None = None, + suffixes: Incomplete | None = None, **kwargs, ): ... def __init__(self) -> None: ... @@ -340,10 +350,10 @@ class Select( @property def column_descriptions(self): ... def from_statement(self, statement): ... - def join(self, target, onclause: Incomplete | None = ..., isouter: bool = ..., full: bool = ...) -> Self: ... - def outerjoin_from(self, from_, target, onclause: Incomplete | None = ..., full: bool = ...): ... - def join_from(self, from_, target, onclause: Incomplete | None = ..., isouter: bool = ..., full: bool = ...) -> Self: ... - def outerjoin(self, target, onclause: Incomplete | None = ..., full: bool = ...): ... + def join(self, target, onclause: Incomplete | None = None, isouter: bool = False, full: bool = False) -> Self: ... + def outerjoin_from(self, from_, target, onclause: Incomplete | None = None, full: bool = False): ... + def join_from(self, from_, target, onclause: Incomplete | None = None, isouter: bool = False, full: bool = False) -> Self: ... + def outerjoin(self, target, onclause: Incomplete | None = None, full: bool = False): ... def get_final_froms(self): ... @property def froms(self): ... @@ -355,7 +365,7 @@ class Select( def get_children(self, **kwargs): ... def add_columns(self, *columns) -> Self: ... def column(self, column): ... - def reduce_columns(self, only_synonyms: bool = ...): ... + def reduce_columns(self, only_synonyms: bool = True): ... def with_only_columns(self, *columns, **kw) -> Self: ... @property def whereclause(self): ... @@ -367,7 +377,7 @@ class Select( def correlate_except(self, *fromclauses) -> Self: ... @HasMemoized.memoized_attribute def selected_columns(self): ... - def self_group(self, against: Incomplete | None = ...): ... + def self_group(self, against: Incomplete | None = None): ... def union(self, *other, **kwargs): ... def union_all(self, *other, **kwargs): ... def except_(self, *other, **kwargs): ... @@ -396,7 +406,7 @@ class ScalarSelect(roles.InElementRole, Generative, Grouping): class Exists(UnaryExpression): inherit_cache: bool def __init__(self, *args, **kwargs) -> None: ... - def select(self, whereclause: Incomplete | None = ..., **kwargs): ... + def select(self, whereclause: Incomplete | None = None, **kwargs): ... def correlate(self, *fromclause): ... def correlate_except(self, *fromclause): ... def select_from(self, *froms): ... @@ -409,7 +419,7 @@ class TextualSelect(SelectBase): element: Any column_args: Any positional: Any - def __init__(self, text, columns, positional: bool = ...) -> None: ... + def __init__(self, text, columns, positional: bool = False) -> None: ... @HasMemoized.memoized_attribute def selected_columns(self): ... def bindparams(self, *binds, **bind_as_values) -> Self: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/sqltypes.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/sqltypes.pyi index eef39d632164..1bdec2ced356 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/sqltypes.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/sqltypes.pyi @@ -38,12 +38,12 @@ class String(Concatenable, TypeEngine): collation: Any def __init__( self, - length: Incomplete | None = ..., - collation: Incomplete | None = ..., - convert_unicode: bool = ..., - unicode_error: Incomplete | None = ..., - _warn_on_bytestring: bool = ..., - _expect_unicode: bool = ..., + length: Incomplete | None = None, + collation: Incomplete | None = None, + convert_unicode: bool = False, + unicode_error: Incomplete | None = None, + _warn_on_bytestring: bool = False, + _expect_unicode: bool = False, ) -> None: ... def literal_processor(self, dialect): ... def bind_processor(self, dialect): ... @@ -57,11 +57,11 @@ class Text(String): class Unicode(String): __visit_name__: str - def __init__(self, length: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, length: Incomplete | None = None, **kwargs) -> None: ... class UnicodeText(Text): __visit_name__: str - def __init__(self, length: Incomplete | None = ..., **kwargs) -> None: ... + def __init__(self, length: Incomplete | None = None, **kwargs) -> None: ... class Integer(_LookupExpressionAdapter, TypeEngine): __visit_name__: str @@ -84,10 +84,10 @@ class Numeric(_LookupExpressionAdapter, TypeEngine): asdecimal: Any def __init__( self, - precision: Incomplete | None = ..., - scale: Incomplete | None = ..., - decimal_return_scale: Incomplete | None = ..., - asdecimal: bool = ..., + precision: Incomplete | None = None, + scale: Incomplete | None = None, + decimal_return_scale: Incomplete | None = None, + asdecimal: bool = True, ) -> None: ... def get_dbapi_type(self, dbapi): ... def literal_processor(self, dialect): ... @@ -103,14 +103,14 @@ class Float(Numeric): asdecimal: Any decimal_return_scale: Any def __init__( - self, precision: Incomplete | None = ..., asdecimal: bool = ..., decimal_return_scale: Incomplete | None = ... + self, precision: Incomplete | None = None, asdecimal: bool = False, decimal_return_scale: Incomplete | None = None ) -> None: ... def result_processor(self, dialect, coltype): ... class DateTime(_LookupExpressionAdapter, TypeEngine): __visit_name__: str timezone: Any - def __init__(self, timezone: bool = ...) -> None: ... + def __init__(self, timezone: bool = False) -> None: ... def get_dbapi_type(self, dbapi): ... @property def python_type(self): ... @@ -124,14 +124,14 @@ class Date(_LookupExpressionAdapter, TypeEngine): class Time(_LookupExpressionAdapter, TypeEngine): __visit_name__: str timezone: Any - def __init__(self, timezone: bool = ...) -> None: ... + def __init__(self, timezone: bool = False) -> None: ... def get_dbapi_type(self, dbapi): ... @property def python_type(self): ... class _Binary(TypeEngine): length: Any - def __init__(self, length: Incomplete | None = ...) -> None: ... + def __init__(self, length: Incomplete | None = None) -> None: ... def literal_processor(self, dialect): ... @property def python_type(self): ... @@ -142,7 +142,7 @@ class _Binary(TypeEngine): class LargeBinary(_Binary): __visit_name__: str - def __init__(self, length: Incomplete | None = ...) -> None: ... + def __init__(self, length: Incomplete | None = None) -> None: ... class SchemaType(SchemaEventTarget): name: Any @@ -151,19 +151,19 @@ class SchemaType(SchemaEventTarget): inherit_schema: Any def __init__( self, - name: Incomplete | None = ..., - schema: Incomplete | None = ..., - metadata: Incomplete | None = ..., - inherit_schema: bool = ..., - quote: Incomplete | None = ..., - _create_events: bool = ..., + name: Incomplete | None = None, + schema: Incomplete | None = None, + metadata: Incomplete | None = None, + inherit_schema: bool = False, + quote: Incomplete | None = None, + _create_events: bool = True, ) -> None: ... def copy(self, **kw): ... def adapt(self, impltype, **kw): ... @property def bind(self): ... - def create(self, bind: Incomplete | None = ..., checkfirst: bool = ...) -> None: ... - def drop(self, bind: Incomplete | None = ..., checkfirst: bool = ...) -> None: ... + def create(self, bind: Incomplete | None = None, checkfirst: bool = False) -> None: ... + def drop(self, bind: Incomplete | None = None, checkfirst: bool = False) -> None: ... class Enum(Emulated, String, SchemaType): __visit_name__: str @@ -175,7 +175,7 @@ class Enum(Emulated, String, SchemaType): class Comparator(Concatenable.Comparator[Any]): ... comparator_factory: Any - def as_generic(self, allow_nulltype: bool = ...): ... + def as_generic(self, allow_nulltype: bool = False): ... def adapt_to_emulated(self, impltype, **kw): ... def adapt(self, impltype, **kw): ... def literal_processor(self, dialect): ... @@ -192,7 +192,7 @@ class PickleType(TypeDecorator): pickler: Any comparator: Any def __init__( - self, protocol=..., pickler: Incomplete | None = ..., comparator: Incomplete | None = ..., impl: Incomplete | None = ... + self, protocol=5, pickler: Incomplete | None = None, comparator: Incomplete | None = None, impl: Incomplete | None = None ) -> None: ... def __reduce__(self): ... def bind_processor(self, dialect): ... @@ -204,7 +204,7 @@ class Boolean(Emulated, TypeEngine, SchemaType): # type: ignore[misc] native: bool create_constraint: Any name: Any - def __init__(self, create_constraint: bool = ..., name: Incomplete | None = ..., _create_events: bool = ...) -> None: ... + def __init__(self, create_constraint: bool = False, name: Incomplete | None = None, _create_events: bool = True) -> None: ... @property def python_type(self): ... def literal_processor(self, dialect): ... @@ -222,7 +222,7 @@ class Interval(Emulated, _AbstractInterval, TypeDecorator): # type: ignore[misc second_precision: Any day_precision: Any def __init__( - self, native: bool = ..., second_precision: Incomplete | None = ..., day_precision: Incomplete | None = ... + self, native: bool = True, second_precision: Incomplete | None = None, day_precision: Incomplete | None = None ) -> None: ... @property def python_type(self): ... @@ -235,7 +235,7 @@ class JSON(Indexable, TypeEngine): hashable: bool NULL: Any none_as_null: Any - def __init__(self, none_as_null: bool = ...) -> None: ... + def __init__(self, none_as_null: bool = False) -> None: ... class JSONElementType(TypeEngine): def string_bind_processor(self, dialect): ... @@ -253,7 +253,7 @@ class JSON(Indexable, TypeEngine): def as_string(self): ... def as_integer(self): ... def as_float(self): ... - def as_numeric(self, precision, scale, asdecimal: bool = ...): ... + def as_numeric(self, precision, scale, asdecimal: bool = True): ... def as_json(self): ... comparator_factory: Any @property @@ -271,14 +271,14 @@ class ARRAY(SchemaEventTarget, Indexable, Concatenable, TypeEngine): class Comparator(Indexable.Comparator[_T], Concatenable.Comparator[_T], Generic[_T]): def contains(self, *arg, **kw) -> ColumnOperators[_T]: ... - def any(self, other, operator: Incomplete | None = ...): ... - def all(self, other, operator: Incomplete | None = ...): ... + def any(self, other, operator: Incomplete | None = None): ... + def all(self, other, operator: Incomplete | None = None): ... comparator_factory: Any item_type: Any as_tuple: Any dimensions: Any def __init__( - self, item_type, as_tuple: bool = ..., dimensions: Incomplete | None = ..., zero_indexes: bool = ... + self, item_type, as_tuple: bool = False, dimensions: Incomplete | None = None, zero_indexes: bool = False ) -> None: ... @property def hashable(self): ... @@ -316,7 +316,7 @@ class BIGINT(BigInteger): class TIMESTAMP(DateTime): __visit_name__: str - def __init__(self, timezone: bool = ...) -> None: ... + def __init__(self, timezone: bool = False) -> None: ... def get_dbapi_type(self, dbapi): ... class DATETIME(DateTime): diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/traversals.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/traversals.pyi index 0bd17128785e..1f496655bf0c 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/traversals.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/traversals.pyi @@ -152,7 +152,7 @@ class TraversalComparatorStrategy(InternalTraversal, util.MemoizedSlots): def compare_bindparam(self, left, right, **kw): ... class ColIdentityComparatorStrategy(TraversalComparatorStrategy): - def compare_column_element(self, left, right, use_proxies: bool = ..., equivalents=..., **kw): ... + def compare_column_element(self, left, right, use_proxies: bool = True, equivalents=(), **kw): ... def compare_column(self, left, right, **kw): ... def compare_label(self, left, right, **kw): ... def compare_table(self, left, right, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/type_api.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/type_api.pyi index dd3f84929967..4465906587d3 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/type_api.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/type_api.pyi @@ -44,11 +44,11 @@ class TypeEngine(Traversible): @property def python_type(self) -> None: ... def with_variant(self, type_, dialect_name): ... - def as_generic(self, allow_nulltype: bool = ...): ... + def as_generic(self, allow_nulltype: bool = False): ... def dialect_impl(self, dialect): ... def adapt(self, cls, **kw): ... def coerce_compared_value(self, op, value): ... - def compile(self, dialect: Incomplete | None = ...): ... + def compile(self, dialect: Incomplete | None = None): ... class VisitableCheckKWArg(util.EnsureKWArgType, TraversibleType): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/util.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/util.pyi index 8bf4c57f94a0..50e9b145af1f 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/util.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/util.pyi @@ -11,11 +11,11 @@ def find_left_clause_to_join_from(clauses, join_to, onclause): ... def visit_binary_product(fn, expr) -> None: ... def find_tables( clause, - check_columns: bool = ..., - include_aliases: bool = ..., - include_joins: bool = ..., - include_selects: bool = ..., - include_crud: bool = ..., + check_columns: bool = False, + include_aliases: bool = False, + include_joins: bool = False, + include_selects: bool = False, + include_crud: bool = False, ): ... def unwrap_order_by(clause): ... def unwrap_label_reference(element): ... @@ -35,23 +35,23 @@ class _repr_base: class _repr_row(_repr_base): row: Any max_chars: Any - def __init__(self, row, max_chars: int = ...) -> None: ... + def __init__(self, row, max_chars: int = 300) -> None: ... class _repr_params(_repr_base): params: Any ismulti: Any batches: Any max_chars: Any - def __init__(self, params, batches, max_chars: int = ..., ismulti: Incomplete | None = ...) -> None: ... + def __init__(self, params, batches, max_chars: int = 300, ismulti: Incomplete | None = None) -> None: ... def adapt_criterion_to_null(crit, nulls): ... -def splice_joins(left, right, stop_on: Incomplete | None = ...): ... +def splice_joins(left, right, stop_on: Incomplete | None = None): ... def reduce_columns(columns, *clauses, **kw): ... def criterion_as_pairs( expression, - consider_as_foreign_keys: Incomplete | None = ..., - consider_as_referenced_keys: Incomplete | None = ..., - any_operator: bool = ..., + consider_as_foreign_keys: Incomplete | None = None, + consider_as_referenced_keys: Incomplete | None = None, + any_operator: bool = False, ): ... class ClauseAdapter(visitors.ReplacingExternalTraversal): @@ -65,14 +65,14 @@ class ClauseAdapter(visitors.ReplacingExternalTraversal): def __init__( self, selectable, - equivalents: Incomplete | None = ..., - include_fn: Incomplete | None = ..., - exclude_fn: Incomplete | None = ..., - adapt_on_names: bool = ..., - anonymize_labels: bool = ..., - adapt_from_selectables: Incomplete | None = ..., + equivalents: Incomplete | None = None, + include_fn: Incomplete | None = None, + exclude_fn: Incomplete | None = None, + adapt_on_names: bool = False, + anonymize_labels: bool = False, + adapt_from_selectables: Incomplete | None = None, ) -> None: ... - def replace(self, col, _include_singleton_constants: bool = ...): ... + def replace(self, col, _include_singleton_constants: bool = False): ... class ColumnAdapter(ClauseAdapter): columns: Any @@ -81,14 +81,14 @@ class ColumnAdapter(ClauseAdapter): def __init__( self, selectable, - equivalents: Incomplete | None = ..., - adapt_required: bool = ..., - include_fn: Incomplete | None = ..., - exclude_fn: Incomplete | None = ..., - adapt_on_names: bool = ..., - allow_label_resolve: bool = ..., - anonymize_labels: bool = ..., - adapt_from_selectables: Incomplete | None = ..., + equivalents: Incomplete | None = None, + adapt_required: bool = False, + include_fn: Incomplete | None = None, + exclude_fn: Incomplete | None = None, + adapt_on_names: bool = False, + allow_label_resolve: bool = True, + anonymize_labels: bool = False, + adapt_from_selectables: Incomplete | None = None, ) -> None: ... class _IncludeExcludeMapping: diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/visitors.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/visitors.pyi index c3dd44793e24..b3a9cc59146d 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/visitors.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/visitors.pyi @@ -5,7 +5,7 @@ class TraversibleType(type): class Traversible: def __class_getitem__(cls, key): ... - def get_children(self, omit_attrs=..., **kw): ... + def get_children(self, omit_attrs=(), **kw): ... class _InternalTraversalType(type): def __init__(cls, clsname, bases, clsdict) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/assertions.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/assertions.pyi index e8366e9068ce..0d2920e93a3a 100644 --- a/stubs/SQLAlchemy/sqlalchemy/testing/assertions.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/testing/assertions.pyi @@ -8,27 +8,27 @@ def expect_deprecated_20(*messages, **kw): ... def emits_warning_on(db, *messages): ... def uses_deprecated(*messages): ... def global_cleanup_assertions() -> None: ... -def eq_regex(a, b, msg: Incomplete | None = ...) -> None: ... -def eq_(a, b, msg: Incomplete | None = ...) -> None: ... -def ne_(a, b, msg: Incomplete | None = ...) -> None: ... -def le_(a, b, msg: Incomplete | None = ...) -> None: ... -def is_instance_of(a, b, msg: Incomplete | None = ...) -> None: ... -def is_none(a, msg: Incomplete | None = ...) -> None: ... -def is_not_none(a, msg: Incomplete | None = ...) -> None: ... -def is_true(a, msg: Incomplete | None = ...) -> None: ... -def is_false(a, msg: Incomplete | None = ...) -> None: ... -def is_(a, b, msg: Incomplete | None = ...) -> None: ... -def is_not(a, b, msg: Incomplete | None = ...) -> None: ... +def eq_regex(a, b, msg: Incomplete | None = None) -> None: ... +def eq_(a, b, msg: Incomplete | None = None) -> None: ... +def ne_(a, b, msg: Incomplete | None = None) -> None: ... +def le_(a, b, msg: Incomplete | None = None) -> None: ... +def is_instance_of(a, b, msg: Incomplete | None = None) -> None: ... +def is_none(a, msg: Incomplete | None = None) -> None: ... +def is_not_none(a, msg: Incomplete | None = None) -> None: ... +def is_true(a, msg: Incomplete | None = None) -> None: ... +def is_false(a, msg: Incomplete | None = None) -> None: ... +def is_(a, b, msg: Incomplete | None = None) -> None: ... +def is_not(a, b, msg: Incomplete | None = None) -> None: ... is_not_ = is_not -def in_(a, b, msg: Incomplete | None = ...) -> None: ... -def not_in(a, b, msg: Incomplete | None = ...) -> None: ... +def in_(a, b, msg: Incomplete | None = None) -> None: ... +def not_in(a, b, msg: Incomplete | None = None) -> None: ... not_in_ = not_in -def startswith_(a, fragment, msg: Incomplete | None = ...) -> None: ... -def eq_ignore_whitespace(a, b, msg: Incomplete | None = ...) -> None: ... +def startswith_(a, fragment, msg: Incomplete | None = None) -> None: ... +def eq_ignore_whitespace(a, b, msg: Incomplete | None = None) -> None: ... def assert_raises(except_cls, callable_, *args, **kw): ... def assert_raises_context_ok(except_cls, callable_, *args, **kw): ... def assert_raises_message(except_cls, msg, callable_, *args, **kwargs): ... @@ -37,8 +37,8 @@ def assert_raises_message_context_ok(except_cls, msg, callable_, *args, **kwargs class _ErrorContainer: error: Incomplete -def expect_raises(except_cls, check_context: bool = ...): ... -def expect_raises_message(except_cls, msg, check_context: bool = ...): ... +def expect_raises(except_cls, check_context: bool = True): ... +def expect_raises_message(except_cls, msg, check_context: bool = True): ... class AssertsCompiledSQL: test_statement: Incomplete @@ -47,29 +47,29 @@ class AssertsCompiledSQL: self, clause, result, - params: Incomplete | None = ..., - checkparams: Incomplete | None = ..., - for_executemany: bool = ..., - check_literal_execute: Incomplete | None = ..., - check_post_param: Incomplete | None = ..., - dialect: Incomplete | None = ..., - checkpositional: Incomplete | None = ..., - check_prefetch: Incomplete | None = ..., - use_default_dialect: bool = ..., - allow_dialect_select: bool = ..., - supports_default_values: bool = ..., - supports_default_metavalue: bool = ..., - literal_binds: bool = ..., - render_postcompile: bool = ..., - schema_translate_map: Incomplete | None = ..., - render_schema_translate: bool = ..., - default_schema_name: Incomplete | None = ..., - from_linting: bool = ..., - check_param_order: bool = ..., + params: Incomplete | None = None, + checkparams: Incomplete | None = None, + for_executemany: bool = False, + check_literal_execute: Incomplete | None = None, + check_post_param: Incomplete | None = None, + dialect: Incomplete | None = None, + checkpositional: Incomplete | None = None, + check_prefetch: Incomplete | None = None, + use_default_dialect: bool = False, + allow_dialect_select: bool = False, + supports_default_values: bool = True, + supports_default_metavalue: bool = True, + literal_binds: bool = False, + render_postcompile: bool = False, + schema_translate_map: Incomplete | None = None, + render_schema_translate: bool = False, + default_schema_name: Incomplete | None = None, + from_linting: bool = False, + check_param_order: bool = True, ) -> None: ... class ComparesTables: - def assert_tables_equal(self, table, reflected_table, strict_types: bool = ...) -> None: ... + def assert_tables_equal(self, table, reflected_table, strict_types: bool = False) -> None: ... def assert_types_base(self, c1, c2) -> None: ... class AssertsExecutionResults: @@ -77,7 +77,7 @@ class AssertsExecutionResults: def assert_list(self, result, class_, list_) -> None: ... def assert_row(self, class_, rowobj, desc) -> None: ... def assert_unordered_result(self, result, cls, *expected): ... - def sql_execution_asserter(self, db: Incomplete | None = ...): ... + def sql_execution_asserter(self, db: Incomplete | None = None): ... def assert_sql_execution(self, db, callable_, *rules): ... def assert_sql(self, db, callable_, rules): ... def assert_sql_count(self, db, callable_, count) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/assertsql.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/assertsql.pyi index c02391805e7c..c7534746d038 100644 --- a/stubs/SQLAlchemy/sqlalchemy/testing/assertsql.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/testing/assertsql.pyi @@ -14,7 +14,7 @@ class CursorSQL(SQLMatchRule): statement: Any params: Any consume_statement: Any - def __init__(self, statement, params: Incomplete | None = ..., consume_statement: bool = ...) -> None: ... + def __init__(self, statement, params: Incomplete | None = None, consume_statement: bool = True) -> None: ... errormessage: Any is_consumed: bool def process_statement(self, execute_observed) -> None: ... @@ -23,7 +23,7 @@ class CompiledSQL(SQLMatchRule): statement: Any params: Any dialect: Any - def __init__(self, statement, params: Incomplete | None = ..., dialect: str = ...) -> None: ... + def __init__(self, statement, params: Incomplete | None = None, dialect: str = "default") -> None: ... is_consumed: bool errormessage: Any def process_statement(self, execute_observed) -> None: ... @@ -33,7 +33,7 @@ class RegexSQL(CompiledSQL): orig_regex: Any params: Any dialect: Any - def __init__(self, regex, params: Incomplete | None = ..., dialect: str = ...) -> None: ... + def __init__(self, regex, params: Incomplete | None = None, dialect: str = "default") -> None: ... class DialectSQL(CompiledSQL): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi index 4f0abf91803a..1ef8da6dba4c 100644 --- a/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi @@ -30,7 +30,7 @@ def assert_conns_closed(fn, *args, **kw) -> None: ... def rollback_open_connections(fn, *args, **kw) -> None: ... def close_first(fn, *args, **kw) -> None: ... def close_open_connections(fn, *args, **kw) -> None: ... -def all_dialects(exclude: Incomplete | None = ...) -> None: ... +def all_dialects(exclude: Incomplete | None = None) -> None: ... class ReconnectFixture: dbapi: Any @@ -39,34 +39,34 @@ class ReconnectFixture: def __init__(self, dbapi) -> None: ... def __getattr__(self, key: str): ... def connect(self, *args, **kwargs): ... - def shutdown(self, stop: bool = ...) -> None: ... + def shutdown(self, stop: bool = False) -> None: ... def restart(self) -> None: ... -def reconnecting_engine(url: Incomplete | None = ..., options: Incomplete | None = ...): ... +def reconnecting_engine(url: Incomplete | None = None, options: Incomplete | None = None): ... @overload def testing_engine( # type: ignore[misc] - url: URL | str | None = ..., - options: Mapping[str, Any] | None = ..., - future: bool | None = ..., - asyncio: Literal[False] = ..., - transfer_staticpool: bool = ..., + url: URL | str | None = None, + options: Mapping[str, Any] | None = None, + future: bool | None = None, + asyncio: Literal[False] = False, + transfer_staticpool: bool = False, ) -> Engine: ... @overload def testing_engine( - url: URL | str | None = ..., - options: Mapping[str, Any] | None = ..., - future: bool | None = ..., - asyncio: Literal[True] = ..., - transfer_staticpool: bool = ..., + url: URL | str | None = None, + options: Mapping[str, Any] | None = None, + future: bool | None = None, + asyncio: Literal[True] = True, + transfer_staticpool: bool = False, ) -> AsyncEngine: ... -def mock_engine(dialect_name: Incomplete | None = ...): ... +def mock_engine(dialect_name: Incomplete | None = None): ... class DBAPIProxyCursor: engine: Any connection: Any cursor: Any def __init__(self, engine, conn, *args, **kwargs) -> None: ... - def execute(self, stmt, parameters: Incomplete | None = ..., **kw): ... + def execute(self, stmt, parameters: Incomplete | None = None, **kw): ... def executemany(self, stmt, params, **kw): ... def __iter__(self): ... def __getattr__(self, key: str): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/exclusions.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/exclusions.pyi index 7041a0266bc8..f9956ef44058 100644 --- a/stubs/SQLAlchemy/sqlalchemy/testing/exclusions.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/testing/exclusions.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete from typing import Any -def skip_if(predicate, reason: Incomplete | None = ...): ... -def fails_if(predicate, reason: Incomplete | None = ...): ... +def skip_if(predicate, reason: Incomplete | None = None): ... +def fails_if(predicate, reason: Incomplete | None = None): ... class compound: fails: Any @@ -22,17 +22,17 @@ class compound: def requires_tag(tagname): ... def tags(tagnames): ... -def only_if(predicate, reason: Incomplete | None = ...): ... -def succeeds_if(predicate, reason: Incomplete | None = ...): ... +def only_if(predicate, reason: Incomplete | None = None): ... +def succeeds_if(predicate, reason: Incomplete | None = None): ... class Predicate: @classmethod - def as_predicate(cls, predicate, description: Incomplete | None = ...): ... + def as_predicate(cls, predicate, description: Incomplete | None = None): ... class BooleanPredicate(Predicate): value: Any description: Any - def __init__(self, value, description: Incomplete | None = ...) -> None: ... + def __init__(self, value, description: Incomplete | None = None) -> None: ... def __call__(self, config): ... class SpecPredicate(Predicate): @@ -41,7 +41,7 @@ class SpecPredicate(Predicate): spec: Any description: Any def __init__( - self, db, op: Incomplete | None = ..., spec: Incomplete | None = ..., description: Incomplete | None = ... + self, db, op: Incomplete | None = None, spec: Incomplete | None = None, description: Incomplete | None = None ) -> None: ... def __call__(self, config): ... @@ -51,30 +51,30 @@ class LambdaPredicate(Predicate): kw: Any description: Any def __init__( - self, lambda_, description: Incomplete | None = ..., args: Incomplete | None = ..., kw: Incomplete | None = ... + self, lambda_, description: Incomplete | None = None, args: Incomplete | None = None, kw: Incomplete | None = None ): ... def __call__(self, config): ... class NotPredicate(Predicate): predicate: Any description: Any - def __init__(self, predicate, description: Incomplete | None = ...) -> None: ... + def __init__(self, predicate, description: Incomplete | None = None) -> None: ... def __call__(self, config): ... class OrPredicate(Predicate): predicates: Any description: Any - def __init__(self, predicates, description: Incomplete | None = ...) -> None: ... + def __init__(self, predicates, description: Incomplete | None = None) -> None: ... def __call__(self, config): ... def db_spec(*dbs): ... def open(): ... def closed(): ... -def fails(reason: Incomplete | None = ...): ... +def fails(reason: Incomplete | None = None): ... def future(fn, *arg): ... -def fails_on(db, reason: Incomplete | None = ...): ... +def fails_on(db, reason: Incomplete | None = None): ... def fails_on_everything_except(*dbs): ... -def skip(db, reason: Incomplete | None = ...): ... -def only_on(dbs, reason: Incomplete | None = ...): ... -def exclude(db, op, spec, reason: Incomplete | None = ...): ... +def skip(db, reason: Incomplete | None = None): ... +def only_on(dbs, reason: Incomplete | None = None): ... +def exclude(db, op, spec, reason: Incomplete | None = None): ... def against(config, *queries): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/profiling.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/profiling.pyi index 5d3f8927da9f..c2aa3d0d0525 100644 --- a/stubs/SQLAlchemy/sqlalchemy/testing/profiling.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/testing/profiling.pyi @@ -9,7 +9,7 @@ class ProfileStatsFile: data: Any dump: Any sort: Any - def __init__(self, filename, sort: str = ..., dump: Incomplete | None = ...): ... + def __init__(self, filename, sort: str = "cumulative", dump: Incomplete | None = None): ... @property def platform_key(self): ... def has_stats(self): ... @@ -17,5 +17,5 @@ class ProfileStatsFile: def reset_count(self) -> None: ... def replace(self, callcount) -> None: ... -def function_call_count(variance: float = ..., times: int = ..., warmup: int = ...): ... -def count_functions(variance: float = ...) -> None: ... +def function_call_count(variance: float = 0.05, times: int = 1, warmup: int = 0): ... +def count_functions(variance: float = 0.05) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/util.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/util.pyi index 0da8a3883e94..907653ac540f 100644 --- a/stubs/SQLAlchemy/sqlalchemy/testing/util.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/testing/util.pyi @@ -2,10 +2,10 @@ from _typeshed import Incomplete from typing import Any def non_refcount_gc_collect(*args) -> None: ... # only present on Python implementations with non-refcount gc -def gc_collect(generation: int = ...) -> None: ... +def gc_collect(generation: int = 2) -> None: ... def lazy_gc() -> None: ... def picklers(): ... -def random_choices(population, k: int = ...): ... +def random_choices(population, k: int = 1): ... def round_decimal(value, prec): ... class RandomSet(set[Any]): @@ -26,7 +26,7 @@ def provide_metadata(fn, *args, **kw): ... def flag_combinations(*combinations): ... def lambda_combinations(lambda_arg_sets, **kw): ... def resolve_lambda(__fn, **kw): ... -def metadata_fixture(ddl: str = ...): ... +def metadata_fixture(ddl: str = "function"): ... def force_drop_names(*names): ... class adict(dict[Any, Any]): @@ -35,5 +35,5 @@ class adict(dict[Any, Any]): get_all: Any def drop_all_tables_from_metadata(metadata, engine_or_connection) -> None: ... -def drop_all_tables(engine, inspector, schema: Incomplete | None = ..., include_names: Incomplete | None = ...) -> None: ... +def drop_all_tables(engine, inspector, schema: Incomplete | None = None, include_names: Incomplete | None = None) -> None: ... def teardown_events(event_cls): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/warnings.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/warnings.pyi index 9aa4255ceaf6..7c72efd57763 100644 --- a/stubs/SQLAlchemy/sqlalchemy/testing/warnings.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/testing/warnings.pyi @@ -4,4 +4,4 @@ class SATestSuiteWarning(sa_exc.SAWarning): ... def warn_test_suite(message) -> None: ... def setup_filters() -> None: ... -def assert_warnings(fn, warning_msgs, regex: bool = ...): ... +def assert_warnings(fn, warning_msgs, regex: bool = False): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/util/_collections.pyi b/stubs/SQLAlchemy/sqlalchemy/util/_collections.pyi index 9e197be62898..0317b827b89c 100644 --- a/stubs/SQLAlchemy/sqlalchemy/util/_collections.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/util/_collections.pyi @@ -68,11 +68,11 @@ class ImmutableProperties(ImmutableContainer, Properties[_T], Generic[_T]): ... OrderedDict = dict -def sort_dictionary(d, key: Incomplete | None = ...): ... +def sort_dictionary(d, key: Incomplete | None = None): ... class OrderedSet(set[_T], Generic[_T]): @overload - def __init__(self, d: None = ...) -> None: ... + def __init__(self, d: None = None) -> None: ... @overload def __init__(self, d: Iterable[_T]) -> None: ... def add(self, element: _T) -> None: ... @@ -101,7 +101,7 @@ class OrderedSet(set[_T], Generic[_T]): __isub__ = difference_update # type: ignore[assignment] class IdentitySet: - def __init__(self, iterable: Incomplete | None = ...) -> None: ... + def __init__(self, iterable: Incomplete | None = None) -> None: ... def add(self, value) -> None: ... def __contains__(self, value): ... def remove(self, value) -> None: ... @@ -147,7 +147,7 @@ class WeakSequence: def __getitem__(self, index): ... class OrderedIdentitySet(IdentitySet): - def __init__(self, iterable: Incomplete | None = ...) -> None: ... + def __init__(self, iterable: Incomplete | None = None) -> None: ... class PopulateDict(dict[Any, Any]): creator: Any @@ -168,28 +168,28 @@ column_dict = dict # or pyright complains ordered_column_set = OrderedSet[_T] # noqa: Y026 -def unique_list(seq: Iterable[_T], hashfunc: Callable[[_T], Any] | None = ...) -> list[_T]: ... +def unique_list(seq: Iterable[_T], hashfunc: Callable[[_T], Any] | None = None) -> list[_T]: ... class UniqueAppender: data: Any - def __init__(self, data, via: Incomplete | None = ...) -> None: ... + def __init__(self, data, via: Incomplete | None = None) -> None: ... def append(self, item) -> None: ... def __iter__(self): ... def coerce_generator_arg(arg): ... -def to_list(x, default: Incomplete | None = ...): ... +def to_list(x, default: Incomplete | None = None): ... def has_intersection(set_, iterable): ... def to_set(x): ... def to_column_set(x): ... -def update_copy(d, _new: Incomplete | None = ..., **kw): ... +def update_copy(d, _new: Incomplete | None = None, **kw): ... def flatten_iterator(x) -> None: ... class LRUCache(dict[Any, Any]): capacity: Any threshold: Any size_alert: Any - def __init__(self, capacity: int = ..., threshold: float = ..., size_alert: Incomplete | None = ...) -> None: ... - def get(self, key, default: Incomplete | None = ...): ... + def __init__(self, capacity: int = 100, threshold: float = 0.5, size_alert: Incomplete | None = None) -> None: ... + def get(self, key, default: Incomplete | None = None): ... def __getitem__(self, key): ... def values(self): ... def setdefault(self, key, value): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/util/_concurrency_py3k.pyi b/stubs/SQLAlchemy/sqlalchemy/util/_concurrency_py3k.pyi index 502245182610..4a8d24e50ee1 100644 --- a/stubs/SQLAlchemy/sqlalchemy/util/_concurrency_py3k.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/util/_concurrency_py3k.pyi @@ -8,7 +8,7 @@ from .langhelpers import memoized_property def is_exit_exception(e): ... def await_only(awaitable: Coroutine[Any, Any, Any]) -> Any: ... def await_fallback(awaitable: Coroutine[Any, Any, Any]) -> Any: ... -async def greenlet_spawn(fn: Callable[..., Any], *args, _require_await: bool = ..., **kwargs) -> Any: ... +async def greenlet_spawn(fn: Callable[..., Any], *args, _require_await: bool = False, **kwargs) -> Any: ... class AsyncAdaptedLock: @memoized_property diff --git a/stubs/SQLAlchemy/sqlalchemy/util/_preloaded.pyi b/stubs/SQLAlchemy/sqlalchemy/util/_preloaded.pyi index eaabad39009d..f1e73ecf3a88 100644 --- a/stubs/SQLAlchemy/sqlalchemy/util/_preloaded.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/util/_preloaded.pyi @@ -3,7 +3,7 @@ from typing import Any class _ModuleRegistry: module_registry: Any prefix: Any - def __init__(self, prefix: str = ...) -> None: ... + def __init__(self, prefix: str = "sqlalchemy.") -> None: ... def preload_module(self, *deps): ... def import_prefix(self, path) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/util/compat.pyi b/stubs/SQLAlchemy/sqlalchemy/util/compat.pyi index 5368e9e3f237..6bee9382e97c 100644 --- a/stubs/SQLAlchemy/sqlalchemy/util/compat.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/util/compat.pyi @@ -51,7 +51,7 @@ class FullArgSpec(NamedTuple): class nullcontext: enter_result: Any - def __init__(self, enter_result: Incomplete | None = ...) -> None: ... + def __init__(self, enter_result: Incomplete | None = None) -> None: ... def __enter__(self): ... def __exit__(self, *excinfo: Unused) -> None: ... @@ -78,7 +78,7 @@ def b64encode(x): ... def decode_backslashreplace(text, encoding): ... def cmp(a, b): ... def raise_( - exception, with_traceback: Incomplete | None = ..., replace_context: Incomplete | None = ..., from_: bool = ... + exception, with_traceback: Incomplete | None = None, replace_context: Incomplete | None = None, from_: bool = False ) -> None: ... def u(s): ... def ue(s): ... @@ -88,12 +88,12 @@ callable = builtins.callable def safe_bytestring(text): ... def inspect_formatargspec( args, - varargs: Incomplete | None = ..., - varkw: Incomplete | None = ..., - defaults: Incomplete | None = ..., - kwonlyargs=..., - kwonlydefaults=..., - annotations=..., + varargs: Incomplete | None = None, + varkw: Incomplete | None = None, + defaults: Incomplete | None = None, + kwonlyargs=(), + kwonlydefaults={}, + annotations={}, formatarg=..., formatvarargs=..., formatvarkw=..., @@ -103,6 +103,6 @@ def inspect_formatargspec( ): ... def dataclass_fields(cls): ... def local_dataclass_fields(cls): ... -def raise_from_cause(exception, exc_info: Incomplete | None = ...) -> None: ... -def reraise(tp, value, tb: Incomplete | None = ..., cause: Incomplete | None = ...) -> None: ... +def raise_from_cause(exception, exc_info: Incomplete | None = None) -> None: ... +def reraise(tp, value, tb: Incomplete | None = None, cause: Incomplete | None = None) -> None: ... def with_metaclass(meta, *bases, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/util/deprecations.pyi b/stubs/SQLAlchemy/sqlalchemy/util/deprecations.pyi index ca733b24aff0..139b2b3ad029 100644 --- a/stubs/SQLAlchemy/sqlalchemy/util/deprecations.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/util/deprecations.pyi @@ -8,18 +8,20 @@ from .langhelpers import ( SQLALCHEMY_WARN_20: bool -def warn_deprecated(msg, version, stacklevel: int = ..., code: Incomplete | None = ...) -> None: ... -def warn_deprecated_limited(msg, args, version, stacklevel: int = ..., code: Incomplete | None = ...) -> None: ... -def warn_deprecated_20(msg, stacklevel: int = ..., code: Incomplete | None = ...) -> None: ... -def deprecated_cls(version, message, constructor: str = ...): ... -def deprecated_20_cls(clsname, alternative: Incomplete | None = ..., constructor: str = ..., becomes_legacy: bool = ...): ... +def warn_deprecated(msg, version, stacklevel: int = 3, code: Incomplete | None = None) -> None: ... +def warn_deprecated_limited(msg, args, version, stacklevel: int = 3, code: Incomplete | None = None) -> None: ... +def warn_deprecated_20(msg, stacklevel: int = 3, code: Incomplete | None = None) -> None: ... +def deprecated_cls(version, message, constructor: str = "__init__"): ... +def deprecated_20_cls( + clsname, alternative: Incomplete | None = None, constructor: str = "__init__", becomes_legacy: bool = False +): ... def deprecated( version, - message: Incomplete | None = ..., - add_deprecation_to_docstring: bool = ..., - warning: Incomplete | None = ..., - enable_warnings: bool = ..., + message: Incomplete | None = None, + add_deprecation_to_docstring: bool = True, + warning: Incomplete | None = None, + enable_warnings: bool = True, ): ... def moved_20(message, **kw): ... -def deprecated_20(api_name, alternative: Incomplete | None = ..., becomes_legacy: bool = ..., **kw): ... +def deprecated_20(api_name, alternative: Incomplete | None = None, becomes_legacy: bool = False, **kw): ... def deprecated_params(**specs): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/util/langhelpers.pyi b/stubs/SQLAlchemy/sqlalchemy/util/langhelpers.pyi index 021eee885272..d57b9adde7b9 100644 --- a/stubs/SQLAlchemy/sqlalchemy/util/langhelpers.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/util/langhelpers.pyi @@ -12,7 +12,7 @@ def md5_hex(x): ... class safe_reraise: warn_only: Any - def __init__(self, warn_only: bool = ...) -> None: ... + def __init__(self, warn_only: bool = False) -> None: ... def __enter__(self) -> None: ... def __exit__( self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None @@ -25,34 +25,34 @@ def method_is_overridden(instance_or_cls, against_method): ... def decode_slice(slc): ... def map_bits(fn, n) -> None: ... def decorator(target): ... -def public_factory(target, location, class_location: Incomplete | None = ...): ... +def public_factory(target, location, class_location: Incomplete | None = None): ... class PluginLoader: group: Any impls: Any auto_fn: Any - def __init__(self, group, auto_fn: Incomplete | None = ...) -> None: ... + def __init__(self, group, auto_fn: Incomplete | None = None) -> None: ... def clear(self) -> None: ... def load(self, name): ... def register(self, name, modulepath, objname): ... -def get_cls_kwargs(cls, _set: Incomplete | None = ...): ... +def get_cls_kwargs(cls, _set: Incomplete | None = None): ... def get_func_kwargs(func): ... -def get_callable_argspec(fn, no_self: bool = ..., _is_init: bool = ...): ... -def format_argspec_plus(fn, grouped: bool = ...): ... -def format_argspec_init(method, grouped: bool = ...): ... +def get_callable_argspec(fn, no_self: bool = False, _is_init: bool = False): ... +def format_argspec_plus(fn, grouped: bool = True): ... +def format_argspec_init(method, grouped: bool = True): ... def create_proxy_methods( - target_cls, target_cls_sphinx_name, proxy_cls_sphinx_name, classmethods=..., methods=..., attributes=... + target_cls, target_cls_sphinx_name, proxy_cls_sphinx_name, classmethods=(), methods=(), attributes=() ): ... def getargspec_init(method): ... def unbound_method_to_callable(func_or_cls): ... -def generic_repr(obj, additional_kw=..., to_inspect: Incomplete | None = ..., omit_kwarg=...): ... +def generic_repr(obj, additional_kw=(), to_inspect: Incomplete | None = None, omit_kwarg=()): ... class portable_instancemethod: target: Any name: Any kwargs: Any - def __init__(self, meth, kwargs=...) -> None: ... + def __init__(self, meth, kwargs=()) -> None: ... def __call__(self, *arg, **kw): ... def class_hierarchy(cls): ... @@ -60,19 +60,19 @@ def iterate_attributes(cls) -> None: ... def monkeypatch_proxied_specials( into_cls, from_cls, - skip: Incomplete | None = ..., - only: Incomplete | None = ..., - name: str = ..., - from_instance: Incomplete | None = ..., + skip: Incomplete | None = None, + only: Incomplete | None = None, + name: str = "self.proxy", + from_instance: Incomplete | None = None, ) -> None: ... def methods_equivalent(meth1, meth2): ... -def as_interface(obj, cls: Incomplete | None = ..., methods: Incomplete | None = ..., required: Incomplete | None = ...): ... +def as_interface(obj, cls: Incomplete | None = None, methods: Incomplete | None = None, required: Incomplete | None = None): ... class memoized_property(Generic[_R]): fget: Callable[..., _R] __doc__: str __name__: str - def __init__(self, fget: Callable[..., _R], doc: str | None = ...) -> None: ... + def __init__(self, fget: Callable[..., _R], doc: str | None = None) -> None: ... @overload def __get__(self, obj: None, cls: Unused) -> Self: ... @overload @@ -87,7 +87,7 @@ class HasMemoized: fget: Callable[..., _R] __doc__: str __name__: str - def __init__(self, fget: Callable[..., _R], doc: str | None = ...) -> None: ... + def __init__(self, fget: Callable[..., _R], doc: str | None = None) -> None: ... @overload def __get__(self, obj: None, cls: Unused) -> Self: ... @overload @@ -102,11 +102,11 @@ class MemoizedSlots: def asbool(obj): ... def bool_or_str(*text): ... def asint(value): ... -def coerce_kw_type(kw, key, type_, flexi_bool: bool = ..., dest: Incomplete | None = ...) -> None: ... +def coerce_kw_type(kw, key, type_, flexi_bool: bool = True, dest: Incomplete | None = None) -> None: ... def constructor_key(obj, cls): ... def constructor_copy(obj, cls, *args, **kw): ... def counter(): ... -def duck_type_collection(specimen, default: Incomplete | None = ...): ... +def duck_type_collection(specimen, default: Incomplete | None = None): ... def assert_arg_type(arg, argtype, name): ... def dictlike_iteritems(dictlike): ... @@ -133,25 +133,25 @@ class hybridmethod: def classlevel(self, func): ... class _symbol(int): - def __new__(cls, name, doc: Incomplete | None = ..., canonical: Incomplete | None = ...): ... + def __new__(cls, name, doc: Incomplete | None = None, canonical: Incomplete | None = None): ... def __reduce__(self): ... class symbol: symbols: Any - def __new__(cls, name, doc: Incomplete | None = ..., canonical: Incomplete | None = ...): ... + def __new__(cls, name, doc: Incomplete | None = None, canonical: Incomplete | None = None): ... @classmethod - def parse_user_argument(cls, arg, choices, name, resolve_symbol_names: bool = ...): ... + def parse_user_argument(cls, arg, choices, name, resolve_symbol_names: bool = False): ... def set_creation_order(instance) -> None: ... def warn_exception(func, *args, **kwargs): ... -def ellipses_string(value, len_: int = ...): ... +def ellipses_string(value, len_: int = 25): ... class _hash_limit_string(compat.text_type): def __new__(cls, value, num, args): ... def __hash__(self) -> int: ... def __eq__(self, other): ... -def warn(msg, code: Incomplete | None = ...) -> None: ... +def warn(msg, code: Incomplete | None = None) -> None: ... def warn_limited(msg, args) -> None: ... def only_once(fn, retry_on_exception): ... def chop_traceback(tb, exclude_prefix=..., exclude_suffix=...): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/util/queue.pyi b/stubs/SQLAlchemy/sqlalchemy/util/queue.pyi index 7a26c25d72c7..852018369726 100644 --- a/stubs/SQLAlchemy/sqlalchemy/util/queue.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/util/queue.pyi @@ -9,27 +9,27 @@ class Queue: not_empty: Any not_full: Any use_lifo: Any - def __init__(self, maxsize: int = ..., use_lifo: bool = ...) -> None: ... + def __init__(self, maxsize: int = 0, use_lifo: bool = False) -> None: ... def qsize(self): ... def empty(self): ... def full(self): ... - def put(self, item, block: bool = ..., timeout: Incomplete | None = ...) -> None: ... + def put(self, item, block: bool = True, timeout: Incomplete | None = None) -> None: ... def put_nowait(self, item): ... - def get(self, block: bool = ..., timeout: Incomplete | None = ...): ... + def get(self, block: bool = True, timeout: Incomplete | None = None): ... def get_nowait(self): ... class AsyncAdaptedQueue: await_: Any use_lifo: Any maxsize: Any - def __init__(self, maxsize: int = ..., use_lifo: bool = ...) -> None: ... + def __init__(self, maxsize: int = 0, use_lifo: bool = False) -> None: ... def empty(self): ... def full(self): ... def qsize(self): ... def put_nowait(self, item): ... - def put(self, item, block: bool = ..., timeout: Incomplete | None = ...): ... + def put(self, item, block: bool = True, timeout: Incomplete | None = None): ... def get_nowait(self): ... - def get(self, block: bool = ..., timeout: Incomplete | None = ...): ... + def get(self, block: bool = True, timeout: Incomplete | None = None): ... class FallbackAsyncAdaptedQueue(AsyncAdaptedQueue): await_: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/util/topological.pyi b/stubs/SQLAlchemy/sqlalchemy/util/topological.pyi index 04428e1ba790..7f54e1a0574c 100644 --- a/stubs/SQLAlchemy/sqlalchemy/util/topological.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/util/topological.pyi @@ -1,3 +1,3 @@ def sort_as_subsets(tuples, allitems) -> None: ... -def sort(tuples, allitems, deterministic_order: bool = ...) -> None: ... +def sort(tuples, allitems, deterministic_order: bool = True) -> None: ... def find_cycles(tuples, allitems): ... diff --git a/stubs/redis/redis/asyncio/client.pyi b/stubs/redis/redis/asyncio/client.pyi index 663d50079b55..fed150e2413f 100644 --- a/stubs/redis/redis/asyncio/client.pyi +++ b/stubs/redis/redis/asyncio/client.pyi @@ -35,60 +35,60 @@ class Redis(AbstractRedis, RedisModuleCommands, AsyncCoreCommands[_StrType], Asy def __init__( self, *, - host: str = ..., - port: int = ..., - db: str | int = ..., - password: str | None = ..., - socket_timeout: float | None = ..., - socket_connect_timeout: float | None = ..., - socket_keepalive: bool | None = ..., - socket_keepalive_options: Mapping[int, int | bytes] | None = ..., - connection_pool: ConnectionPool | None = ..., - unix_socket_path: str | None = ..., - encoding: str = ..., - encoding_errors: str = ..., - decode_responses: bool = ..., - retry_on_timeout: bool = ..., - retry_on_error: list[type[RedisError]] | None = ..., - ssl: bool = ..., - ssl_keyfile: str | None = ..., - ssl_certfile: str | None = ..., - ssl_cert_reqs: str = ..., - ssl_ca_certs: str | None = ..., - ssl_ca_data: str | None = ..., - ssl_check_hostname: bool = ..., - max_connections: int | None = ..., - single_connection_client: bool = ..., - health_check_interval: int = ..., - client_name: str | None = ..., - username: str | None = ..., - retry: Retry | None = ..., - auto_close_connection_pool: bool = ..., - redis_connect_func: ConnectCallbackT | None = ..., - credential_provider: CredentialProvider | None = ..., + host: str = "localhost", + port: int = 6379, + db: str | int = 0, + password: str | None = None, + socket_timeout: float | None = None, + socket_connect_timeout: float | None = None, + socket_keepalive: bool | None = None, + socket_keepalive_options: Mapping[int, int | bytes] | None = None, + connection_pool: ConnectionPool | None = None, + unix_socket_path: str | None = None, + encoding: str = "utf-8", + encoding_errors: str = "strict", + decode_responses: bool = False, + retry_on_timeout: bool = False, + retry_on_error: list[type[RedisError]] | None = None, + ssl: bool = False, + ssl_keyfile: str | None = None, + ssl_certfile: str | None = None, + ssl_cert_reqs: str = "required", + ssl_ca_certs: str | None = None, + ssl_ca_data: str | None = None, + ssl_check_hostname: bool = False, + max_connections: int | None = None, + single_connection_client: bool = False, + health_check_interval: int = 0, + client_name: str | None = None, + username: str | None = None, + retry: Retry | None = None, + auto_close_connection_pool: bool = True, + redis_connect_func: ConnectCallbackT | None = None, + credential_provider: CredentialProvider | None = None, ) -> None: ... def __await__(self): ... async def initialize(self) -> Self: ... def set_response_callback(self, command: str, callback: ResponseCallbackT): ... def load_external_module(self, funcname, func) -> None: ... - def pipeline(self, transaction: bool = ..., shard_hint: str | None = ...) -> Pipeline[_StrType]: ... + def pipeline(self, transaction: bool = True, shard_hint: str | None = None) -> Pipeline[_StrType]: ... async def transaction( self, func: Callable[[Pipeline[_StrType]], Any | Awaitable[Any]], *watches: KeyT, - shard_hint: str | None = ..., - value_from_callable: bool = ..., - watch_delay: float | None = ..., + shard_hint: str | None = None, + value_from_callable: bool = False, + watch_delay: float | None = None, ): ... def lock( self, name: KeyT, - timeout: float | None = ..., - sleep: float = ..., - blocking: bool = ..., - blocking_timeout: float | None = ..., - lock_class: type[Lock] | None = ..., - thread_local: bool = ..., + timeout: float | None = None, + sleep: float = 0.1, + blocking: bool = True, + blocking_timeout: float | None = None, + lock_class: type[Lock] | None = None, + thread_local: bool = True, ) -> Lock: ... def pubsub(self, **kwargs) -> PubSub: ... def monitor(self) -> Monitor: ... @@ -98,7 +98,7 @@ class Redis(AbstractRedis, RedisModuleCommands, AsyncCoreCommands[_StrType], Asy self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None ) -> None: ... def __del__(self, _warnings: Any = ...) -> None: ... - async def close(self, close_connection_pool: bool | None = ...) -> None: ... + async def close(self, close_connection_pool: bool | None = None) -> None: ... async def execute_command(self, *args, **options): ... async def parse_response(self, connection: Connection, command_name: str | bytes, **options): ... @@ -141,9 +141,9 @@ class PubSub: def __init__( self, connection_pool: ConnectionPool, - shard_hint: str | None = ..., - ignore_subscribe_messages: bool = ..., - encoder: Incomplete | None = ..., + shard_hint: str | None = None, + ignore_subscribe_messages: bool = False, + encoder: Incomplete | None = None, ) -> None: ... async def __aenter__(self) -> Self: ... async def __aexit__( @@ -156,17 +156,17 @@ class PubSub: @property def subscribed(self) -> bool: ... async def execute_command(self, *args: EncodableT): ... - async def parse_response(self, block: bool = ..., timeout: float = ...): ... + async def parse_response(self, block: bool = True, timeout: float = 0): ... async def check_health(self) -> None: ... async def psubscribe(self, *args: ChannelT, **kwargs: PubSubHandler): ... def punsubscribe(self, *args: ChannelT) -> Awaitable[Any]: ... async def subscribe(self, *args: ChannelT, **kwargs: Callable[..., Any]): ... def unsubscribe(self, *args) -> Awaitable[Any]: ... def listen(self) -> AsyncIterator[Any]: ... - async def get_message(self, ignore_subscribe_messages: bool = ..., timeout: float = ...): ... - def ping(self, message: Incomplete | None = ...) -> Awaitable[Any]: ... - async def handle_message(self, response, ignore_subscribe_messages: bool = ...): ... - async def run(self, *, exception_handler: PSWorkerThreadExcHandlerT | None = ..., poll_timeout: float = ...) -> None: ... + async def get_message(self, ignore_subscribe_messages: bool = False, timeout: float = 0.0): ... + def ping(self, message: Incomplete | None = None) -> Awaitable[Any]: ... + async def handle_message(self, response, ignore_subscribe_messages: bool = False): ... + async def run(self, *, exception_handler: PSWorkerThreadExcHandlerT | None = None, poll_timeout: float = 1.0) -> None: ... class PubsubWorkerExceptionHandler(Protocol): def __call__(self, e: BaseException, pubsub: PubSub): ... @@ -212,33 +212,33 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def annotate_exception(self, exception: Exception, number: int, command: Iterable[object]) -> None: ... async def parse_response(self, connection: Connection, command_name: str | bytes, **options): ... async def load_scripts(self) -> None: ... - async def execute(self, raise_on_error: bool = ...): ... + async def execute(self, raise_on_error: bool = True): ... async def discard(self) -> None: ... async def watch(self, *names: KeyT) -> bool: ... async def unwatch(self) -> bool: ... # region acl commands - def acl_cat(self, category: str | None = ..., **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] + def acl_cat(self, category: str | None = None, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def acl_deluser(self, *username: str, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] - def acl_genpass(self, bits: int | None = ..., **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] + def acl_genpass(self, bits: int | None = None, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def acl_getuser(self, username: str, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def acl_help(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def acl_list(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] - def acl_log(self, count: int | None = ..., **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] + def acl_log(self, count: int | None = None, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def acl_log_reset(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def acl_load(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def acl_save(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def acl_setuser( # type: ignore[override] self, username: str, - enabled: bool = ..., - nopass: bool = ..., - passwords: Sequence[str] | None = ..., - hashed_passwords: Sequence[str] | None = ..., - categories: Sequence[str] | None = ..., - commands: Sequence[str] | None = ..., - keys: Sequence[str] | None = ..., - channels: Iterable[ChannelT] | None = ..., - selectors: Iterable[tuple[str, KeyT]] | None = ..., + enabled: bool = False, + nopass: bool = False, + passwords: Sequence[str] | None = None, + hashed_passwords: Sequence[str] | None = None, + categories: Sequence[str] | None = None, + commands: Sequence[str] | None = None, + keys: Sequence[str] | None = None, + channels: Iterable[ChannelT] | None = None, + selectors: Iterable[tuple[str, KeyT]] | None = None, reset: bool = False, reset_keys: bool = False, reset_channels: bool = False, @@ -255,48 +255,52 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): # endregion # region BasicKey commands def append(self, key, value) -> Any: ... # type: ignore[override] - def bitcount(self, key: _Key, start: int | None = ..., end: int | None = ..., mode: str | None = ...) -> Any: ... # type: ignore[override] - def bitfield(self, key, default_overflow: Incomplete | None = ...) -> Any: ... # type: ignore[override] + def bitcount(self, key: _Key, start: int | None = None, end: int | None = None, mode: str | None = None) -> Any: ... # type: ignore[override] + def bitfield(self, key, default_overflow: Incomplete | None = None) -> Any: ... # type: ignore[override] def bitop(self, operation, dest, *keys) -> Any: ... # type: ignore[override] - def bitpos(self, key: _Key, bit: int, start: int | None = ..., end: int | None = ..., mode: str | None = ...) -> Any: ... # type: ignore[override] - def copy(self, source, destination, destination_db: Incomplete | None = ..., replace: bool = ...) -> Any: ... # type: ignore[override] - def decr(self, name, amount: int = ...) -> Any: ... # type: ignore[override] - def decrby(self, name, amount: int = ...) -> Any: ... # type: ignore[override] + def bitpos(self, key: _Key, bit: int, start: int | None = None, end: int | None = None, mode: str | None = None) -> Any: ... # type: ignore[override] + def copy(self, source, destination, destination_db: Incomplete | None = None, replace: bool = False) -> Any: ... # type: ignore[override] + def decr(self, name, amount: int = 1) -> Any: ... # type: ignore[override] + def decrby(self, name, amount: int = 1) -> Any: ... # type: ignore[override] def delete(self, *names: _Key) -> Any: ... # type: ignore[override] def dump(self, name: _Key) -> Any: ... # type: ignore[override] def exists(self, *names: _Key) -> Any: ... # type: ignore[override] def expire( # type: ignore[override] - self, name: _Key, time: int | timedelta, nx: bool = ..., xx: bool = ..., gt: bool = ..., lt: bool = ... + self, name: _Key, time: int | timedelta, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False ) -> Any: ... - def expireat(self, name, when, nx: bool = ..., xx: bool = ..., gt: bool = ..., lt: bool = ...) -> Any: ... # type: ignore[override] + def expireat(self, name, when, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False) -> Any: ... # type: ignore[override] def get(self, name: _Key) -> Any: ... # type: ignore[override] def getdel(self, name: _Key) -> Any: ... # type: ignore[override] def getex( # type: ignore[override] self, name, - ex: Incomplete | None = ..., - px: Incomplete | None = ..., - exat: Incomplete | None = ..., - pxat: Incomplete | None = ..., - persist: bool = ..., + ex: Incomplete | None = None, + px: Incomplete | None = None, + exat: Incomplete | None = None, + pxat: Incomplete | None = None, + persist: bool = False, ) -> Any: ... def getbit(self, name: _Key, offset: int) -> Any: ... # type: ignore[override] def getrange(self, key, start, end) -> Any: ... # type: ignore[override] def getset(self, name, value) -> Any: ... # type: ignore[override] - def incr(self, name: _Key, amount: int = ...) -> Any: ... # type: ignore[override] - def incrby(self, name: _Key, amount: int = ...) -> Any: ... # type: ignore[override] - def incrbyfloat(self, name: _Key, amount: float = ...) -> Any: ... # type: ignore[override] - def keys(self, pattern: _Key = ..., **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] + def incr(self, name: _Key, amount: int = 1) -> Any: ... # type: ignore[override] + def incrby(self, name: _Key, amount: int = 1) -> Any: ... # type: ignore[override] + def incrbyfloat(self, name: _Key, amount: float = 1.0) -> Any: ... # type: ignore[override] + def keys(self, pattern: _Key = "*", **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def lmove( # type: ignore[override] - self, first_list: _Key, second_list: _Key, src: Literal["LEFT", "RIGHT"] = ..., dest: Literal["LEFT", "RIGHT"] = ... + self, + first_list: _Key, + second_list: _Key, + src: Literal["LEFT", "RIGHT"] = "LEFT", + dest: Literal["LEFT", "RIGHT"] = "RIGHT", ) -> Any: ... def blmove( # type: ignore[override] self, first_list: _Key, second_list: _Key, timeout: float, - src: Literal["LEFT", "RIGHT"] = ..., - dest: Literal["LEFT", "RIGHT"] = ..., + src: Literal["LEFT", "RIGHT"] = "LEFT", + dest: Literal["LEFT", "RIGHT"] = "RIGHT", ) -> Any: ... def mget(self, keys: _Key | Iterable[_Key], *args: _Key) -> Any: ... # type: ignore[override] def mset(self, mapping: Mapping[_Key, _Value]) -> Any: ... # type: ignore[override] @@ -304,14 +308,14 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def move(self, name: _Key, db: int) -> Any: ... # type: ignore[override] def persist(self, name: _Key) -> Any: ... # type: ignore[override] def pexpire( # type: ignore[override] - self, name: _Key, time: int | timedelta, nx: bool = ..., xx: bool = ..., gt: bool = ..., lt: bool = ... + self, name: _Key, time: int | timedelta, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False ) -> Any: ... def pexpireat( # type: ignore[override] - self, name: _Key, when: int | datetime, nx: bool = ..., xx: bool = ..., gt: bool = ..., lt: bool = ... + self, name: _Key, when: int | datetime, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False ) -> Any: ... def psetex(self, name, time_ms, value) -> Any: ... # type: ignore[override] def pttl(self, name: _Key) -> Any: ... # type: ignore[override] - def hrandfield(self, key, count: Incomplete | None = ..., withvalues: bool = ...) -> Any: ... # type: ignore[override] + def hrandfield(self, key, count: Incomplete | None = None, withvalues: bool = False) -> Any: ... # type: ignore[override] def randomkey(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def rename(self, src, dst) -> Any: ... # type: ignore[override] def renamenx(self, src, dst) -> Any: ... # type: ignore[override] @@ -320,23 +324,23 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): name, ttl, value, - replace: bool = ..., - absttl: bool = ..., - idletime: Incomplete | None = ..., - frequency: Incomplete | None = ..., + replace: bool = False, + absttl: bool = False, + idletime: Incomplete | None = None, + frequency: Incomplete | None = None, ) -> Any: ... def set( # type: ignore[override] self, name: _Key, value: _Value, - ex: None | int | timedelta = ..., - px: None | int | timedelta = ..., - nx: bool = ..., - xx: bool = ..., - keepttl: bool = ..., - get: bool = ..., - exat: Incomplete | None = ..., - pxat: Incomplete | None = ..., + ex: None | int | timedelta = None, + px: None | int | timedelta = None, + nx: bool = False, + xx: bool = False, + keepttl: bool = False, + get: bool = False, + exat: Incomplete | None = None, + pxat: Incomplete | None = None, ) -> Any: ... def setbit(self, name: _Key, offset: int, value: int) -> Any: ... # type: ignore[override] def setex(self, name: _Key, time: int | timedelta, value: _Value) -> Any: ... # type: ignore[override] @@ -347,15 +351,15 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): algo, value1, value2, - specific_argument: str = ..., - len: bool = ..., - idx: bool = ..., - minmatchlen: Incomplete | None = ..., - withmatchlen: bool = ..., + specific_argument: str = "strings", + len: bool = False, + idx: bool = False, + minmatchlen: Incomplete | None = None, + withmatchlen: bool = False, **kwargs: _CommandOptions, ) -> Any: ... def strlen(self, name) -> Any: ... # type: ignore[override] - def substr(self, name, start, end: int = ...) -> Any: ... # type: ignore[override] + def substr(self, name, start, end: int = -1) -> Any: ... # type: ignore[override] def touch(self, *args) -> Any: ... # type: ignore[override] def ttl(self, name: _Key) -> Any: ... # type: ignore[override] def type(self, name) -> Any: ... # type: ignore[override] @@ -371,18 +375,18 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def hexists(self, name: _Key, key: _Key) -> Any: ... # type: ignore[override] def hget(self, name: _Key, key: _Key) -> Any: ... # type: ignore[override] def hgetall(self, name: _Key) -> Any: ... # type: ignore[override] - def hincrby(self, name: _Key, key: _Key, amount: int = ...) -> Any: ... # type: ignore[override] - def hincrbyfloat(self, name: _Key, key: _Key, amount: float = ...) -> Any: ... # type: ignore[override] + def hincrby(self, name: _Key, key: _Key, amount: int = 1) -> Any: ... # type: ignore[override] + def hincrbyfloat(self, name: _Key, key: _Key, amount: float = 1.0) -> Any: ... # type: ignore[override] def hkeys(self, name: _Key) -> Any: ... # type: ignore[override] def hlen(self, name: _Key) -> Any: ... # type: ignore[override] @overload def hset( # type: ignore[override] - self, name: _Key, key: _Key, value: _Value, mapping: Mapping[_Key, _Value] | None = ..., items: Incomplete | None = ... + self, name: _Key, key: _Key, value: _Value, mapping: Mapping[_Key, _Value] | None = None, items: Incomplete | None = None ) -> Any: ... @overload - def hset(self, name: _Key, key: None, value: None, mapping: Mapping[_Key, _Value], items: Incomplete | None = ...) -> Any: ... # type: ignore[override] + def hset(self, name: _Key, key: None, value: None, mapping: Mapping[_Key, _Value], items: Incomplete | None = None) -> Any: ... # type: ignore[override] @overload - def hset(self, name: _Key, *, mapping: Mapping[_Key, _Value], items: Incomplete | None = ...) -> Any: ... # type: ignore[override] + def hset(self, name: _Key, *, mapping: Mapping[_Key, _Value], items: Incomplete | None = None) -> Any: ... # type: ignore[override] def hsetnx(self, name: _Key, key: _Key, value: _Value) -> Any: ... # type: ignore[override] def hmset(self, name: _Key, mapping: Mapping[_Key, _Value]) -> Any: ... # type: ignore[override] def hmget(self, name: _Key, keys: _Key | Iterable[_Key], *args: _Key) -> Any: ... # type: ignore[override] @@ -390,8 +394,8 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def hstrlen(self, name, key) -> Any: ... # type: ignore[override] # endregion # region geo commands - def geoadd(self, name, values, nx: bool = ..., xx: bool = ..., ch: bool = ...) -> Any: ... # type: ignore[override] - def geodist(self, name, place1, place2, unit: Incomplete | None = ...) -> Any: ... # type: ignore[override] + def geoadd(self, name, values, nx: bool = False, xx: bool = False, ch: bool = False) -> Any: ... # type: ignore[override] + def geodist(self, name, place1, place2, unit: Incomplete | None = None) -> Any: ... # type: ignore[override] def geohash(self, name, *values) -> Any: ... # type: ignore[override] def geopos(self, name, *values) -> Any: ... # type: ignore[override] def georadius( # type: ignore[override] @@ -400,118 +404,118 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): longitude, latitude, radius, - unit: Incomplete | None = ..., - withdist: bool = ..., - withcoord: bool = ..., - withhash: bool = ..., - count: Incomplete | None = ..., - sort: Incomplete | None = ..., - store: Incomplete | None = ..., - store_dist: Incomplete | None = ..., - any: bool = ..., + unit: Incomplete | None = None, + withdist: bool = False, + withcoord: bool = False, + withhash: bool = False, + count: Incomplete | None = None, + sort: Incomplete | None = None, + store: Incomplete | None = None, + store_dist: Incomplete | None = None, + any: bool = False, ) -> Any: ... def georadiusbymember( # type: ignore[override] self, name, member, radius, - unit: Incomplete | None = ..., - withdist: bool = ..., - withcoord: bool = ..., - withhash: bool = ..., - count: Incomplete | None = ..., - sort: Incomplete | None = ..., - store: Incomplete | None = ..., - store_dist: Incomplete | None = ..., - any: bool = ..., + unit: Incomplete | None = None, + withdist: bool = False, + withcoord: bool = False, + withhash: bool = False, + count: Incomplete | None = None, + sort: Incomplete | None = None, + store: Incomplete | None = None, + store_dist: Incomplete | None = None, + any: bool = False, ) -> Any: ... def geosearch( # type: ignore[override] self, name, - member: Incomplete | None = ..., - longitude: Incomplete | None = ..., - latitude: Incomplete | None = ..., - unit: str = ..., - radius: Incomplete | None = ..., - width: Incomplete | None = ..., - height: Incomplete | None = ..., - sort: Incomplete | None = ..., - count: Incomplete | None = ..., - any: bool = ..., - withcoord: bool = ..., - withdist: bool = ..., - withhash: bool = ..., + member: Incomplete | None = None, + longitude: Incomplete | None = None, + latitude: Incomplete | None = None, + unit: str = "m", + radius: Incomplete | None = None, + width: Incomplete | None = None, + height: Incomplete | None = None, + sort: Incomplete | None = None, + count: Incomplete | None = None, + any: bool = False, + withcoord: bool = False, + withdist: bool = False, + withhash: bool = False, ) -> Any: ... def geosearchstore( # type: ignore[override] self, dest, name, - member: Incomplete | None = ..., - longitude: Incomplete | None = ..., - latitude: Incomplete | None = ..., - unit: str = ..., - radius: Incomplete | None = ..., - width: Incomplete | None = ..., - height: Incomplete | None = ..., - sort: Incomplete | None = ..., - count: Incomplete | None = ..., - any: bool = ..., - storedist: bool = ..., + member: Incomplete | None = None, + longitude: Incomplete | None = None, + latitude: Incomplete | None = None, + unit: str = "m", + radius: Incomplete | None = None, + width: Incomplete | None = None, + height: Incomplete | None = None, + sort: Incomplete | None = None, + count: Incomplete | None = None, + any: bool = False, + storedist: bool = False, ) -> Any: ... # endregion # region list commands @overload - def blpop(self, keys: _Value | Iterable[_Value], timeout: Literal[0] | None = ...) -> Any: ... # type: ignore[override] + def blpop(self, keys: _Value | Iterable[_Value], timeout: Literal[0] | None = 0) -> Any: ... # type: ignore[override] @overload def blpop(self, keys: _Value | Iterable[_Value], timeout: float) -> Any: ... # type: ignore[override] @overload - def brpop(self, keys: _Value | Iterable[_Value], timeout: Literal[0] | None = ...) -> Any: ... # type: ignore[override] + def brpop(self, keys: _Value | Iterable[_Value], timeout: Literal[0] | None = 0) -> Any: ... # type: ignore[override] @overload def brpop(self, keys: _Value | Iterable[_Value], timeout: float) -> Any: ... # type: ignore[override] - def brpoplpush(self, src, dst, timeout: int | None = ...) -> Any: ... # type: ignore[override] + def brpoplpush(self, src, dst, timeout: int | None = 0) -> Any: ... # type: ignore[override] def lindex(self, name: _Key, index: int) -> Any: ... # type: ignore[override] def linsert( # type: ignore[override] self, name: _Key, where: Literal["BEFORE", "AFTER", "before", "after"], refvalue: _Value, value: _Value ) -> Any: ... def llen(self, name: _Key) -> Any: ... # type: ignore[override] - def lpop(self, name, count: int | None = ...) -> Any: ... # type: ignore[override] + def lpop(self, name, count: int | None = None) -> Any: ... # type: ignore[override] def lpush(self, name: _Value, *values: _Value) -> Any: ... # type: ignore[override] def lpushx(self, name, value) -> Any: ... # type: ignore[override] def lrange(self, name: _Key, start: int, end: int) -> Any: ... # type: ignore[override] def lrem(self, name: _Key, count: int, value: _Value) -> Any: ... # type: ignore[override] def lset(self, name: _Key, index: int, value: _Value) -> Any: ... # type: ignore[override] def ltrim(self, name: _Key, start: int, end: int) -> Any: ... # type: ignore[override] - def rpop(self, name, count: int | None = ...) -> Any: ... # type: ignore[override] + def rpop(self, name, count: int | None = None) -> Any: ... # type: ignore[override] def rpoplpush(self, src, dst) -> Any: ... # type: ignore[override] def rpush(self, name: _Value, *values: _Value) -> Any: ... # type: ignore[override] def rpushx(self, name, value) -> Any: ... # type: ignore[override] - def lpos(self, name, value, rank: Incomplete | None = ..., count: Incomplete | None = ..., maxlen: Incomplete | None = ...) -> Any: ... # type: ignore[override] + def lpos(self, name, value, rank: Incomplete | None = None, count: Incomplete | None = None, maxlen: Incomplete | None = None) -> Any: ... # type: ignore[override] @overload # type: ignore[override] def sort( self, name: _Key, - start: int | None = ..., - num: int | None = ..., - by: _Key | None = ..., - get: _Key | Sequence[_Key] | None = ..., - desc: bool = ..., - alpha: bool = ..., - store: None = ..., - groups: bool = ..., + start: int | None = None, + num: int | None = None, + by: _Key | None = None, + get: _Key | Sequence[_Key] | None = None, + desc: bool = False, + alpha: bool = False, + store: None = None, + groups: bool = False, ) -> list[_StrType]: ... @overload # type: ignore[override] def sort( self, name: _Key, - start: int | None = ..., - num: int | None = ..., - by: _Key | None = ..., - get: _Key | Sequence[_Key] | None = ..., - desc: bool = ..., - alpha: bool = ..., + start: int | None = None, + num: int | None = None, + by: _Key | None = None, + get: _Key | Sequence[_Key] | None = None, + desc: bool = False, + alpha: bool = False, *, store: _Key, - groups: bool = ..., + groups: bool = False, ) -> Any: ... @overload # type: ignore[override] def sort( @@ -524,29 +528,29 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): desc: bool, alpha: bool, store: _Key, - groups: bool = ..., + groups: bool = False, ) -> Any: ... # endregion # region scan commands def scan( # type: ignore[override] self, - cursor: int = ..., - match: _Key | None = ..., - count: int | None = ..., - _type: str | None = ..., + cursor: int = 0, + match: _Key | None = None, + count: int | None = None, + _type: str | None = None, **kwargs: _CommandOptions, ) -> Any: ... - def sscan(self, name: _Key, cursor: int = ..., match: _Key | None = ..., count: int | None = ...) -> Any: ... # type: ignore[override] - def hscan(self, name: _Key, cursor: int = ..., match: _Key | None = ..., count: int | None = ...) -> Any: ... # type: ignore[override] + def sscan(self, name: _Key, cursor: int = 0, match: _Key | None = None, count: int | None = None) -> Any: ... # type: ignore[override] + def hscan(self, name: _Key, cursor: int = 0, match: _Key | None = None, count: int | None = None) -> Any: ... # type: ignore[override] @overload # type: ignore[override] - def zscan(self, name: _Key, cursor: int = ..., match: _Key | None = ..., count: int | None = ...) -> Any: ... + def zscan(self, name: _Key, cursor: int = 0, match: _Key | None = None, count: int | None = None) -> Any: ... @overload # type: ignore[override] def zscan( self, name: _Key, - cursor: int = ..., - match: _Key | None = ..., - count: int | None = ..., + cursor: int = 0, + match: _Key | None = None, + count: int | None = None, *, score_cast_func: Callable[[_StrType], Any], ) -> Any: ... @@ -567,11 +571,11 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def smismember(self, name, values, *args) -> Any: ... # type: ignore[override] def smove(self, src: _Key, dst: _Key, value: _Value) -> Any: ... # type: ignore[override] @overload # type: ignore[override] - def spop(self, name: _Key, count: None = ...) -> Any: ... + def spop(self, name: _Key, count: None = None) -> Any: ... @overload # type: ignore[override] def spop(self, name: _Key, count: int) -> Any: ... @overload # type: ignore[override] - def srandmember(self, name: _Key, number: None = ...) -> Any: ... + def srandmember(self, name: _Key, number: None = None) -> Any: ... @overload # type: ignore[override] def srandmember(self, name: _Key, number: int) -> Any: ... def srem(self, name: _Key, *values: _Value) -> Any: ... # type: ignore[override] @@ -584,12 +588,12 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): self, name, fields, - id: str = ..., - maxlen=..., - approximate: bool = ..., - nomkstream: bool = ..., - minid: Incomplete | None = ..., - limit: Incomplete | None = ..., + id: str = "*", + maxlen=None, + approximate: bool = True, + nomkstream: bool = False, + minid: Incomplete | None = None, + limit: Incomplete | None = None, ) -> Any: ... def xautoclaim( # type: ignore[override] self, @@ -597,35 +601,51 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): groupname, consumername, min_idle_time, - start_id: StreamIdT = ..., - count: Incomplete | None = ..., - justid: bool = ..., + start_id: StreamIdT = "0-0", + count: Incomplete | None = None, + justid: bool = False, ) -> Any: ... def xclaim( # type: ignore[override] - self, name, groupname, consumername, min_idle_time, message_ids, idle=..., time=..., retrycount=..., force=..., justid=... + self, + name, + groupname, + consumername, + min_idle_time, + message_ids, + idle=None, + time=None, + retrycount=None, + force=False, + justid=False, ) -> Any: ... def xdel(self, name, *ids) -> Any: ... # type: ignore[override] - def xgroup_create(self, name, groupname, id: str = ..., mkstream: bool = ..., entries_read: int | None = ...) -> Any: ... # type: ignore[override] + def xgroup_create(self, name, groupname, id: str = "$", mkstream: bool = False, entries_read: int | None = None) -> Any: ... # type: ignore[override] def xgroup_delconsumer(self, name, groupname, consumername) -> Any: ... # type: ignore[override] def xgroup_destroy(self, name, groupname) -> Any: ... # type: ignore[override] def xgroup_createconsumer(self, name, groupname, consumername) -> Any: ... # type: ignore[override] - def xgroup_setid(self, name, groupname, id, entries_read: int | None = ...) -> Any: ... # type: ignore[override] + def xgroup_setid(self, name, groupname, id, entries_read: int | None = None) -> Any: ... # type: ignore[override] def xinfo_consumers(self, name, groupname) -> Any: ... # type: ignore[override] def xinfo_groups(self, name) -> Any: ... # type: ignore[override] - def xinfo_stream(self, name, full: bool = ...) -> Any: ... # type: ignore[override] + def xinfo_stream(self, name, full: bool = False) -> Any: ... # type: ignore[override] def xlen(self, name: _Key) -> Any: ... # type: ignore[override] def xpending(self, name, groupname) -> Any: ... # type: ignore[override] def xpending_range( # type: ignore[override] - self, name: _Key, groupname, min, max, count: int, consumername: Incomplete | None = ..., idle: int | None = ... + self, name: _Key, groupname, min, max, count: int, consumername: Incomplete | None = None, idle: int | None = None ) -> Any: ... - def xrange(self, name, min: str = ..., max: str = ..., count: Incomplete | None = ...) -> Any: ... # type: ignore[override] - def xread(self, streams, count: Incomplete | None = ..., block: Incomplete | None = ...) -> Any: ... # type: ignore[override] + def xrange(self, name, min: str = "-", max: str = "+", count: Incomplete | None = None) -> Any: ... # type: ignore[override] + def xread(self, streams, count: Incomplete | None = None, block: Incomplete | None = None) -> Any: ... # type: ignore[override] def xreadgroup( # type: ignore[override] - self, groupname, consumername, streams, count: Incomplete | None = ..., block: Incomplete | None = ..., noack: bool = ... + self, + groupname, + consumername, + streams, + count: Incomplete | None = None, + block: Incomplete | None = None, + noack: bool = False, ) -> Any: ... - def xrevrange(self, name, max: str = ..., min: str = ..., count: Incomplete | None = ...) -> Any: ... # type: ignore[override] + def xrevrange(self, name, max: str = "+", min: str = "-", count: Incomplete | None = None) -> Any: ... # type: ignore[override] def xtrim( # type: ignore[override] - self, name, maxlen: int | None = ..., approximate: bool = ..., minid: Incomplete | None = ..., limit: int | None = ... + self, name, maxlen: int | None = None, approximate: bool = True, minid: Incomplete | None = None, limit: int | None = None ) -> Any: ... # endregion # region sorted set commands @@ -633,30 +653,30 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): self, name: _Key, mapping: Mapping[_Key, _Value], - nx: bool = ..., - xx: bool = ..., - ch: bool = ..., - incr: bool = ..., - gt: Incomplete | None = ..., - lt: Incomplete | None = ..., + nx: bool = False, + xx: bool = False, + ch: bool = False, + incr: bool = False, + gt: Incomplete | None = False, + lt: Incomplete | None = False, ) -> Any: ... def zcard(self, name: _Key) -> Any: ... # type: ignore[override] def zcount(self, name: _Key, min: _Value, max: _Value) -> Any: ... # type: ignore[override] - def zdiff(self, keys, withscores: bool = ...) -> Any: ... # type: ignore[override] + def zdiff(self, keys, withscores: bool = False) -> Any: ... # type: ignore[override] def zdiffstore(self, dest, keys) -> Any: ... # type: ignore[override] def zincrby(self, name: _Key, amount: float, value: _Value) -> Any: ... # type: ignore[override] - def zinter(self, keys, aggregate: Incomplete | None = ..., withscores: bool = ...) -> Any: ... # type: ignore[override] - def zinterstore(self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] | None = ...) -> Any: ... # type: ignore[override] + def zinter(self, keys, aggregate: Incomplete | None = None, withscores: bool = False) -> Any: ... # type: ignore[override] + def zinterstore(self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] | None = None) -> Any: ... # type: ignore[override] def zlexcount(self, name: _Key, min: _Value, max: _Value) -> Any: ... # type: ignore[override] - def zpopmax(self, name: _Key, count: int | None = ...) -> Any: ... # type: ignore[override] - def zpopmin(self, name: _Key, count: int | None = ...) -> Any: ... # type: ignore[override] - def zrandmember(self, key, count: Incomplete | None = ..., withscores: bool = ...) -> Any: ... # type: ignore[override] + def zpopmax(self, name: _Key, count: int | None = None) -> Any: ... # type: ignore[override] + def zpopmin(self, name: _Key, count: int | None = None) -> Any: ... # type: ignore[override] + def zrandmember(self, key, count: Incomplete | None = None, withscores: bool = False) -> Any: ... # type: ignore[override] @overload # type: ignore[override] - def bzpopmax(self, keys: _Key | Iterable[_Key], timeout: Literal[0] = ...) -> Any: ... + def bzpopmax(self, keys: _Key | Iterable[_Key], timeout: Literal[0] = 0) -> Any: ... @overload # type: ignore[override] def bzpopmax(self, keys: _Key | Iterable[_Key], timeout: float) -> Any: ... @overload # type: ignore[override] - def bzpopmin(self, keys: _Key | Iterable[_Key], timeout: Literal[0] = ...) -> Any: ... + def bzpopmin(self, keys: _Key | Iterable[_Key], timeout: Literal[0] = 0) -> Any: ... @overload # type: ignore[override] def bzpopmin(self, keys: _Key | Iterable[_Key], timeout: float) -> Any: ... @overload # type: ignore[override] @@ -668,10 +688,10 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): desc: bool, withscores: Literal[True], score_cast_func: Callable[[_StrType], Any], - byscore: bool = ..., - bylex: bool = ..., - offset: int | None = ..., - num: int | None = ..., + byscore: bool = False, + bylex: bool = False, + offset: int | None = None, + num: int | None = None, ) -> Any: ... @overload # type: ignore[override] def zrange( @@ -682,10 +702,10 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): desc: bool, withscores: Literal[True], score_cast_func: Callable[[_StrType], float] = ..., - byscore: bool = ..., - bylex: bool = ..., - offset: int | None = ..., - num: int | None = ..., + byscore: bool = False, + bylex: bool = False, + offset: int | None = None, + num: int | None = None, ) -> Any: ... @overload # type: ignore[override] def zrange( @@ -696,10 +716,10 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): *, withscores: Literal[True], score_cast_func: Callable[[_StrType], None], - byscore: bool = ..., - bylex: bool = ..., - offset: int | None = ..., - num: int | None = ..., + byscore: bool = False, + bylex: bool = False, + offset: int | None = None, + num: int | None = None, ) -> Any: ... @overload # type: ignore[override] def zrange( @@ -710,10 +730,10 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): *, withscores: Literal[True], score_cast_func: Callable[[_StrType], float] = ..., - byscore: bool = ..., - bylex: bool = ..., - offset: int | None = ..., - num: int | None = ..., + byscore: bool = False, + bylex: bool = False, + offset: int | None = None, + num: int | None = None, ) -> Any: ... @overload # type: ignore[override] def zrange( @@ -721,13 +741,13 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): name: _Key, start: int, end: int, - desc: bool = ..., - withscores: bool = ..., + desc: bool = False, + withscores: bool = False, score_cast_func: Callable[[_StrType], Any] = ..., - byscore: bool = ..., - bylex: bool = ..., - offset: int | None = ..., - num: int | None = ..., + byscore: bool = False, + bylex: bool = False, + offset: int | None = None, + num: int | None = None, ) -> Any: ... @overload # type: ignore[override] def zrevrange( @@ -737,7 +757,7 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def zrevrange(self, name: _Key, start: int, end: int, withscores: Literal[True]) -> Any: ... @overload # type: ignore[override] def zrevrange( - self, name: _Key, start: int, end: int, withscores: bool = ..., score_cast_func: Callable[[Any], Any] = ... + self, name: _Key, start: int, end: int, withscores: bool = False, score_cast_func: Callable[[Any], Any] = ... ) -> Any: ... def zrangestore( # type: ignore[override] self, @@ -745,29 +765,29 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): name, start, end, - byscore: bool = ..., - bylex: bool = ..., - desc: bool = ..., - offset: Incomplete | None = ..., - num: Incomplete | None = ..., - ) -> Any: ... - def zrangebylex(self, name: _Key, min: _Value, max: _Value, start: int | None = ..., num: int | None = ...) -> Any: ... # type: ignore[override] - def zrevrangebylex(self, name: _Key, max: _Value, min: _Value, start: int | None = ..., num: int | None = ...) -> Any: ... # type: ignore[override] + byscore: bool = False, + bylex: bool = False, + desc: bool = False, + offset: Incomplete | None = None, + num: Incomplete | None = None, + ) -> Any: ... + def zrangebylex(self, name: _Key, min: _Value, max: _Value, start: int | None = None, num: int | None = None) -> Any: ... # type: ignore[override] + def zrevrangebylex(self, name: _Key, max: _Value, min: _Value, start: int | None = None, num: int | None = None) -> Any: ... # type: ignore[override] @overload # type: ignore[override] def zrangebyscore( self, name: _Key, min: _Value, max: _Value, - start: int | None = ..., - num: int | None = ..., + start: int | None = None, + num: int | None = None, *, withscores: Literal[True], score_cast_func: Callable[[_StrType], None], ) -> Any: ... @overload # type: ignore[override] def zrangebyscore( - self, name: _Key, min: _Value, max: _Value, start: int | None = ..., num: int | None = ..., *, withscores: Literal[True] + self, name: _Key, min: _Value, max: _Value, start: int | None = None, num: int | None = None, *, withscores: Literal[True] ) -> Any: ... @overload # type: ignore[override] def zrangebyscore( @@ -775,9 +795,9 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): name: _Key, min: _Value, max: _Value, - start: int | None = ..., - num: int | None = ..., - withscores: bool = ..., + start: int | None = None, + num: int | None = None, + withscores: bool = False, score_cast_func: Callable[[_StrType], Any] = ..., ) -> Any: ... @overload # type: ignore[override] @@ -786,15 +806,15 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): name: _Key, max: _Value, min: _Value, - start: int | None = ..., - num: int | None = ..., + start: int | None = None, + num: int | None = None, *, withscores: Literal[True], score_cast_func: Callable[[_StrType], Any], ) -> Any: ... @overload # type: ignore[override] def zrevrangebyscore( - self, name: _Key, max: _Value, min: _Value, start: int | None = ..., num: int | None = ..., *, withscores: Literal[True] + self, name: _Key, max: _Value, min: _Value, start: int | None = None, num: int | None = None, *, withscores: Literal[True] ) -> Any: ... @overload # type: ignore[override] def zrevrangebyscore( @@ -802,9 +822,9 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): name: _Key, max: _Value, min: _Value, - start: int | None = ..., - num: int | None = ..., - withscores: bool = ..., + start: int | None = None, + num: int | None = None, + withscores: bool = False, score_cast_func: Callable[[_StrType], Any] = ..., ) -> Any: ... def zrank(self, name: _Key, value: _Value) -> Any: ... # type: ignore[override] @@ -814,69 +834,69 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def zremrangebyscore(self, name: _Key, min: _Value, max: _Value) -> Any: ... # type: ignore[override] def zrevrank(self, name: _Key, value: _Value) -> Any: ... # type: ignore[override] def zscore(self, name: _Key, value: _Value) -> Any: ... # type: ignore[override] - def zunion(self, keys, aggregate: Incomplete | None = ..., withscores: bool = ...) -> Any: ... # type: ignore[override] - def zunionstore(self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] | None = ...) -> Any: ... # type: ignore[override] + def zunion(self, keys, aggregate: Incomplete | None = None, withscores: bool = False) -> Any: ... # type: ignore[override] + def zunionstore(self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] | None = None) -> Any: ... # type: ignore[override] def zmscore(self, key, members) -> Any: ... # type: ignore[override] # endregion # region management commands def bgrewriteaof(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] - def bgsave(self, schedule: bool = ..., **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] + def bgsave(self, schedule: bool = True, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def role(self) -> Any: ... # type: ignore[override] def client_kill(self, address: str, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def client_kill_filter( # type: ignore[override] self, - _id: Incomplete | None = ..., - _type: Incomplete | None = ..., - addr: Incomplete | None = ..., - skipme: Incomplete | None = ..., - laddr: Incomplete | None = ..., - user: Incomplete | None = ..., + _id: Incomplete | None = None, + _type: Incomplete | None = None, + addr: Incomplete | None = None, + skipme: Incomplete | None = None, + laddr: Incomplete | None = None, + user: Incomplete | None = None, **kwargs: _CommandOptions, ) -> Any: ... def client_info(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] - def client_list(self, _type: str | None = ..., client_id: list[str] = ..., **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] + def client_list(self, _type: str | None = None, client_id: list[str] = [], **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def client_getname(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def client_getredir(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def client_reply(self, reply, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def client_id(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def client_tracking_on( # type: ignore[override] self, - clientid: Incomplete | None = ..., - prefix=..., - bcast: bool = ..., - optin: bool = ..., - optout: bool = ..., - noloop: bool = ..., + clientid: Incomplete | None = None, + prefix=[], + bcast: bool = False, + optin: bool = False, + optout: bool = False, + noloop: bool = False, ) -> Any: ... def client_tracking_off( # type: ignore[override] self, - clientid: Incomplete | None = ..., - prefix=..., - bcast: bool = ..., - optin: bool = ..., - optout: bool = ..., - noloop: bool = ..., + clientid: Incomplete | None = None, + prefix=[], + bcast: bool = False, + optin: bool = False, + optout: bool = False, + noloop: bool = False, ) -> Any: ... def client_tracking( # type: ignore[override] self, - on: bool = ..., - clientid: Incomplete | None = ..., - prefix=..., - bcast: bool = ..., - optin: bool = ..., - optout: bool = ..., - noloop: bool = ..., + on: bool = True, + clientid: Incomplete | None = None, + prefix=[], + bcast: bool = False, + optin: bool = False, + optout: bool = False, + noloop: bool = False, **kwargs: _CommandOptions, ) -> Any: ... def client_trackinginfo(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def client_setname(self, name: str, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] - def client_unblock(self, client_id, error: bool = ..., **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] - def client_pause(self, timeout, all: bool = ..., **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] + def client_unblock(self, client_id, error: bool = False, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] + def client_pause(self, timeout, all: bool = True, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def client_unpause(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def command(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def command_info(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def command_count(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] - def config_get(self, pattern: PatternT = ..., *args: PatternT, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] + def config_get(self, pattern: PatternT = "*", *args: PatternT, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def config_set(self, name: KeyT, value: EncodableT, *args: KeyT | EncodableT, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def config_resetstat(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def config_rewrite(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] @@ -884,13 +904,13 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def debug_object(self, key, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def debug_segfault(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def echo(self, value: _Value, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] - def flushall(self, asynchronous: bool = ..., **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] - def flushdb(self, asynchronous: bool = ..., **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] + def flushall(self, asynchronous: bool = False, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] + def flushdb(self, asynchronous: bool = False, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def sync(self) -> Any: ... # type: ignore[override] def psync(self, replicationid, offset) -> Any: ... # type: ignore[override] def swapdb(self, first, second, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def select(self, index, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] - def info(self, section: _Key | None = ..., *args: _Key, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] + def info(self, section: _Key | None = None, *args: _Key, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def lastsave(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def lolwut(self, *version_numbers: _Value, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def migrate( # type: ignore[override] @@ -900,9 +920,9 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): keys, destination_db, timeout, - copy: bool = ..., - replace: bool = ..., - auth: Incomplete | None = ..., + copy: bool = False, + replace: bool = False, + auth: Incomplete | None = None, **kwargs: _CommandOptions, ) -> Any: ... def object(self, infotype, key, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] @@ -910,7 +930,7 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def memory_help(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def memory_stats(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def memory_malloc_stats(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] - def memory_usage(self, key, samples: Incomplete | None = ..., **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] + def memory_usage(self, key, samples: Incomplete | None = None, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def memory_purge(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def ping(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def quit(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] @@ -918,15 +938,15 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def save(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def shutdown( # type: ignore[override] self, - save: bool = ..., - nosave: bool = ..., - now: bool = ..., - force: bool = ..., - abort: bool = ..., + save: bool = False, + nosave: bool = False, + now: bool = False, + force: bool = False, + abort: bool = False, **kwargs: _CommandOptions, ) -> Any: ... - def slaveof(self, host: Incomplete | None = ..., port: Incomplete | None = ..., **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] - def slowlog_get(self, num: Incomplete | None = ..., **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] + def slaveof(self, host: Incomplete | None = None, port: Incomplete | None = None, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] + def slowlog_get(self, num: Incomplete | None = None, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def slowlog_len(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def slowlog_reset(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def time(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] @@ -940,7 +960,7 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): # endregion # region pubsub commands def publish(self, channel: _Key, message: _Key, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] - def pubsub_channels(self, pattern: _Key = ..., **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] + def pubsub_channels(self, pattern: _Key = "*", **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def pubsub_numpat(self, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] def pubsub_numsub(self, *args: _Key, **kwargs: _CommandOptions) -> Any: ... # type: ignore[override] # endregion @@ -949,7 +969,7 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def evalsha(self, sha, numkeys, *keys_and_args) -> Any: ... # type: ignore[override] def script_exists(self, *args) -> Any: ... # type: ignore[override] def script_debug(self, *args) -> Any: ... # type: ignore[override] - def script_flush(self, sync_type: Incomplete | None = ...) -> Any: ... # type: ignore[override] + def script_flush(self, sync_type: Incomplete | None = None) -> Any: ... # type: ignore[override] def script_kill(self) -> Any: ... # type: ignore[override] def script_load(self, script) -> Any: ... # type: ignore[override] def register_script(self, script: str | _StrType) -> Any: ... # type: ignore[override] diff --git a/stubs/redis/redis/asyncio/cluster.pyi b/stubs/redis/redis/asyncio/cluster.pyi index 10c8e93d6b61..e61313fdd0f9 100644 --- a/stubs/redis/redis/asyncio/cluster.pyi +++ b/stubs/redis/redis/asyncio/cluster.pyi @@ -36,43 +36,43 @@ class RedisCluster(AbstractRedis, AbstractRedisCluster, Generic[_StrType]): # T result_callbacks: dict[str, Callable[[Incomplete, Incomplete], Incomplete]] def __init__( self, - host: str | None = ..., - port: str | int = ..., + host: str | None = None, + port: str | int = 6379, # Cluster related kwargs - startup_nodes: list[ClusterNode] | None = ..., - require_full_coverage: bool = ..., - read_from_replicas: bool = ..., - reinitialize_steps: int = ..., - cluster_error_retry_attempts: int = ..., - connection_error_retry_attempts: int = ..., - max_connections: int = ..., + startup_nodes: list[ClusterNode] | None = None, + require_full_coverage: bool = True, + read_from_replicas: bool = False, + reinitialize_steps: int = 5, + cluster_error_retry_attempts: int = 3, + connection_error_retry_attempts: int = 3, + max_connections: int = 2147483648, # Client related kwargs - db: str | int = ..., - path: str | None = ..., - credential_provider: CredentialProvider | None = ..., - username: str | None = ..., - password: str | None = ..., - client_name: str | None = ..., + db: str | int = 0, + path: str | None = None, + credential_provider: CredentialProvider | None = None, + username: str | None = None, + password: str | None = None, + client_name: str | None = None, # Encoding related kwargs - encoding: str = ..., - encoding_errors: str = ..., - decode_responses: bool = ..., + encoding: str = "utf-8", + encoding_errors: str = "strict", + decode_responses: bool = False, # Connection related kwargs - health_check_interval: float = ..., - socket_connect_timeout: float | None = ..., - socket_keepalive: bool = ..., - socket_keepalive_options: Mapping[int, int | bytes] | None = ..., - socket_timeout: float | None = ..., - retry: Retry | None = ..., - retry_on_error: list[Exception] | None = ..., + health_check_interval: float = 0, + socket_connect_timeout: float | None = None, + socket_keepalive: bool = False, + socket_keepalive_options: Mapping[int, int | bytes] | None = None, + socket_timeout: float | None = None, + retry: Retry | None = None, + retry_on_error: list[Exception] | None = None, # SSL related kwargs - ssl: bool = ..., - ssl_ca_certs: str | None = ..., - ssl_ca_data: str | None = ..., - ssl_cert_reqs: str = ..., - ssl_certfile: str | None = ..., - ssl_check_hostname: bool = ..., - ssl_keyfile: str | None = ..., + ssl: bool = False, + ssl_ca_certs: str | None = None, + ssl_ca_data: str | None = None, + ssl_cert_reqs: str = "required", + ssl_certfile: str | None = None, + ssl_check_hostname: bool = False, + ssl_keyfile: str | None = None, ) -> None: ... async def initialize(self) -> Self: ... async def close(self) -> None: ... @@ -89,14 +89,14 @@ class RedisCluster(AbstractRedis, AbstractRedisCluster, Generic[_StrType]): # T def get_random_node(self) -> ClusterNode: ... def get_default_node(self) -> ClusterNode: ... def set_default_node(self, node: ClusterNode) -> None: ... - def get_node(self, host: str | None = ..., port: int | None = ..., node_name: str | None = ...) -> ClusterNode | None: ... - def get_node_from_key(self, key: str, replica: bool = ...) -> ClusterNode | None: ... + def get_node(self, host: str | None = None, port: int | None = None, node_name: str | None = None) -> ClusterNode | None: ... + def get_node_from_key(self, key: str, replica: bool = False) -> ClusterNode | None: ... def keyslot(self, key: EncodableT) -> int: ... def get_encoder(self) -> Encoder: ... def get_connection_kwargs(self) -> dict[str, Any | None]: ... def set_response_callback(self, command: str, callback: ResponseCallbackT) -> None: ... async def execute_command(self, *args: EncodableT, **kwargs: Any) -> Any: ... - def pipeline(self, transaction: Any | None = ..., shard_hint: Any | None = ...) -> ClusterPipeline[_StrType]: ... + def pipeline(self, transaction: Any | None = None, shard_hint: Any | None = None) -> ClusterPipeline[_StrType]: ... @classmethod def from_url(cls, url: str, **kwargs) -> Self: ... @@ -113,9 +113,9 @@ class ClusterNode: self, host: str, port: str | int, - server_type: str | None = ..., + server_type: str | None = None, *, - max_connections: int = ..., + max_connections: int = 2147483648, connection_class: type[Connection] = ..., **connection_kwargs: Any, ) -> None: ... @@ -138,12 +138,12 @@ class NodesManager: def __init__( self, startup_nodes: list[ClusterNode], require_full_coverage: bool, connection_kwargs: dict[str, Any] ) -> None: ... - def get_node(self, host: str | None = ..., port: int | None = ..., node_name: str | None = ...) -> ClusterNode | None: ... - def set_nodes(self, old: dict[str, ClusterNode], new: dict[str, ClusterNode], remove_old: bool = ...) -> None: ... - def get_node_from_slot(self, slot: int, read_from_replicas: bool = ...) -> ClusterNode: ... + def get_node(self, host: str | None = None, port: int | None = None, node_name: str | None = None) -> ClusterNode | None: ... + def set_nodes(self, old: dict[str, ClusterNode], new: dict[str, ClusterNode], remove_old: bool = False) -> None: ... + def get_node_from_slot(self, slot: int, read_from_replicas: bool = False) -> ClusterNode: ... def get_nodes_by_server_type(self, server_type: str) -> list[ClusterNode]: ... async def initialize(self) -> None: ... - async def close(self, attr: str = ...) -> None: ... + async def close(self, attr: str = "nodes_cache") -> None: ... class ClusterPipeline(AbstractRedis, AbstractRedisCluster, Generic[_StrType]): # TODO: AsyncRedisClusterCommands def __init__(self, client: RedisCluster[_StrType]) -> None: ... @@ -160,7 +160,7 @@ class ClusterPipeline(AbstractRedis, AbstractRedisCluster, Generic[_StrType]): def __bool__(self) -> bool: ... def __len__(self) -> int: ... def execute_command(self, *args: KeyT | EncodableT, **kwargs: Any) -> Self: ... - async def execute(self, raise_on_error: bool = ..., allow_redirections: bool = ...) -> list[Any]: ... + async def execute(self, raise_on_error: bool = True, allow_redirections: bool = True) -> list[Any]: ... def mset_nonatomic(self, mapping: Mapping[AnyKeyT, EncodableT]) -> Self: ... class PipelineCommand: diff --git a/stubs/redis/redis/asyncio/connection.pyi b/stubs/redis/redis/asyncio/connection.pyi index 435c5854f0e1..ae7e0fd6aa6f 100644 --- a/stubs/redis/redis/asyncio/connection.pyi +++ b/stubs/redis/redis/asyncio/connection.pyi @@ -35,7 +35,7 @@ class Encoder: decode_responses: Any def __init__(self, encoding: str, encoding_errors: str, decode_responses: bool) -> None: ... def encode(self, value: EncodableT) -> EncodedT: ... - def decode(self, value: EncodableT, force: bool = ...) -> EncodableT: ... + def decode(self, value: EncodableT, force: bool = False) -> EncodableT: ... ExceptionMappingT: TypeAlias = Mapping[str, type[Exception] | Mapping[str, type[Exception]]] @@ -46,21 +46,21 @@ class BaseParser: def parse_error(self, response: str) -> ResponseError: ... def on_disconnect(self) -> None: ... def on_connect(self, connection: Connection): ... - async def read_response(self, disable_decoding: bool = ...) -> EncodableT | ResponseError | list[EncodableT] | None: ... + async def read_response(self, disable_decoding: bool = False) -> EncodableT | ResponseError | list[EncodableT] | None: ... class PythonParser(BaseParser): encoder: Any def __init__(self, socket_read_size: int) -> None: ... def on_connect(self, connection: Connection): ... def on_disconnect(self) -> None: ... - async def read_response(self, disable_decoding: bool = ...) -> EncodableT | ResponseError | None: ... + async def read_response(self, disable_decoding: bool = False) -> EncodableT | ResponseError | None: ... class HiredisParser(BaseParser): def __init__(self, socket_read_size: int) -> None: ... def on_connect(self, connection: Connection): ... def on_disconnect(self) -> None: ... async def read_from_socket(self) -> Literal[True]: ... - async def read_response(self, disable_decoding: bool = ...) -> EncodableT | list[EncodableT]: ... + async def read_response(self, disable_decoding: bool = False) -> EncodableT | list[EncodableT]: ... DefaultParser: type[PythonParser | HiredisParser] @@ -96,29 +96,29 @@ class Connection: def __init__( self, *, - host: str = ..., - port: str | int = ..., - db: str | int = ..., - password: str | None = ..., - socket_timeout: float | None = ..., - socket_connect_timeout: float | None = ..., - socket_keepalive: bool = ..., - socket_keepalive_options: Mapping[int, int | bytes] | None = ..., - socket_type: int = ..., - retry_on_timeout: bool = ..., + host: str = "localhost", + port: str | int = 6379, + db: str | int = 0, + password: str | None = None, + socket_timeout: float | None = None, + socket_connect_timeout: float | None = None, + socket_keepalive: bool = False, + socket_keepalive_options: Mapping[int, int | bytes] | None = None, + socket_type: int = 0, + retry_on_timeout: bool = False, retry_on_error: list[type[RedisError]] | _Sentinel = ..., - encoding: str = ..., - encoding_errors: str = ..., - decode_responses: bool = ..., + encoding: str = "utf-8", + encoding_errors: str = "strict", + decode_responses: bool = False, parser_class: type[BaseParser] = ..., - socket_read_size: int = ..., - health_check_interval: float = ..., - client_name: str | None = ..., - username: str | None = ..., - retry: Retry | None = ..., - redis_connect_func: ConnectCallbackT | None = ..., + socket_read_size: int = 65536, + health_check_interval: float = 0, + client_name: str | None = None, + username: str | None = None, + retry: Retry | None = None, + redis_connect_func: ConnectCallbackT | None = None, encoder_class: type[Encoder] = ..., - credential_provider: CredentialProvider | None = ..., + credential_provider: CredentialProvider | None = None, ) -> None: ... def repr_pieces(self): ... def __del__(self) -> None: ... @@ -129,9 +129,9 @@ class Connection: def set_parser(self, parser_class) -> None: ... async def connect(self) -> None: ... async def on_connect(self) -> None: ... - async def disconnect(self, nowait: bool = ...) -> None: ... + async def disconnect(self, nowait: bool = False) -> None: ... async def check_health(self) -> None: ... - async def send_packed_command(self, command: bytes | str | Iterable[bytes], check_health: bool = ...): ... + async def send_packed_command(self, command: bytes | str | Iterable[bytes], check_health: bool = True): ... async def send_command(self, *args, **kwargs) -> None: ... @overload async def read_response(self, *, timeout: float) -> Incomplete | None: ... @@ -146,12 +146,12 @@ class SSLConnection(Connection): ssl_context: Any def __init__( self, - ssl_keyfile: str | None = ..., - ssl_certfile: str | None = ..., - ssl_cert_reqs: str = ..., - ssl_ca_certs: str | None = ..., - ssl_ca_data: str | None = ..., - ssl_check_hostname: bool = ..., + ssl_keyfile: str | None = None, + ssl_certfile: str | None = None, + ssl_cert_reqs: str = "required", + ssl_ca_certs: str | None = None, + ssl_ca_data: str | None = None, + ssl_check_hostname: bool = False, **kwargs, ) -> None: ... @property @@ -177,12 +177,12 @@ class RedisSSLContext: context: Any def __init__( self, - keyfile: str | None = ..., - certfile: str | None = ..., - cert_reqs: str | None = ..., - ca_certs: str | None = ..., - ca_data: str | None = ..., - check_hostname: bool = ..., + keyfile: str | None = None, + certfile: str | None = None, + cert_reqs: str | None = None, + ca_certs: str | None = None, + ca_data: str | None = None, + check_hostname: bool = False, ) -> None: ... def get(self) -> ssl.SSLContext: ... @@ -205,24 +205,24 @@ class UnixDomainSocketConnection(Connection): def __init__( self, *, - path: str = ..., - db: str | int = ..., - username: str | None = ..., - password: str | None = ..., - socket_timeout: float | None = ..., - socket_connect_timeout: float | None = ..., - encoding: str = ..., - encoding_errors: str = ..., - decode_responses: bool = ..., - retry_on_timeout: bool = ..., + path: str = "", + db: str | int = 0, + username: str | None = None, + password: str | None = None, + socket_timeout: float | None = None, + socket_connect_timeout: float | None = None, + encoding: str = "utf-8", + encoding_errors: str = "strict", + decode_responses: bool = False, + retry_on_timeout: bool = False, retry_on_error: list[type[RedisError]] | _Sentinel = ..., parser_class: type[BaseParser] = ..., - socket_read_size: int = ..., - health_check_interval: float = ..., - client_name: str | None = ..., - retry: Retry | None = ..., - redis_connect_func: ConnectCallbackT | None = ..., - credential_provider: CredentialProvider | None = ..., + socket_read_size: int = 65536, + health_check_interval: float = 0.0, + client_name: str | None = None, + retry: Retry | None = None, + redis_connect_func: ConnectCallbackT | None = None, + credential_provider: CredentialProvider | None = None, ) -> None: ... def repr_pieces(self) -> Iterable[tuple[str, str | int]]: ... @@ -251,7 +251,7 @@ class ConnectionPool: max_connections: Any encoder_class: Any def __init__( - self, connection_class: type[Connection] = ..., max_connections: int | None = ..., **connection_kwargs + self, connection_class: type[Connection] = ..., max_connections: int | None = None, **connection_kwargs ) -> None: ... pid: Any def reset(self) -> None: ... @@ -260,15 +260,15 @@ class ConnectionPool: def make_connection(self): ... async def release(self, connection: Connection): ... def owns_connection(self, connection: Connection): ... - async def disconnect(self, inuse_connections: bool = ...): ... + async def disconnect(self, inuse_connections: bool = True): ... class BlockingConnectionPool(ConnectionPool): queue_class: Any timeout: Any def __init__( self, - max_connections: int = ..., - timeout: int | None = ..., + max_connections: int = 50, + timeout: int | None = 20, connection_class: type[Connection] = ..., queue_class: type[asyncio.Queue[Any]] = ..., **connection_kwargs, @@ -279,4 +279,4 @@ class BlockingConnectionPool(ConnectionPool): def make_connection(self): ... async def get_connection(self, command_name, *keys, **options): ... async def release(self, connection: Connection): ... - async def disconnect(self, inuse_connections: bool = ...): ... + async def disconnect(self, inuse_connections: bool = True): ... diff --git a/stubs/redis/redis/asyncio/lock.pyi b/stubs/redis/redis/asyncio/lock.pyi index aa90042b44ae..1088d0f8f073 100644 --- a/stubs/redis/redis/asyncio/lock.pyi +++ b/stubs/redis/redis/asyncio/lock.pyi @@ -26,11 +26,11 @@ class Lock: self, redis: Redis[Any], name: str | bytes | memoryview, - timeout: float | None = ..., - sleep: float = ..., - blocking: bool = ..., - blocking_timeout: float | None = ..., - thread_local: bool = ..., + timeout: float | None = None, + sleep: float = 0.1, + blocking: bool = True, + blocking_timeout: float | None = None, + thread_local: bool = True, ) -> None: ... def register_scripts(self) -> None: ... async def __aenter__(self) -> Self: ... @@ -38,14 +38,14 @@ class Lock: self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None ) -> None: ... async def acquire( - self, blocking: bool | None = ..., blocking_timeout: float | None = ..., token: str | bytes | None = ... + self, blocking: bool | None = None, blocking_timeout: float | None = None, token: str | bytes | None = None ) -> bool: ... async def do_acquire(self, token: str | bytes) -> bool: ... async def locked(self) -> bool: ... async def owned(self) -> bool: ... def release(self) -> Awaitable[None]: ... async def do_release(self, expected_token: bytes) -> None: ... - def extend(self, additional_time: float, replace_ttl: bool = ...) -> Awaitable[bool]: ... + def extend(self, additional_time: float, replace_ttl: bool = False) -> Awaitable[bool]: ... async def do_extend(self, additional_time: float, replace_ttl: bool) -> bool: ... def reacquire(self) -> Awaitable[bool]: ... async def do_reacquire(self) -> bool: ... diff --git a/stubs/redis/redis/asyncio/parser.pyi b/stubs/redis/redis/asyncio/parser.pyi index 6053518e6f0d..3a6d1ce6422c 100644 --- a/stubs/redis/redis/asyncio/parser.pyi +++ b/stubs/redis/redis/asyncio/parser.pyi @@ -5,5 +5,5 @@ from typing import Any # from redis.asyncio.cluster import ClusterNode class CommandsParser: - async def initialize(self, node: Incomplete | None = ...) -> None: ... # TODO: ClusterNode + async def initialize(self, node: Incomplete | None = None) -> None: ... # TODO: ClusterNode async def get_keys(self, *args: Any) -> tuple[str, ...] | None: ... diff --git a/stubs/redis/redis/asyncio/sentinel.pyi b/stubs/redis/redis/asyncio/sentinel.pyi index e452986c81b9..edb68a4aaeaa 100644 --- a/stubs/redis/redis/asyncio/sentinel.pyi +++ b/stubs/redis/redis/asyncio/sentinel.pyi @@ -44,7 +44,7 @@ class Sentinel(AsyncSentinelCommands): min_other_sentinels: Any connection_kwargs: Any def __init__( - self, sentinels, min_other_sentinels: int = ..., sentinel_kwargs: Incomplete | None = ..., **connection_kwargs + self, sentinels, min_other_sentinels: int = 0, sentinel_kwargs: Incomplete | None = None, **connection_kwargs ) -> None: ... async def execute_command(self, *args, **kwargs): ... def check_master_state(self, state: dict[Any, Any], service_name: str) -> bool: ... diff --git a/stubs/redis/redis/backoff.pyi b/stubs/redis/redis/backoff.pyi index 03b559e5b5af..6e05455fe09e 100644 --- a/stubs/redis/redis/backoff.pyi +++ b/stubs/redis/redis/backoff.pyi @@ -13,17 +13,17 @@ class NoBackoff(ConstantBackoff): def __init__(self) -> None: ... class ExponentialBackoff(AbstractBackoff): - def __init__(self, cap: float = ..., base: float = ...) -> None: ... + def __init__(self, cap: float = 0.512, base: float = 0.008) -> None: ... def compute(self, failures: int) -> float: ... class FullJitterBackoff(AbstractBackoff): - def __init__(self, cap: float = ..., base: float = ...) -> None: ... + def __init__(self, cap: float = 0.512, base: float = 0.008) -> None: ... def compute(self, failures: int) -> float: ... class EqualJitterBackoff(AbstractBackoff): - def __init__(self, cap: float = ..., base: float = ...) -> None: ... + def __init__(self, cap: float = 0.512, base: float = 0.008) -> None: ... def compute(self, failures: int) -> float: ... class DecorrelatedJitterBackoff(AbstractBackoff): - def __init__(self, cap: float = ..., base: float = ...) -> None: ... + def __init__(self, cap: float = 0.512, base: float = 0.008) -> None: ... def compute(self, failures: int) -> float: ... diff --git a/stubs/redis/redis/client.pyi b/stubs/redis/redis/client.pyi index 1d82f231a311..f21b1106c987 100644 --- a/stubs/redis/redis/client.pyi +++ b/stubs/redis/redis/client.pyi @@ -38,7 +38,7 @@ class CaseInsensitiveDict(dict[_StrType, _VT]): def __init__(self, data: SupportsItems[_StrType, _VT]) -> None: ... def update(self, data: SupportsItems[_StrType, _VT]) -> None: ... # type: ignore[override] @overload - def get(self, k: _StrType, default: None = ...) -> _VT | None: ... + def get(self, k: _StrType, default: None = None) -> _VT | None: ... @overload def get(self, k: _StrType, default: _VT | _T) -> _VT | _T: ... # Overrides many other methods too, but without changing signature @@ -57,7 +57,7 @@ def parse_sentinel_master(response): ... def parse_sentinel_masters(response): ... def parse_sentinel_slaves_and_sentinels(response): ... def parse_sentinel_get_master(response): ... -def pairs_to_dict(response, decode_keys: bool = ..., decode_string_values: bool = ...): ... +def pairs_to_dict(response, decode_keys: bool = False, decode_string_values: bool = False): ... def pairs_to_dict_typed(response, type_info): ... def zset_score_pairs(response, **options): ... def sort_return_tuples(response, **options): ... @@ -131,7 +131,7 @@ class Redis(AbstractRedis, RedisModuleCommands, CoreCommands[_StrType], Sentinel encoding_errors: str = ..., charset: str | None = ..., errors: str | None = ..., - decode_responses: Literal[False] = ..., + decode_responses: Literal[False] = False, retry_on_timeout: bool = ..., ssl: bool = ..., ssl_keyfile: str | None = ..., @@ -165,126 +165,126 @@ class Redis(AbstractRedis, RedisModuleCommands, CoreCommands[_StrType], Sentinel charset: str | None, errors: str | None, decode_responses: Literal[True], - retry_on_timeout: bool = ..., - retry_on_error: list[type[RedisError]] | None = ..., - ssl: bool = ..., - ssl_keyfile: str | None = ..., - ssl_certfile: str | None = ..., - ssl_cert_reqs: str | int | None = ..., - ssl_ca_certs: str | None = ..., - ssl_ca_path: Incomplete | None = ..., - ssl_ca_data: Incomplete | None = ..., - ssl_check_hostname: bool = ..., - ssl_password: Incomplete | None = ..., - ssl_validate_ocsp: bool = ..., - ssl_validate_ocsp_stapled: bool = ..., # added in 4.1.1 - ssl_ocsp_context: Incomplete | None = ..., # added in 4.1.1 - ssl_ocsp_expected_cert: Incomplete | None = ..., # added in 4.1.1 - max_connections: int | None = ..., - single_connection_client: bool = ..., - health_check_interval: float = ..., - client_name: str | None = ..., - username: str | None = ..., - retry: Retry | None = ..., - redis_connect_func: _ConnectFunc | None = ..., - credential_provider: CredentialProvider | None = ..., + retry_on_timeout: bool = False, + retry_on_error: list[type[RedisError]] | None = None, + ssl: bool = False, + ssl_keyfile: str | None = None, + ssl_certfile: str | None = None, + ssl_cert_reqs: str | int | None = "required", + ssl_ca_certs: str | None = None, + ssl_ca_path: Incomplete | None = None, + ssl_ca_data: Incomplete | None = None, + ssl_check_hostname: bool = False, + ssl_password: Incomplete | None = None, + ssl_validate_ocsp: bool = False, + ssl_validate_ocsp_stapled: bool = False, # added in 4.1.1 + ssl_ocsp_context: Incomplete | None = None, # added in 4.1.1 + ssl_ocsp_expected_cert: Incomplete | None = None, # added in 4.1.1 + max_connections: int | None = None, + single_connection_client: bool = False, + health_check_interval: float = 0, + client_name: str | None = None, + username: str | None = None, + retry: Retry | None = None, + redis_connect_func: _ConnectFunc | None = None, + credential_provider: CredentialProvider | None = None, ) -> None: ... @overload def __init__( self: Redis[str], - host: str = ..., - port: int = ..., - db: int = ..., - password: str | None = ..., - socket_timeout: float | None = ..., - socket_connect_timeout: float | None = ..., - socket_keepalive: bool | None = ..., - socket_keepalive_options: Mapping[str, int | str] | None = ..., - connection_pool: ConnectionPool | None = ..., - unix_socket_path: str | None = ..., - encoding: str = ..., - encoding_errors: str = ..., - charset: str | None = ..., - errors: str | None = ..., + host: str = "localhost", + port: int = 6379, + db: int = 0, + password: str | None = None, + socket_timeout: float | None = None, + socket_connect_timeout: float | None = None, + socket_keepalive: bool | None = None, + socket_keepalive_options: Mapping[str, int | str] | None = None, + connection_pool: ConnectionPool | None = None, + unix_socket_path: str | None = None, + encoding: str = "utf-8", + encoding_errors: str = "strict", + charset: str | None = None, + errors: str | None = None, *, decode_responses: Literal[True], - retry_on_timeout: bool = ..., - ssl: bool = ..., - ssl_keyfile: str | None = ..., - ssl_certfile: str | None = ..., - ssl_cert_reqs: str | int | None = ..., - ssl_ca_certs: str | None = ..., - ssl_ca_data: Incomplete | None = ..., - ssl_check_hostname: bool = ..., - ssl_password: Incomplete | None = ..., - ssl_validate_ocsp: bool = ..., - ssl_validate_ocsp_stapled: bool = ..., # added in 4.1.1 - ssl_ocsp_context: Incomplete | None = ..., # added in 4.1.1 - ssl_ocsp_expected_cert: Incomplete | None = ..., # added in 4.1.1 - max_connections: int | None = ..., - single_connection_client: bool = ..., - health_check_interval: float = ..., - client_name: str | None = ..., - username: str | None = ..., - retry: Retry | None = ..., - redis_connect_func: _ConnectFunc | None = ..., - credential_provider: CredentialProvider | None = ..., + retry_on_timeout: bool = False, + ssl: bool = False, + ssl_keyfile: str | None = None, + ssl_certfile: str | None = None, + ssl_cert_reqs: str | int | None = "required", + ssl_ca_certs: str | None = None, + ssl_ca_data: Incomplete | None = None, + ssl_check_hostname: bool = False, + ssl_password: Incomplete | None = None, + ssl_validate_ocsp: bool = False, + ssl_validate_ocsp_stapled: bool = False, # added in 4.1.1 + ssl_ocsp_context: Incomplete | None = None, # added in 4.1.1 + ssl_ocsp_expected_cert: Incomplete | None = None, # added in 4.1.1 + max_connections: int | None = None, + single_connection_client: bool = False, + health_check_interval: float = 0, + client_name: str | None = None, + username: str | None = None, + retry: Retry | None = None, + redis_connect_func: _ConnectFunc | None = None, + credential_provider: CredentialProvider | None = None, ) -> None: ... @overload def __init__( self: Redis[bytes], - host: str = ..., - port: int = ..., - db: int = ..., - password: str | None = ..., - socket_timeout: float | None = ..., - socket_connect_timeout: float | None = ..., - socket_keepalive: bool | None = ..., - socket_keepalive_options: Mapping[str, int | str] | None = ..., - connection_pool: ConnectionPool | None = ..., - unix_socket_path: str | None = ..., - encoding: str = ..., - encoding_errors: str = ..., - charset: str | None = ..., - errors: str | None = ..., - decode_responses: Literal[False] = ..., - retry_on_timeout: bool = ..., - ssl: bool = ..., - ssl_keyfile: str | None = ..., - ssl_certfile: str | None = ..., - ssl_cert_reqs: str | int | None = ..., - ssl_ca_certs: str | None = ..., - ssl_ca_data: Incomplete | None = ..., - ssl_check_hostname: bool = ..., - ssl_password: Incomplete | None = ..., - ssl_validate_ocsp: bool = ..., - ssl_validate_ocsp_stapled: bool = ..., # added in 4.1.1 - ssl_ocsp_context: Incomplete | None = ..., # added in 4.1.1 - ssl_ocsp_expected_cert: Incomplete | None = ..., # added in 4.1.1 - max_connections: int | None = ..., - single_connection_client: bool = ..., - health_check_interval: float = ..., - client_name: str | None = ..., - username: str | None = ..., - retry: Retry | None = ..., - redis_connect_func: _ConnectFunc | None = ..., - credential_provider: CredentialProvider | None = ..., + host: str = "localhost", + port: int = 6379, + db: int = 0, + password: str | None = None, + socket_timeout: float | None = None, + socket_connect_timeout: float | None = None, + socket_keepalive: bool | None = None, + socket_keepalive_options: Mapping[str, int | str] | None = None, + connection_pool: ConnectionPool | None = None, + unix_socket_path: str | None = None, + encoding: str = "utf-8", + encoding_errors: str = "strict", + charset: str | None = None, + errors: str | None = None, + decode_responses: Literal[False] = False, + retry_on_timeout: bool = False, + ssl: bool = False, + ssl_keyfile: str | None = None, + ssl_certfile: str | None = None, + ssl_cert_reqs: str | int | None = "required", + ssl_ca_certs: str | None = None, + ssl_ca_data: Incomplete | None = None, + ssl_check_hostname: bool = False, + ssl_password: Incomplete | None = None, + ssl_validate_ocsp: bool = False, + ssl_validate_ocsp_stapled: bool = False, # added in 4.1.1 + ssl_ocsp_context: Incomplete | None = None, # added in 4.1.1 + ssl_ocsp_expected_cert: Incomplete | None = None, # added in 4.1.1 + max_connections: int | None = None, + single_connection_client: bool = False, + health_check_interval: float = 0, + client_name: str | None = None, + username: str | None = None, + retry: Retry | None = None, + redis_connect_func: _ConnectFunc | None = None, + credential_provider: CredentialProvider | None = None, ) -> None: ... def get_encoder(self): ... def get_connection_kwargs(self): ... def set_response_callback(self, command, callback): ... - def pipeline(self, transaction: bool = ..., shard_hint: Any = ...) -> Pipeline[_StrType]: ... + def pipeline(self, transaction: bool = True, shard_hint: Any = None) -> Pipeline[_StrType]: ... def transaction(self, func, *watches, **kwargs): ... @overload def lock( self, name: _Key, - timeout: float | None = ..., - sleep: float = ..., - blocking: bool = ..., - blocking_timeout: float | None = ..., - lock_class: None = ..., - thread_local: bool = ..., + timeout: float | None = None, + sleep: float = 0.1, + blocking: bool = True, + blocking_timeout: float | None = None, + lock_class: None = None, + thread_local: bool = True, ) -> Lock: ... @overload def lock( @@ -295,19 +295,19 @@ class Redis(AbstractRedis, RedisModuleCommands, CoreCommands[_StrType], Sentinel blocking: bool, blocking_timeout: float | None, lock_class: type[_LockType], - thread_local: bool = ..., + thread_local: bool = True, ) -> _LockType: ... @overload def lock( self, name: _Key, - timeout: float | None = ..., - sleep: float = ..., - blocking: bool = ..., - blocking_timeout: float | None = ..., + timeout: float | None = None, + sleep: float = 0.1, + blocking: bool = True, + blocking_timeout: float | None = None, *, lock_class: type[_LockType], - thread_local: bool = ..., + thread_local: bool = True, ) -> _LockType: ... def pubsub(self, *, shard_hint: Any = ..., ignore_subscribe_messages: bool = ...) -> PubSub: ... def execute_command(self, *args, **options: _CommandOptions): ... @@ -338,9 +338,9 @@ class PubSub: def __init__( self, connection_pool, - shard_hint: Incomplete | None = ..., - ignore_subscribe_messages: bool = ..., - encoder: Incomplete | None = ..., + shard_hint: Incomplete | None = None, + ignore_subscribe_messages: bool = False, + encoder: Incomplete | None = None, ) -> None: ... def __enter__(self) -> Self: ... def __exit__( @@ -356,7 +356,7 @@ class PubSub: def subscribed(self): ... def execute_command(self, *args): ... def clean_health_check_responses(self) -> None: ... - def parse_response(self, block: bool = ..., timeout: float = ...): ... + def parse_response(self, block: bool = True, timeout: float = 0): ... def is_health_check_response(self, response) -> bool: ... def check_health(self) -> None: ... def psubscribe(self, *args: _Key, **kwargs: Callable[[Any], None]): ... @@ -364,17 +364,17 @@ class PubSub: def subscribe(self, *args: _Key, **kwargs: Callable[[Any], None]) -> None: ... def unsubscribe(self, *args: _Key) -> None: ... def listen(self): ... - def get_message(self, ignore_subscribe_messages: bool = ..., timeout: float = ...) -> dict[str, Any] | None: ... - def handle_message(self, response, ignore_subscribe_messages: bool = ...) -> dict[str, Any] | None: ... - def run_in_thread(self, sleep_time: float = ..., daemon: bool = ..., exception_handler: Incomplete | None = ...): ... - def ping(self, message: _Value | None = ...) -> None: ... + def get_message(self, ignore_subscribe_messages: bool = False, timeout: float = 0.0) -> dict[str, Any] | None: ... + def handle_message(self, response, ignore_subscribe_messages: bool = False) -> dict[str, Any] | None: ... + def run_in_thread(self, sleep_time: float = 0, daemon: bool = False, exception_handler: Incomplete | None = None): ... + def ping(self, message: _Value | None = None) -> None: ... class PubSubWorkerThread(threading.Thread): daemon: Any pubsub: Any sleep_time: Any exception_handler: Any - def __init__(self, pubsub, sleep_time, daemon: bool = ..., exception_handler: Incomplete | None = ...) -> None: ... + def __init__(self, pubsub, sleep_time, daemon: bool = False, exception_handler: Incomplete | None = None) -> None: ... def run(self) -> None: ... def stop(self) -> None: ... @@ -408,30 +408,30 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def annotate_exception(self, exception, number, command): ... def parse_response(self, connection, command_name, **options): ... def load_scripts(self): ... - def execute(self, raise_on_error: bool = ...) -> list[Any]: ... + def execute(self, raise_on_error: bool = True) -> list[Any]: ... def watch(self, *names: _Key) -> bool: ... def unwatch(self) -> bool: ... # in the Redis implementation, the following methods are inherited from client. def set_response_callback(self, command, callback): ... - def pipeline(self, transaction: bool = ..., shard_hint: Any = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def acl_cat(self, category: str | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def pipeline(self, transaction: bool = True, shard_hint: Any = None) -> Pipeline[_StrType]: ... # type: ignore[override] + def acl_cat(self, category: str | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] def acl_deluser(self, username: str) -> Pipeline[_StrType]: ... # type: ignore[override] - def acl_genpass(self, bits: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def acl_genpass(self, bits: int | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] def acl_getuser(self, username: str) -> Pipeline[_StrType]: ... # type: ignore[override] def acl_list(self) -> Pipeline[_StrType]: ... # type: ignore[override] def acl_load(self) -> Pipeline[_StrType]: ... # type: ignore[override] def acl_setuser( # type: ignore[override] self, username: str, - enabled: bool = ..., - nopass: bool = ..., - passwords: Sequence[str] | None = ..., - hashed_passwords: Sequence[str] | None = ..., - categories: Sequence[str] | None = ..., - commands: Sequence[str] | None = ..., - keys: Sequence[str] | None = ..., - channels: Iterable[ChannelT] | None = ..., - selectors: Iterable[tuple[str, KeyT]] | None = ..., + enabled: bool = False, + nopass: bool = False, + passwords: Sequence[str] | None = None, + hashed_passwords: Sequence[str] | None = None, + categories: Sequence[str] | None = None, + commands: Sequence[str] | None = None, + keys: Sequence[str] | None = None, + channels: Iterable[ChannelT] | None = None, + selectors: Iterable[tuple[str, KeyT]] | None = None, reset: bool = False, reset_keys: bool = False, reset_channels: bool = False, @@ -441,24 +441,24 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def acl_users(self) -> Pipeline[_StrType]: ... # type: ignore[override] def acl_whoami(self) -> Pipeline[_StrType]: ... # type: ignore[override] def bgrewriteaof(self) -> Pipeline[_StrType]: ... # type: ignore[override] - def bgsave(self, schedule: bool = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def bgsave(self, schedule: bool = True) -> Pipeline[_StrType]: ... # type: ignore[override] def client_id(self) -> Pipeline[_StrType]: ... # type: ignore[override] def client_kill(self, address: str) -> Pipeline[_StrType]: ... # type: ignore[override] - def client_list(self, _type: str | None = ..., client_id: list[str] = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def client_list(self, _type: str | None = None, client_id: list[str] = []) -> Pipeline[_StrType]: ... # type: ignore[override] def client_getname(self) -> Pipeline[_StrType]: ... # type: ignore[override] def client_setname(self, name: str) -> Pipeline[_StrType]: ... # type: ignore[override] def readwrite(self) -> Pipeline[_StrType]: ... # type: ignore[override] def readonly(self) -> Pipeline[_StrType]: ... # type: ignore[override] - def config_get(self, pattern: PatternT = ..., *args: PatternT, **kwargs: _CommandOptions) -> Pipeline[_StrType]: ... # type: ignore[override] + def config_get(self, pattern: PatternT = "*", *args: PatternT, **kwargs: _CommandOptions) -> Pipeline[_StrType]: ... # type: ignore[override] def config_set(self, name: KeyT, value: EncodableT, *args: KeyT | EncodableT, **kwargs: _CommandOptions) -> Pipeline[_StrType]: ... # type: ignore[override] def config_resetstat(self) -> Pipeline[_StrType]: ... # type: ignore[override] def config_rewrite(self) -> Pipeline[_StrType]: ... # type: ignore[override] def dbsize(self) -> Pipeline[_StrType]: ... # type: ignore[override] def debug_object(self, key) -> Pipeline[_StrType]: ... # type: ignore[override] def echo(self, value) -> Pipeline[_StrType]: ... # type: ignore[override] - def flushall(self, asynchronous: bool = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def flushdb(self, asynchronous: bool = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def info(self, section: _Key | None = ..., *args: _Key, **kwargs: _CommandOptions) -> Pipeline[_StrType]: ... # type: ignore[override] + def flushall(self, asynchronous: bool = False) -> Pipeline[_StrType]: ... # type: ignore[override] + def flushdb(self, asynchronous: bool = False) -> Pipeline[_StrType]: ... # type: ignore[override] + def info(self, section: _Key | None = None, *args: _Key, **kwargs: _CommandOptions) -> Pipeline[_StrType]: ... # type: ignore[override] def lastsave(self) -> Pipeline[_StrType]: ... # type: ignore[override] def object(self, infotype, key) -> Pipeline[_StrType]: ... # type: ignore[override] def ping(self) -> Pipeline[_StrType]: ... # type: ignore[override] @@ -471,57 +471,57 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def sentinel_sentinels(self, service_name) -> Pipeline[_StrType]: ... # type: ignore[override] def sentinel_set(self, name, option, value) -> Pipeline[_StrType]: ... # type: ignore[override] def sentinel_slaves(self, service_name) -> Pipeline[_StrType]: ... # type: ignore[override] - def slaveof(self, host=..., port=...) -> Pipeline[_StrType]: ... # type: ignore[override] - def slowlog_get(self, num=...) -> Pipeline[_StrType]: ... # type: ignore[override] + def slaveof(self, host=None, port=None) -> Pipeline[_StrType]: ... # type: ignore[override] + def slowlog_get(self, num=None) -> Pipeline[_StrType]: ... # type: ignore[override] def slowlog_len(self) -> Pipeline[_StrType]: ... # type: ignore[override] def slowlog_reset(self) -> Pipeline[_StrType]: ... # type: ignore[override] def time(self) -> Pipeline[_StrType]: ... # type: ignore[override] def append(self, key, value) -> Pipeline[_StrType]: ... # type: ignore[override] - def bitcount(self, key: _Key, start: int | None = ..., end: int | None = ..., mode: str | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def bitcount(self, key: _Key, start: int | None = None, end: int | None = None, mode: str | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] def bitop(self, operation, dest, *keys) -> Pipeline[_StrType]: ... # type: ignore[override] - def bitpos(self, key, bit, start=..., end=..., mode: str | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def decr(self, name, amount=...) -> Pipeline[_StrType]: ... # type: ignore[override] + def bitpos(self, key, bit, start=None, end=None, mode: str | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] + def decr(self, name, amount=1) -> Pipeline[_StrType]: ... # type: ignore[override] def delete(self, *names: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] def __delitem__(self, _Key) -> None: ... def dump(self, name) -> Pipeline[_StrType]: ... # type: ignore[override] def exists(self, *names: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] def __contains__(self, *names: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] - def expire(self, name: _Key, time: int | timedelta, nx: bool = ..., xx: bool = ..., gt: bool = ..., lt: bool = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def expireat(self, name, when, nx: bool = ..., xx: bool = ..., gt: bool = ..., lt: bool = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def expire(self, name: _Key, time: int | timedelta, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False) -> Pipeline[_StrType]: ... # type: ignore[override] + def expireat(self, name, when, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False) -> Pipeline[_StrType]: ... # type: ignore[override] def get(self, name: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] def __getitem__(self, name) -> Pipeline[_StrType]: ... # type: ignore[override] def getbit(self, name: _Key, offset: int) -> Pipeline[_StrType]: ... # type: ignore[override] def getrange(self, key, start, end) -> Pipeline[_StrType]: ... # type: ignore[override] def getset(self, name, value) -> Pipeline[_StrType]: ... # type: ignore[override] - def incr(self, name, amount=...) -> Pipeline[_StrType]: ... # type: ignore[override] - def incrby(self, name, amount=...) -> Pipeline[_StrType]: ... # type: ignore[override] - def incrbyfloat(self, name, amount=...) -> Pipeline[_StrType]: ... # type: ignore[override] - def keys(self, pattern: _Key = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def incr(self, name, amount=1) -> Pipeline[_StrType]: ... # type: ignore[override] + def incrby(self, name, amount=1) -> Pipeline[_StrType]: ... # type: ignore[override] + def incrbyfloat(self, name, amount=1.0) -> Pipeline[_StrType]: ... # type: ignore[override] + def keys(self, pattern: _Key = "*") -> Pipeline[_StrType]: ... # type: ignore[override] def mget(self, keys: _Key | Iterable[_Key], *args: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] def mset(self, mapping: Mapping[_Key, _Value]) -> Pipeline[_StrType]: ... # type: ignore[override] def msetnx(self, mapping: Mapping[_Key, _Value]) -> Pipeline[_StrType]: ... # type: ignore[override] def move(self, name: _Key, db: int) -> Pipeline[_StrType]: ... # type: ignore[override] def persist(self, name: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] - def pexpire(self, name: _Key, time: int | timedelta, nx: bool = ..., xx: bool = ..., gt: bool = ..., lt: bool = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def pexpireat(self, name: _Key, when: int | datetime, nx: bool = ..., xx: bool = ..., gt: bool = ..., lt: bool = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def pexpire(self, name: _Key, time: int | timedelta, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False) -> Pipeline[_StrType]: ... # type: ignore[override] + def pexpireat(self, name: _Key, when: int | datetime, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False) -> Pipeline[_StrType]: ... # type: ignore[override] def psetex(self, name, time_ms, value) -> Pipeline[_StrType]: ... # type: ignore[override] def pttl(self, name) -> Pipeline[_StrType]: ... # type: ignore[override] def randomkey(self) -> Pipeline[_StrType]: ... # type: ignore[override] def rename(self, src, dst) -> Pipeline[_StrType]: ... # type: ignore[override] def renamenx(self, src, dst) -> Pipeline[_StrType]: ... # type: ignore[override] - def restore(self, name, ttl, value, replace: bool = ..., absttl: bool = ..., idletime: Incomplete | None = ..., frequency: Incomplete | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def restore(self, name, ttl, value, replace: bool = False, absttl: bool = False, idletime: Incomplete | None = None, frequency: Incomplete | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] def set( # type: ignore[override] self, name: _Key, value: _Value, - ex: None | int | timedelta = ..., - px: None | int | timedelta = ..., - nx: bool = ..., - xx: bool = ..., - keepttl: bool = ..., - get: bool = ..., - exat: Incomplete | None = ..., - pxat: Incomplete | None = ..., + ex: None | int | timedelta = None, + px: None | int | timedelta = None, + nx: bool = False, + xx: bool = False, + keepttl: bool = False, + get: bool = False, + exat: Incomplete | None = None, + pxat: Incomplete | None = None, ) -> Pipeline[_StrType]: ... def __setitem__(self, name, value) -> None: ... def setbit(self, name: _Key, offset: int, value: int) -> Pipeline[_StrType]: ... # type: ignore[override] @@ -529,7 +529,7 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def setnx(self, name, value) -> Pipeline[_StrType]: ... # type: ignore[override] def setrange(self, name, offset, value) -> Pipeline[_StrType]: ... # type: ignore[override] def strlen(self, name) -> Pipeline[_StrType]: ... # type: ignore[override] - def substr(self, name, start, end=...) -> Pipeline[_StrType]: ... # type: ignore[override] + def substr(self, name, start, end=-1) -> Pipeline[_StrType]: ... # type: ignore[override] def ttl(self, name: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] def type(self, name) -> Pipeline[_StrType]: ... # type: ignore[override] def unlink(self, *names: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] @@ -538,51 +538,55 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): first_list: _Key, second_list: _Key, timeout: float, - src: Literal["LEFT", "RIGHT"] = ..., - dest: Literal["LEFT", "RIGHT"] = ..., + src: Literal["LEFT", "RIGHT"] = "LEFT", + dest: Literal["LEFT", "RIGHT"] = "RIGHT", ) -> Pipeline[_StrType]: ... - def blpop(self, keys: _Value | Iterable[_Value], timeout: float = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def brpop(self, keys: _Value | Iterable[_Value], timeout: float = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def brpoplpush(self, src, dst, timeout=...) -> Pipeline[_StrType]: ... # type: ignore[override] + def blpop(self, keys: _Value | Iterable[_Value], timeout: float = 0) -> Pipeline[_StrType]: ... # type: ignore[override] + def brpop(self, keys: _Value | Iterable[_Value], timeout: float = 0) -> Pipeline[_StrType]: ... # type: ignore[override] + def brpoplpush(self, src, dst, timeout=0) -> Pipeline[_StrType]: ... # type: ignore[override] def lindex(self, name: _Key, index: int) -> Pipeline[_StrType]: ... # type: ignore[override] def linsert( # type: ignore[override] self, name: _Key, where: Literal["BEFORE", "AFTER", "before", "after"], refvalue: _Value, value: _Value ) -> Pipeline[_StrType]: ... def llen(self, name: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] def lmove( # type: ignore[override] - self, first_list: _Key, second_list: _Key, src: Literal["LEFT", "RIGHT"] = ..., dest: Literal["LEFT", "RIGHT"] = ... + self, + first_list: _Key, + second_list: _Key, + src: Literal["LEFT", "RIGHT"] = "LEFT", + dest: Literal["LEFT", "RIGHT"] = "RIGHT", ) -> Pipeline[_StrType]: ... - def lpop(self, name, count: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def lpop(self, name, count: int | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] def lpush(self, name: _Value, *values: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] def lpushx(self, name, value) -> Pipeline[_StrType]: ... # type: ignore[override] def lrange(self, name: _Key, start: int, end: int) -> Pipeline[_StrType]: ... # type: ignore[override] def lrem(self, name: _Key, count: int, value: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] def lset(self, name: _Key, index: int, value: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] def ltrim(self, name: _Key, start: int, end: int) -> Pipeline[_StrType]: ... # type: ignore[override] - def rpop(self, name, count: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def rpop(self, name, count: int | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] def rpoplpush(self, src, dst) -> Pipeline[_StrType]: ... # type: ignore[override] def rpush(self, name: _Value, *values: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] def rpushx(self, name, value) -> Pipeline[_StrType]: ... # type: ignore[override] def sort( # type: ignore[override] self, name: _Key, - start: int | None = ..., - num: int | None = ..., - by: _Key | None = ..., - get: _Key | Sequence[_Key] | None = ..., - desc: bool = ..., - alpha: bool = ..., - store: _Key | None = ..., - groups: bool = ..., + start: int | None = None, + num: int | None = None, + by: _Key | None = None, + get: _Key | Sequence[_Key] | None = None, + desc: bool = False, + alpha: bool = False, + store: _Key | None = None, + groups: bool = False, ) -> Pipeline[_StrType]: ... - def scan(self, cursor: int = ..., match: _Key | None = ..., count: int | None = ..., _type: str | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def scan_iter(self, match: _Key | None = ..., count: int | None = ..., _type: str | None = ...) -> Iterator[Any]: ... # type: ignore[override] - def sscan(self, name: _Key, cursor: int = ..., match: _Key | None = ..., count: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def sscan_iter(self, name: _Key, match: _Key | None = ..., count: int | None = ...) -> Iterator[Any]: ... - def hscan(self, name: _Key, cursor: int = ..., match: _Key | None = ..., count: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def hscan_iter(self, name, match: _Key | None = ..., count: int | None = ...) -> Iterator[Any]: ... + def scan(self, cursor: int = 0, match: _Key | None = None, count: int | None = None, _type: str | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] + def scan_iter(self, match: _Key | None = None, count: int | None = None, _type: str | None = None) -> Iterator[Any]: ... # type: ignore[override] + def sscan(self, name: _Key, cursor: int = 0, match: _Key | None = None, count: int | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] + def sscan_iter(self, name: _Key, match: _Key | None = None, count: int | None = None) -> Iterator[Any]: ... + def hscan(self, name: _Key, cursor: int = 0, match: _Key | None = None, count: int | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] + def hscan_iter(self, name, match: _Key | None = None, count: int | None = None) -> Iterator[Any]: ... def zscan_iter( - self, name: _Key, match: _Key | None = ..., count: int | None = ..., score_cast_func: Callable[[_StrType], Any] = ... + self, name: _Key, match: _Key | None = None, count: int | None = None, score_cast_func: Callable[[_StrType], Any] = ... ) -> Iterator[Any]: ... def sadd(self, name: _Key, *values: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] def scard(self, name: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] @@ -593,74 +597,84 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def sismember(self, name: _Key, value: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] def smembers(self, name: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] def smove(self, src: _Key, dst: _Key, value: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] - def spop(self, name: _Key, count: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def srandmember(self, name: _Key, number: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def spop(self, name: _Key, count: int | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] + def srandmember(self, name: _Key, number: int | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] def srem(self, name: _Key, *values: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] def sunion(self, keys: _Key | Iterable[_Key], *args: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] def sunionstore(self, dest: _Key, keys: _Key | Iterable[_Key], *args: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] def xack(self, name, groupname, *ids) -> Pipeline[_StrType]: ... # type: ignore[override] - def xadd(self, name, fields, id=..., maxlen=..., approximate: bool = ..., nomkstream: bool = ..., minid: Incomplete | None = ..., limit: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def xadd(self, name, fields, id="*", maxlen=None, approximate: bool = True, nomkstream: bool = False, minid: Incomplete | None = None, limit: int | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] def xclaim( - self, name, groupname, consumername, min_idle_time, message_ids, idle=..., time=..., retrycount=..., force=..., justid=... + self, + name, + groupname, + consumername, + min_idle_time, + message_ids, + idle=None, + time=None, + retrycount=None, + force=False, + justid=False, ) -> Pipeline[_StrType]: ... # type: ignore[override] def xdel(self, name, *ids) -> Pipeline[_StrType]: ... # type: ignore[override] - def xgroup_create(self, name, groupname, id=..., mkstream=..., entries_read: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def xgroup_create(self, name, groupname, id="$", mkstream=False, entries_read: int | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] def xgroup_delconsumer(self, name, groupname, consumername) -> Pipeline[_StrType]: ... # type: ignore[override] def xgroup_destroy(self, name, groupname) -> Pipeline[_StrType]: ... # type: ignore[override] - def xgroup_setid(self, name, groupname, id, entries_read: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def xgroup_setid(self, name, groupname, id, entries_read: int | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] def xinfo_consumers(self, name, groupname) -> Pipeline[_StrType]: ... # type: ignore[override] def xinfo_groups(self, name) -> Pipeline[_StrType]: ... # type: ignore[override] - def xinfo_stream(self, name, full: bool = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def xinfo_stream(self, name, full: bool = False) -> Pipeline[_StrType]: ... # type: ignore[override] def xlen(self, name: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] def xpending(self, name, groupname) -> Pipeline[_StrType]: ... # type: ignore[override] - def xpending_range(self, name: _Key, groupname, min, max, count: int, consumername: Incomplete | None = ..., idle: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def xrange(self, name, min=..., max=..., count=...) -> Pipeline[_StrType]: ... # type: ignore[override] - def xread(self, streams, count=..., block=...) -> Pipeline[_StrType]: ... # type: ignore[override] - def xreadgroup(self, groupname, consumername, streams, count=..., block=..., noack=...) -> Pipeline[_StrType]: ... # type: ignore[override] - def xrevrange(self, name, max=..., min=..., count=...) -> Pipeline[_StrType]: ... # type: ignore[override] - def xtrim(self, name, maxlen: int | None = ..., approximate: bool = ..., minid: Incomplete | None = ..., limit: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def xpending_range(self, name: _Key, groupname, min, max, count: int, consumername: Incomplete | None = None, idle: int | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] + def xrange(self, name, min="-", max="+", count=None) -> Pipeline[_StrType]: ... # type: ignore[override] + def xread(self, streams, count=None, block=None) -> Pipeline[_StrType]: ... # type: ignore[override] + def xreadgroup(self, groupname, consumername, streams, count=None, block=None, noack=False) -> Pipeline[_StrType]: ... # type: ignore[override] + def xrevrange(self, name, max="+", min="-", count=None) -> Pipeline[_StrType]: ... # type: ignore[override] + def xtrim(self, name, maxlen: int | None = None, approximate: bool = True, minid: Incomplete | None = None, limit: int | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] def zadd( # type: ignore[override] self, name: _Key, mapping: Mapping[_Key, _Value], - nx: bool = ..., - xx: bool = ..., - ch: bool = ..., - incr: bool = ..., - gt: Incomplete | None = ..., - lt: Incomplete | None = ..., + nx: bool = False, + xx: bool = False, + ch: bool = False, + incr: bool = False, + gt: Incomplete | None = False, + lt: Incomplete | None = False, ) -> Pipeline[_StrType]: ... def zcard(self, name: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] def zcount(self, name: _Key, min: _Value, max: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] def zincrby(self, name: _Key, amount: float, value: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] - def zinterstore(self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def zinterstore(self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] def zlexcount(self, name: _Key, min: _Value, max: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] - def zpopmax(self, name: _Key, count: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def zpopmin(self, name: _Key, count: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def bzpopmax(self, keys: _Key | Iterable[_Key], timeout: float = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def bzpopmin(self, keys: _Key | Iterable[_Key], timeout: float = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def zpopmax(self, name: _Key, count: int | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] + def zpopmin(self, name: _Key, count: int | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] + def bzpopmax(self, keys: _Key | Iterable[_Key], timeout: float = 0) -> Pipeline[_StrType]: ... # type: ignore[override] + def bzpopmin(self, keys: _Key | Iterable[_Key], timeout: float = 0) -> Pipeline[_StrType]: ... # type: ignore[override] def zrange( # type: ignore[override] self, name: _Key, start: int, end: int, - desc: bool = ..., - withscores: bool = ..., + desc: bool = False, + withscores: bool = False, score_cast_func: Callable[[_StrType], Any] = ..., - byscore: bool = ..., - bylex: bool = ..., - offset: int | None = ..., - num: int | None = ..., + byscore: bool = False, + bylex: bool = False, + offset: int | None = None, + num: int | None = None, ) -> Pipeline[_StrType]: ... - def zrangebylex(self, name: _Key, min: _Value, max: _Value, start: int | None = ..., num: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def zrangebylex(self, name: _Key, min: _Value, max: _Value, start: int | None = None, num: int | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] def zrangebyscore( # type: ignore[override] self, name: _Key, min: _Value, max: _Value, - start: int | None = ..., - num: int | None = ..., - withscores: bool = ..., + start: int | None = None, + num: int | None = None, + withscores: bool = False, score_cast_func: Callable[[_StrType], Any] = ..., ) -> Pipeline[_StrType]: ... def zrank(self, name: _Key, value: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] @@ -669,24 +683,24 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def zremrangebyrank(self, name: _Key, min: _Value, max: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] def zremrangebyscore(self, name: _Key, min: _Value, max: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] def zrevrange( # type: ignore[override] - self, name: _Key, start: int, end: int, withscores: bool = ..., score_cast_func: Callable[[_StrType], Any] = ... + self, name: _Key, start: int, end: int, withscores: bool = False, score_cast_func: Callable[[_StrType], Any] = ... ) -> Pipeline[_StrType]: ... def zrevrangebyscore( # type: ignore[override] self, name: _Key, max: _Value, min: _Value, - start: int | None = ..., - num: int | None = ..., - withscores: bool = ..., + start: int | None = None, + num: int | None = None, + withscores: bool = False, score_cast_func: Callable[[_StrType], Any] = ..., ) -> Pipeline[_StrType]: ... def zrevrangebylex( # type: ignore[override] - self, name: _Key, max: _Value, min: _Value, start: int | None = ..., num: int | None = ... + self, name: _Key, max: _Value, min: _Value, start: int | None = None, num: int | None = None ) -> Pipeline[_StrType]: ... def zrevrank(self, name: _Key, value: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] def zscore(self, name: _Key, value: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] - def zunionstore(self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def zunionstore(self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] def pfadd(self, name: _Key, *values: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] def pfcount(self, name: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] def pfmerge(self, dest: _Key, *sources: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] @@ -694,20 +708,20 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def hexists(self, name: _Key, key: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] def hget(self, name: _Key, key: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] def hgetall(self, name: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] - def hincrby(self, name: _Key, key: _Key, amount: int = ...) -> Pipeline[_StrType]: ... # type: ignore[override] - def hincrbyfloat(self, name: _Key, key: _Key, amount: float = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def hincrby(self, name: _Key, key: _Key, amount: int = 1) -> Pipeline[_StrType]: ... # type: ignore[override] + def hincrbyfloat(self, name: _Key, key: _Key, amount: float = 1.0) -> Pipeline[_StrType]: ... # type: ignore[override] def hkeys(self, name: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] def hlen(self, name: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] @overload # type: ignore[override] def hset( - self, name: _Key, key: _Key, value: _Value, mapping: Mapping[_Key, _Value] | None = ..., items: Incomplete | None = ... + self, name: _Key, key: _Key, value: _Value, mapping: Mapping[_Key, _Value] | None = None, items: Incomplete | None = None ) -> Pipeline[_StrType]: ... @overload # type: ignore[override] def hset( - self, name: _Key, key: None, value: None, mapping: Mapping[_Key, _Value], items: Incomplete | None = ... + self, name: _Key, key: None, value: None, mapping: Mapping[_Key, _Value], items: Incomplete | None = None ) -> Pipeline[_StrType]: ... @overload # type: ignore[override] - def hset(self, name: _Key, *, mapping: Mapping[_Key, _Value], items: Incomplete | None = ...) -> Pipeline[_StrType]: ... + def hset(self, name: _Key, *, mapping: Mapping[_Key, _Value], items: Incomplete | None = None) -> Pipeline[_StrType]: ... def hsetnx(self, name: _Key, key: _Key, value: _Value) -> Pipeline[_StrType]: ... # type: ignore[override] def hmset(self, name: _Key, mapping: Mapping[_Key, _Value]) -> Pipeline[_StrType]: ... # type: ignore[override] def hmget(self, name: _Key, keys: _Key | Iterable[_Key], *args: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] @@ -716,10 +730,10 @@ class Pipeline(Redis[_StrType], Generic[_StrType]): def eval(self, script, numkeys, *keys_and_args) -> Pipeline[_StrType]: ... # type: ignore[override] def evalsha(self, sha, numkeys, *keys_and_args) -> Pipeline[_StrType]: ... # type: ignore[override] def script_exists(self, *args) -> Pipeline[_StrType]: ... # type: ignore[override] - def script_flush(self, sync_type: Incomplete | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def script_flush(self, sync_type: Incomplete | None = None) -> Pipeline[_StrType]: ... # type: ignore[override] def script_kill(self) -> Pipeline[_StrType]: ... # type: ignore[override] def script_load(self, script) -> Pipeline[_StrType]: ... # type: ignore[override] - def pubsub_channels(self, pattern: _Key = ...) -> Pipeline[_StrType]: ... # type: ignore[override] + def pubsub_channels(self, pattern: _Key = "*") -> Pipeline[_StrType]: ... # type: ignore[override] def pubsub_numsub(self, *args: _Key) -> Pipeline[_StrType]: ... # type: ignore[override] def pubsub_numpat(self) -> Pipeline[_StrType]: ... # type: ignore[override] def monitor(self) -> Monitor: ... diff --git a/stubs/redis/redis/cluster.pyi b/stubs/redis/redis/cluster.pyi index fd4e906e6e06..93f9727907cc 100644 --- a/stubs/redis/redis/cluster.pyi +++ b/stubs/redis/redis/cluster.pyi @@ -59,16 +59,16 @@ class RedisCluster(AbstractRedisCluster, RedisClusterCommands[_StrType], Generic commands_parser: CommandsParser def __init__( # TODO: make @overloads, either `url` or `host:port` can be passed self, - host: str | None = ..., - port: int | None = ..., - startup_nodes: list[ClusterNode] | None = ..., - cluster_error_retry_attempts: int = ..., - retry: Retry | None = ..., - require_full_coverage: bool = ..., - reinitialize_steps: int = ..., - read_from_replicas: bool = ..., - dynamic_startup_nodes: bool = ..., - url: str | None = ..., + host: str | None = None, + port: int | None = 6379, + startup_nodes: list[ClusterNode] | None = None, + cluster_error_retry_attempts: int = 3, + retry: Retry | None = None, + require_full_coverage: bool = False, + reinitialize_steps: int = 5, + read_from_replicas: bool = False, + dynamic_startup_nodes: bool = True, + url: str | None = None, **kwargs, ) -> None: ... def __enter__(self) -> Self: ... @@ -82,27 +82,29 @@ class RedisCluster(AbstractRedisCluster, RedisClusterCommands[_StrType], Generic def on_connect(self, connection: Connection) -> None: ... def get_redis_connection(self, node: ClusterNode) -> Redis[Any]: ... def get_node( - self, host: str | None = ..., port: str | int | None = ..., node_name: str | None = ... + self, host: str | None = None, port: str | int | None = None, node_name: str | None = None ) -> ClusterNode | None: ... def get_primaries(self) -> list[ClusterNode]: ... def get_replicas(self) -> list[ClusterNode]: ... def get_random_node(self) -> ClusterNode: ... def get_nodes(self) -> list[ClusterNode]: ... - def get_node_from_key(self, key: _Encodable, replica: bool = ...) -> ClusterNode | None: ... + def get_node_from_key(self, key: _Encodable, replica: bool = False) -> ClusterNode | None: ... def get_default_node(self) -> ClusterNode | None: ... def set_default_node(self, node: ClusterNode | None) -> bool: ... - def monitor(self, target_node: Incomplete | None = ...): ... - def pubsub(self, node: Incomplete | None = ..., host: Incomplete | None = ..., port: Incomplete | None = ..., **kwargs): ... - def pipeline(self, transaction: Incomplete | None = ..., shard_hint: Incomplete | None = ...): ... + def monitor(self, target_node: Incomplete | None = None): ... + def pubsub( + self, node: Incomplete | None = None, host: Incomplete | None = None, port: Incomplete | None = None, **kwargs + ): ... + def pipeline(self, transaction: Incomplete | None = None, shard_hint: Incomplete | None = None): ... def lock( self, name: str, - timeout: float | None = ..., - sleep: float = ..., - blocking: bool = ..., - blocking_timeout: float | None = ..., - lock_class: type[Incomplete] | None = ..., - thread_local: bool = ..., + timeout: float | None = None, + sleep: float = 0.1, + blocking: bool = True, + blocking_timeout: float | None = None, + lock_class: type[Incomplete] | None = None, + thread_local: bool = True, ): ... def keyslot(self, key: _Encodable) -> int: ... def determine_slot(self, *args): ... @@ -118,7 +120,7 @@ class ClusterNode: server_type: str | None redis_connection: Redis[Incomplete] | None def __init__( - self, host: str, port: int, server_type: str | None = ..., redis_connection: Redis[Incomplete] | None = ... + self, host: str, port: int, server_type: str | None = None, redis_connection: Redis[Incomplete] | None = None ) -> None: ... def __eq__(self, obj: object) -> bool: ... def __del__(self) -> None: ... @@ -126,7 +128,7 @@ class ClusterNode: class LoadBalancer: primary_to_idx: dict[str, int] start_index: int - def __init__(self, start_index: int = ...) -> None: ... + def __init__(self, start_index: int = 0) -> None: ... def get_server_index(self, primary: str, list_size: int) -> int: ... def reset(self) -> None: ... @@ -150,10 +152,10 @@ class NodesManager: **kwargs, # TODO: same type as connection_kwargs ) -> None: ... def get_node( - self, host: str | None = ..., port: int | str | None = ..., node_name: str | None = ... + self, host: str | None = None, port: int | str | None = None, node_name: str | None = None ) -> ClusterNode | None: ... def update_moved_exception(self, exception: MovedError) -> None: ... - def get_node_from_slot(self, slot: str, read_from_replicas: bool = ..., server_type: str | None = ...) -> ClusterNode: ... + def get_node_from_slot(self, slot: str, read_from_replicas: bool = False, server_type: str | None = None) -> ClusterNode: ... def get_nodes_by_server_type(self, server_type: str) -> list[ClusterNode]: ... def populate_startup_nodes(self, nodes: Iterable[ClusterNode]) -> None: ... def check_slots_coverage(self, slots_cache: dict[str, list[ClusterNode]]) -> bool: ... @@ -169,13 +171,13 @@ class ClusterPubSub(PubSub): def __init__( self, redis_cluster: RedisCluster[Any], - node: ClusterNode | None = ..., - host: str | None = ..., - port: int | None = ..., + node: ClusterNode | None = None, + host: str | None = None, + port: int | None = None, **kwargs, ) -> None: ... def set_pubsub_node( - self, cluster: RedisCluster[Any], node: ClusterNode | None = ..., host: str | None = ..., port: int | None = ... + self, cluster: RedisCluster[Any], node: ClusterNode | None = None, host: str | None = None, port: int | None = None ) -> None: ... def get_pubsub_node(self) -> ClusterNode | None: ... def execute_command(self, *args, **kwargs) -> None: ... @@ -199,13 +201,13 @@ class ClusterPipeline(RedisCluster[_StrType], Generic[_StrType]): self, nodes_manager, commands_parser, - result_callbacks: Incomplete | None = ..., - cluster_response_callbacks: Incomplete | None = ..., - startup_nodes: Incomplete | None = ..., - read_from_replicas: bool = ..., - cluster_error_retry_attempts: int = ..., - reinitialize_steps: int = ..., - lock: Lock | None = ..., + result_callbacks: Incomplete | None = None, + cluster_response_callbacks: Incomplete | None = None, + startup_nodes: Incomplete | None = None, + read_from_replicas: bool = False, + cluster_error_retry_attempts: int = 3, + reinitialize_steps: int = 5, + lock: Lock | None = None, **kwargs, ) -> None: ... def __len__(self) -> int: ... @@ -214,12 +216,12 @@ class ClusterPipeline(RedisCluster[_StrType], Generic[_StrType]): def pipeline_execute_command(self, *args, **options): ... def raise_first_error(self, stack) -> None: ... def annotate_exception(self, exception, number, command) -> None: ... - def execute(self, raise_on_error: bool = ...): ... + def execute(self, raise_on_error: bool = True): ... scripts: set[Any] # is only set in `reset()` watching: bool # is only set in `reset()` explicit_transaction: bool # is only set in `reset()` def reset(self) -> None: ... - def send_cluster_commands(self, stack, raise_on_error: bool = ..., allow_redirections: bool = ...): ... + def send_cluster_commands(self, stack, raise_on_error: bool = True, allow_redirections: bool = True): ... def eval(self) -> None: ... def multi(self) -> None: ... def immediate_execute_command(self, *args, **options) -> None: ... @@ -239,7 +241,7 @@ class PipelineCommand: node: Incomplete | None asking: bool def __init__( - self, args: Sequence[EncodableT], options: _ParseResponseOptions | None = ..., position: int | None = ... + self, args: Sequence[EncodableT], options: _ParseResponseOptions | None = None, position: int | None = None ) -> None: ... class _ParseResponseCallback(Protocol): diff --git a/stubs/redis/redis/commands/bf/commands.pyi b/stubs/redis/redis/commands/bf/commands.pyi index 73b0beb1e040..99a296fdc1dd 100644 --- a/stubs/redis/redis/commands/bf/commands.pyi +++ b/stubs/redis/redis/commands/bf/commands.pyi @@ -44,18 +44,18 @@ TDIGEST_MAX: str TDIGEST_INFO: str class BFCommands: - def create(self, key, errorRate, capacity, expansion: Incomplete | None = ..., noScale: Incomplete | None = ...): ... + def create(self, key, errorRate, capacity, expansion: Incomplete | None = None, noScale: Incomplete | None = None): ... def add(self, key, item): ... def madd(self, key, *items): ... def insert( self, key, items, - capacity: Incomplete | None = ..., - error: Incomplete | None = ..., - noCreate: Incomplete | None = ..., - expansion: Incomplete | None = ..., - noScale: Incomplete | None = ..., + capacity: Incomplete | None = None, + error: Incomplete | None = None, + noCreate: Incomplete | None = None, + expansion: Incomplete | None = None, + noScale: Incomplete | None = None, ): ... def exists(self, key, item): ... def mexists(self, key, *items): ... @@ -68,14 +68,14 @@ class CFCommands: self, key, capacity, - expansion: Incomplete | None = ..., - bucket_size: Incomplete | None = ..., - max_iterations: Incomplete | None = ..., + expansion: Incomplete | None = None, + bucket_size: Incomplete | None = None, + max_iterations: Incomplete | None = None, ): ... def add(self, key, item): ... def addnx(self, key, item): ... - def insert(self, key, items, capacity: Incomplete | None = ..., nocreate: Incomplete | None = ...): ... - def insertnx(self, key, items, capacity: Incomplete | None = ..., nocreate: Incomplete | None = ...): ... + def insert(self, key, items, capacity: Incomplete | None = None, nocreate: Incomplete | None = None): ... + def insertnx(self, key, items, capacity: Incomplete | None = None, nocreate: Incomplete | None = None): ... def exists(self, key, item): ... def delete(self, key, item): ... def count(self, key, item): ... @@ -89,14 +89,14 @@ class TOPKCommands: def incrby(self, key, items, increments): ... def query(self, key, *items): ... def count(self, key, *items): ... - def list(self, key, withcount: bool = ...): ... + def list(self, key, withcount: bool = False): ... def info(self, key): ... class TDigestCommands: - def create(self, key, compression: int = ...): ... + def create(self, key, compression: int = 100): ... def reset(self, key): ... def add(self, key, values): ... - def merge(self, destination_key, num_keys, *keys, compression: int | None = ..., override: bool = ...): ... + def merge(self, destination_key, num_keys, *keys, compression: int | None = None, override: bool = False): ... def min(self, key): ... def max(self, key): ... def quantile(self, key, quantile, *quantiles): ... @@ -108,5 +108,5 @@ class CMSCommands: def initbyprob(self, key, error, probability): ... def incrby(self, key, items, increments): ... def query(self, key, *items): ... - def merge(self, destKey, numKeys, srcKeys, weights=...): ... + def merge(self, destKey, numKeys, srcKeys, weights=[]): ... def info(self, key): ... diff --git a/stubs/redis/redis/commands/cluster.pyi b/stubs/redis/redis/commands/cluster.pyi index 0a5981b01720..5304382400a9 100644 --- a/stubs/redis/redis/commands/cluster.pyi +++ b/stubs/redis/redis/commands/cluster.pyi @@ -22,11 +22,11 @@ class ClusterDataAccessCommands(DataAccessCommands[_StrType], Generic[_StrType]) algo, value1, value2, - specific_argument: str = ..., - len: bool = ..., - idx: bool = ..., - minmatchlen: Incomplete | None = ..., - withmatchlen: bool = ..., + specific_argument: str = "strings", + len: bool = False, + idx: bool = False, + minmatchlen: Incomplete | None = None, + withmatchlen: bool = False, **kwargs, ): ... @@ -42,20 +42,20 @@ class RedisClusterCommands( def cluster_countkeysinslot(self, slot_id): ... def cluster_count_failure_report(self, node_id): ... def cluster_delslots(self, *slots): ... - def cluster_failover(self, target_node, option: Incomplete | None = ...): ... - def cluster_info(self, target_nodes: Incomplete | None = ...): ... + def cluster_failover(self, target_node, option: Incomplete | None = None): ... + def cluster_info(self, target_nodes: Incomplete | None = None): ... def cluster_keyslot(self, key): ... - def cluster_meet(self, host, port, target_nodes: Incomplete | None = ...): ... + def cluster_meet(self, host, port, target_nodes: Incomplete | None = None): ... def cluster_nodes(self): ... def cluster_replicate(self, target_nodes, node_id): ... - def cluster_reset(self, soft: bool = ..., target_nodes: Incomplete | None = ...): ... - def cluster_save_config(self, target_nodes: Incomplete | None = ...): ... + def cluster_reset(self, soft: bool = True, target_nodes: Incomplete | None = None): ... + def cluster_save_config(self, target_nodes: Incomplete | None = None): ... def cluster_get_keys_in_slot(self, slot, num_keys): ... - def cluster_set_config_epoch(self, epoch, target_nodes: Incomplete | None = ...): ... + def cluster_set_config_epoch(self, epoch, target_nodes: Incomplete | None = None): ... def cluster_setslot(self, target_node, node_id, slot_id, state): ... def cluster_setslot_stable(self, slot_id): ... - def cluster_replicas(self, node_id, target_nodes: Incomplete | None = ...): ... - def cluster_slots(self, target_nodes: Incomplete | None = ...): ... + def cluster_replicas(self, node_id, target_nodes: Incomplete | None = None): ... + def cluster_slots(self, target_nodes: Incomplete | None = None): ... read_from_replicas: bool - def readonly(self, target_nodes: Incomplete | None = ...): ... - def readwrite(self, target_nodes: Incomplete | None = ...): ... + def readonly(self, target_nodes: Incomplete | None = None): ... + def readwrite(self, target_nodes: Incomplete | None = None): ... diff --git a/stubs/redis/redis/commands/core.pyi b/stubs/redis/redis/commands/core.pyi index 65aca2c57129..1651634dc891 100644 --- a/stubs/redis/redis/commands/core.pyi +++ b/stubs/redis/redis/commands/core.pyi @@ -13,28 +13,28 @@ _ScoreCastFuncReturn = TypeVar("_ScoreCastFuncReturn") _StrType = TypeVar("_StrType", bound=str | bytes) class ACLCommands(Generic[_StrType]): - def acl_cat(self, category: str | None = ..., **kwargs: _CommandOptions) -> list[str]: ... + def acl_cat(self, category: str | None = None, **kwargs: _CommandOptions) -> list[str]: ... def acl_deluser(self, *username: str, **kwargs: _CommandOptions) -> int: ... - def acl_genpass(self, bits: int | None = ..., **kwargs: _CommandOptions) -> str: ... + def acl_genpass(self, bits: int | None = None, **kwargs: _CommandOptions) -> str: ... def acl_getuser(self, username: str, **kwargs: _CommandOptions) -> Any | None: ... def acl_help(self, **kwargs: _CommandOptions): ... def acl_list(self, **kwargs: _CommandOptions) -> list[str]: ... - def acl_log(self, count: int | None = ..., **kwargs: _CommandOptions): ... + def acl_log(self, count: int | None = None, **kwargs: _CommandOptions): ... def acl_log_reset(self, **kwargs: _CommandOptions): ... def acl_load(self, **kwargs: _CommandOptions) -> bool: ... def acl_save(self, **kwargs: _CommandOptions): ... def acl_setuser( self, username: str, - enabled: bool = ..., - nopass: bool = ..., - passwords: Sequence[str] | None = ..., - hashed_passwords: Sequence[str] | None = ..., - categories: Sequence[str] | None = ..., - commands: Sequence[str] | None = ..., - keys: Sequence[str] | None = ..., - channels: Iterable[ChannelT] | None = ..., - selectors: Iterable[tuple[str, KeyT]] | None = ..., + enabled: bool = False, + nopass: bool = False, + passwords: Sequence[str] | None = None, + hashed_passwords: Sequence[str] | None = None, + categories: Sequence[str] | None = None, + commands: Sequence[str] | None = None, + keys: Sequence[str] | None = None, + channels: Iterable[ChannelT] | None = None, + selectors: Iterable[tuple[str, KeyT]] | None = None, reset: bool = False, reset_keys: bool = False, reset_channels: bool = False, @@ -45,28 +45,28 @@ class ACLCommands(Generic[_StrType]): def acl_whoami(self, **kwargs: _CommandOptions) -> str: ... class AsyncACLCommands(Generic[_StrType]): - async def acl_cat(self, category: str | None = ..., **kwargs: _CommandOptions) -> list[str]: ... + async def acl_cat(self, category: str | None = None, **kwargs: _CommandOptions) -> list[str]: ... async def acl_deluser(self, *username: str, **kwargs: _CommandOptions) -> int: ... - async def acl_genpass(self, bits: int | None = ..., **kwargs: _CommandOptions) -> str: ... + async def acl_genpass(self, bits: int | None = None, **kwargs: _CommandOptions) -> str: ... async def acl_getuser(self, username: str, **kwargs: _CommandOptions) -> Any | None: ... async def acl_help(self, **kwargs: _CommandOptions): ... async def acl_list(self, **kwargs: _CommandOptions) -> list[str]: ... - async def acl_log(self, count: int | None = ..., **kwargs: _CommandOptions): ... + async def acl_log(self, count: int | None = None, **kwargs: _CommandOptions): ... async def acl_log_reset(self, **kwargs: _CommandOptions): ... async def acl_load(self, **kwargs: _CommandOptions) -> bool: ... async def acl_save(self, **kwargs: _CommandOptions): ... async def acl_setuser( self, username: str, - enabled: bool = ..., - nopass: bool = ..., - passwords: Sequence[str] | None = ..., - hashed_passwords: Sequence[str] | None = ..., - categories: Sequence[str] | None = ..., - commands: Sequence[str] | None = ..., - keys: Sequence[str] | None = ..., - channels: Iterable[ChannelT] | None = ..., - selectors: Iterable[tuple[str, KeyT]] | None = ..., + enabled: bool = False, + nopass: bool = False, + passwords: Sequence[str] | None = None, + hashed_passwords: Sequence[str] | None = None, + categories: Sequence[str] | None = None, + commands: Sequence[str] | None = None, + keys: Sequence[str] | None = None, + channels: Iterable[ChannelT] | None = None, + selectors: Iterable[tuple[str, KeyT]] | None = None, reset: bool = False, reset_keys: bool = False, reset_channels: bool = False, @@ -78,22 +78,22 @@ class AsyncACLCommands(Generic[_StrType]): class ManagementCommands: def bgrewriteaof(self, **kwargs: _CommandOptions): ... - def bgsave(self, schedule: bool = ..., **kwargs: _CommandOptions): ... + def bgsave(self, schedule: bool = True, **kwargs: _CommandOptions): ... def role(self): ... def client_kill(self, address: str, **kwargs: _CommandOptions) -> bool: ... def client_kill_filter( self, - _id: Incomplete | None = ..., - _type: Incomplete | None = ..., - addr: Incomplete | None = ..., - skipme: Incomplete | None = ..., - laddr: Incomplete | None = ..., - user: Incomplete | None = ..., + _id: Incomplete | None = None, + _type: Incomplete | None = None, + addr: Incomplete | None = None, + skipme: Incomplete | None = None, + laddr: Incomplete | None = None, + user: Incomplete | None = None, **kwargs: _CommandOptions, ): ... def client_info(self, **kwargs: _CommandOptions): ... def client_list( - self, _type: str | None = ..., client_id: list[str] = ..., **kwargs: _CommandOptions + self, _type: str | None = None, client_id: list[str] = [], **kwargs: _CommandOptions ) -> list[dict[str, str]]: ... def client_getname(self, **kwargs: _CommandOptions) -> str | None: ... def client_getredir(self, **kwargs: _CommandOptions): ... @@ -101,42 +101,42 @@ class ManagementCommands: def client_id(self, **kwargs: _CommandOptions) -> int: ... def client_tracking_on( self, - clientid: Incomplete | None = ..., - prefix=..., - bcast: bool = ..., - optin: bool = ..., - optout: bool = ..., - noloop: bool = ..., + clientid: Incomplete | None = None, + prefix=[], + bcast: bool = False, + optin: bool = False, + optout: bool = False, + noloop: bool = False, ): ... def client_tracking_off( self, - clientid: Incomplete | None = ..., - prefix=..., - bcast: bool = ..., - optin: bool = ..., - optout: bool = ..., - noloop: bool = ..., + clientid: Incomplete | None = None, + prefix=[], + bcast: bool = False, + optin: bool = False, + optout: bool = False, + noloop: bool = False, ): ... def client_tracking( self, - on: bool = ..., - clientid: Incomplete | None = ..., - prefix=..., - bcast: bool = ..., - optin: bool = ..., - optout: bool = ..., - noloop: bool = ..., + on: bool = True, + clientid: Incomplete | None = None, + prefix=[], + bcast: bool = False, + optin: bool = False, + optout: bool = False, + noloop: bool = False, **kwargs: _CommandOptions, ): ... def client_trackinginfo(self, **kwargs: _CommandOptions): ... def client_setname(self, name: str, **kwargs: _CommandOptions) -> bool: ... - def client_unblock(self, client_id, error: bool = ..., **kwargs: _CommandOptions): ... - def client_pause(self, timeout, all: bool = ..., **kwargs: _CommandOptions): ... + def client_unblock(self, client_id, error: bool = False, **kwargs: _CommandOptions): ... + def client_pause(self, timeout, all: bool = True, **kwargs: _CommandOptions): ... def client_unpause(self, **kwargs: _CommandOptions): ... def command(self, **kwargs: _CommandOptions): ... def command_info(self, **kwargs: _CommandOptions): ... def command_count(self, **kwargs: _CommandOptions): ... - def config_get(self, pattern: PatternT = ..., *args: PatternT, **kwargs: _CommandOptions): ... + def config_get(self, pattern: PatternT = "*", *args: PatternT, **kwargs: _CommandOptions): ... def config_set(self, name: KeyT, value: EncodableT, *args: KeyT | EncodableT, **kwargs: _CommandOptions): ... def config_resetstat(self, **kwargs: _CommandOptions): ... def config_rewrite(self, **kwargs: _CommandOptions): ... @@ -144,13 +144,13 @@ class ManagementCommands: def debug_object(self, key, **kwargs: _CommandOptions): ... def debug_segfault(self, **kwargs: _CommandOptions): ... def echo(self, value: _Value, **kwargs: _CommandOptions) -> bytes: ... - def flushall(self, asynchronous: bool = ..., **kwargs: _CommandOptions) -> bool: ... - def flushdb(self, asynchronous: bool = ..., **kwargs: _CommandOptions) -> bool: ... + def flushall(self, asynchronous: bool = False, **kwargs: _CommandOptions) -> bool: ... + def flushdb(self, asynchronous: bool = False, **kwargs: _CommandOptions) -> bool: ... def sync(self): ... def psync(self, replicationid, offset): ... def swapdb(self, first, second, **kwargs: _CommandOptions): ... def select(self, index, **kwargs: _CommandOptions): ... - def info(self, section: _Key | None = ..., *args: _Key, **kwargs: _CommandOptions) -> Mapping[str, Any]: ... + def info(self, section: _Key | None = None, *args: _Key, **kwargs: _CommandOptions) -> Mapping[str, Any]: ... def lastsave(self, **kwargs: _CommandOptions): ... def lolwut(self, *version_numbers: _Value, **kwargs: _CommandOptions) -> bytes: ... def reset(self) -> None: ... @@ -161,9 +161,9 @@ class ManagementCommands: keys, destination_db, timeout, - copy: bool = ..., - replace: bool = ..., - auth: Incomplete | None = ..., + copy: bool = False, + replace: bool = False, + auth: Incomplete | None = None, **kwargs: _CommandOptions, ): ... def object(self, infotype, key, **kwargs: _CommandOptions): ... @@ -171,7 +171,7 @@ class ManagementCommands: def memory_help(self, **kwargs: _CommandOptions): ... def memory_stats(self, **kwargs: _CommandOptions) -> dict[str, Any]: ... def memory_malloc_stats(self, **kwargs: _CommandOptions): ... - def memory_usage(self, key, samples: Incomplete | None = ..., **kwargs: _CommandOptions): ... + def memory_usage(self, key, samples: Incomplete | None = None, **kwargs: _CommandOptions): ... def memory_purge(self, **kwargs: _CommandOptions): ... def ping(self, **kwargs: _CommandOptions) -> bool: ... def quit(self, **kwargs: _CommandOptions): ... @@ -179,15 +179,15 @@ class ManagementCommands: def save(self, **kwargs: _CommandOptions) -> bool: ... def shutdown( self, - save: bool = ..., - nosave: bool = ..., - now: bool = ..., - force: bool = ..., - abort: bool = ..., + save: bool = False, + nosave: bool = False, + now: bool = False, + force: bool = False, + abort: bool = False, **kwargs: _CommandOptions, ) -> None: ... - def slaveof(self, host: Incomplete | None = ..., port: Incomplete | None = ..., **kwargs: _CommandOptions): ... - def slowlog_get(self, num: Incomplete | None = ..., **kwargs: _CommandOptions): ... + def slaveof(self, host: Incomplete | None = None, port: Incomplete | None = None, **kwargs: _CommandOptions): ... + def slowlog_get(self, num: Incomplete | None = None, **kwargs: _CommandOptions): ... def slowlog_len(self, **kwargs: _CommandOptions): ... def slowlog_reset(self, **kwargs: _CommandOptions): ... def time(self, **kwargs: _CommandOptions): ... @@ -195,22 +195,22 @@ class ManagementCommands: class AsyncManagementCommands: async def bgrewriteaof(self, **kwargs: _CommandOptions): ... - async def bgsave(self, schedule: bool = ..., **kwargs: _CommandOptions): ... + async def bgsave(self, schedule: bool = True, **kwargs: _CommandOptions): ... async def role(self): ... async def client_kill(self, address: str, **kwargs: _CommandOptions) -> bool: ... async def client_kill_filter( self, - _id: Incomplete | None = ..., - _type: Incomplete | None = ..., - addr: Incomplete | None = ..., - skipme: Incomplete | None = ..., - laddr: Incomplete | None = ..., - user: Incomplete | None = ..., + _id: Incomplete | None = None, + _type: Incomplete | None = None, + addr: Incomplete | None = None, + skipme: Incomplete | None = None, + laddr: Incomplete | None = None, + user: Incomplete | None = None, **kwargs: _CommandOptions, ): ... async def client_info(self, **kwargs: _CommandOptions): ... async def client_list( - self, _type: str | None = ..., client_id: list[str] = ..., **kwargs: _CommandOptions + self, _type: str | None = None, client_id: list[str] = [], **kwargs: _CommandOptions ) -> list[dict[str, str]]: ... async def client_getname(self, **kwargs: _CommandOptions) -> str | None: ... async def client_getredir(self, **kwargs: _CommandOptions): ... @@ -218,42 +218,42 @@ class AsyncManagementCommands: async def client_id(self, **kwargs: _CommandOptions) -> int: ... async def client_tracking_on( self, - clientid: Incomplete | None = ..., - prefix=..., - bcast: bool = ..., - optin: bool = ..., - optout: bool = ..., - noloop: bool = ..., + clientid: Incomplete | None = None, + prefix=[], + bcast: bool = False, + optin: bool = False, + optout: bool = False, + noloop: bool = False, ): ... async def client_tracking_off( self, - clientid: Incomplete | None = ..., - prefix=..., - bcast: bool = ..., - optin: bool = ..., - optout: bool = ..., - noloop: bool = ..., + clientid: Incomplete | None = None, + prefix=[], + bcast: bool = False, + optin: bool = False, + optout: bool = False, + noloop: bool = False, ): ... async def client_tracking( self, - on: bool = ..., - clientid: Incomplete | None = ..., - prefix=..., - bcast: bool = ..., - optin: bool = ..., - optout: bool = ..., - noloop: bool = ..., + on: bool = True, + clientid: Incomplete | None = None, + prefix=[], + bcast: bool = False, + optin: bool = False, + optout: bool = False, + noloop: bool = False, **kwargs: _CommandOptions, ): ... async def client_trackinginfo(self, **kwargs: _CommandOptions): ... async def client_setname(self, name: str, **kwargs: _CommandOptions) -> bool: ... - async def client_unblock(self, client_id, error: bool = ..., **kwargs: _CommandOptions): ... - async def client_pause(self, timeout, all: bool = ..., **kwargs: _CommandOptions): ... + async def client_unblock(self, client_id, error: bool = False, **kwargs: _CommandOptions): ... + async def client_pause(self, timeout, all: bool = True, **kwargs: _CommandOptions): ... async def client_unpause(self, **kwargs: _CommandOptions): ... async def command(self, **kwargs: _CommandOptions): ... async def command_info(self, **kwargs: _CommandOptions): ... async def command_count(self, **kwargs: _CommandOptions): ... - async def config_get(self, pattern: PatternT = ..., *args: PatternT, **kwargs: _CommandOptions): ... + async def config_get(self, pattern: PatternT = "*", *args: PatternT, **kwargs: _CommandOptions): ... async def config_set(self, name: KeyT, value: EncodableT, *args: KeyT | EncodableT, **kwargs: _CommandOptions): ... async def config_resetstat(self, **kwargs: _CommandOptions): ... async def config_rewrite(self, **kwargs: _CommandOptions): ... @@ -261,13 +261,13 @@ class AsyncManagementCommands: async def debug_object(self, key, **kwargs: _CommandOptions): ... async def debug_segfault(self, **kwargs: _CommandOptions): ... async def echo(self, value: _Value, **kwargs: _CommandOptions) -> bytes: ... - async def flushall(self, asynchronous: bool = ..., **kwargs: _CommandOptions) -> bool: ... - async def flushdb(self, asynchronous: bool = ..., **kwargs: _CommandOptions) -> bool: ... + async def flushall(self, asynchronous: bool = False, **kwargs: _CommandOptions) -> bool: ... + async def flushdb(self, asynchronous: bool = False, **kwargs: _CommandOptions) -> bool: ... async def sync(self): ... async def psync(self, replicationid, offset): ... async def swapdb(self, first, second, **kwargs: _CommandOptions): ... async def select(self, index, **kwargs: _CommandOptions): ... - async def info(self, section: _Key | None = ..., *args: _Key, **kwargs: _CommandOptions) -> Mapping[str, Any]: ... + async def info(self, section: _Key | None = None, *args: _Key, **kwargs: _CommandOptions) -> Mapping[str, Any]: ... async def lastsave(self, **kwargs: _CommandOptions): ... async def lolwut(self, *version_numbers: _Value, **kwargs: _CommandOptions) -> bytes: ... async def reset(self) -> None: ... @@ -278,9 +278,9 @@ class AsyncManagementCommands: keys, destination_db, timeout, - copy: bool = ..., - replace: bool = ..., - auth: Incomplete | None = ..., + copy: bool = False, + replace: bool = False, + auth: Incomplete | None = None, **kwargs: _CommandOptions, ): ... async def object(self, infotype, key, **kwargs: _CommandOptions): ... @@ -288,7 +288,7 @@ class AsyncManagementCommands: async def memory_help(self, **kwargs: _CommandOptions): ... async def memory_stats(self, **kwargs: _CommandOptions) -> dict[str, Any]: ... async def memory_malloc_stats(self, **kwargs: _CommandOptions): ... - async def memory_usage(self, key, samples: Incomplete | None = ..., **kwargs: _CommandOptions): ... + async def memory_usage(self, key, samples: Incomplete | None = None, **kwargs: _CommandOptions): ... async def memory_purge(self, **kwargs: _CommandOptions): ... async def ping(self, **kwargs: _CommandOptions) -> bool: ... async def quit(self, **kwargs: _CommandOptions): ... @@ -296,15 +296,15 @@ class AsyncManagementCommands: async def save(self, **kwargs: _CommandOptions) -> bool: ... async def shutdown( self, - save: bool = ..., - nosave: bool = ..., - now: bool = ..., - force: bool = ..., - abort: bool = ..., + save: bool = False, + nosave: bool = False, + now: bool = False, + force: bool = False, + abort: bool = False, **kwargs: _CommandOptions, ) -> None: ... - async def slaveof(self, host: Incomplete | None = ..., port: Incomplete | None = ..., **kwargs: _CommandOptions): ... - async def slowlog_get(self, num: Incomplete | None = ..., **kwargs: _CommandOptions): ... + async def slaveof(self, host: Incomplete | None = None, port: Incomplete | None = None, **kwargs: _CommandOptions): ... + async def slowlog_get(self, num: Incomplete | None = None, **kwargs: _CommandOptions): ... async def slowlog_len(self, **kwargs: _CommandOptions): ... async def slowlog_reset(self, **kwargs: _CommandOptions): ... async def time(self, **kwargs: _CommandOptions): ... @@ -312,51 +312,55 @@ class AsyncManagementCommands: class BasicKeyCommands(Generic[_StrType]): def append(self, key, value): ... - def bitcount(self, key: _Key, start: int | None = ..., end: int | None = ..., mode: str | None = ...) -> int: ... - def bitfield(self, key, default_overflow: Incomplete | None = ...): ... + def bitcount(self, key: _Key, start: int | None = None, end: int | None = None, mode: str | None = None) -> int: ... + def bitfield(self, key, default_overflow: Incomplete | None = None): ... def bitop(self, operation, dest, *keys): ... - def bitpos(self, key: _Key, bit: int, start: int | None = ..., end: int | None = ..., mode: str | None = ...): ... - def copy(self, source, destination, destination_db: Incomplete | None = ..., replace: bool = ...): ... - def decr(self, name, amount: int = ...) -> int: ... - def decrby(self, name, amount: int = ...) -> int: ... + def bitpos(self, key: _Key, bit: int, start: int | None = None, end: int | None = None, mode: str | None = None): ... + def copy(self, source, destination, destination_db: Incomplete | None = None, replace: bool = False): ... + def decr(self, name, amount: int = 1) -> int: ... + def decrby(self, name, amount: int = 1) -> int: ... def delete(self, *names: _Key) -> int: ... def __delitem__(self, name: _Key) -> None: ... def dump(self, name: _Key) -> _StrType | None: ... def exists(self, *names: _Key) -> int: ... __contains__ = exists def expire( - self, name: _Key, time: int | timedelta, nx: bool = ..., xx: bool = ..., gt: bool = ..., lt: bool = ... + self, name: _Key, time: int | timedelta, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False ) -> bool: ... - def expireat(self, name, when, nx: bool = ..., xx: bool = ..., gt: bool = ..., lt: bool = ...): ... + def expireat(self, name, when, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False): ... def get(self, name: _Key) -> _StrType | None: ... def getdel(self, name: _Key) -> _StrType | None: ... def getex( self, name, - ex: Incomplete | None = ..., - px: Incomplete | None = ..., - exat: Incomplete | None = ..., - pxat: Incomplete | None = ..., - persist: bool = ..., + ex: Incomplete | None = None, + px: Incomplete | None = None, + exat: Incomplete | None = None, + pxat: Incomplete | None = None, + persist: bool = False, ): ... def __getitem__(self, name: str): ... def getbit(self, name: _Key, offset: int) -> int: ... def getrange(self, key, start, end): ... def getset(self, name, value) -> _StrType | None: ... - def incr(self, name: _Key, amount: int = ...) -> int: ... - def incrby(self, name: _Key, amount: int = ...) -> int: ... - def incrbyfloat(self, name: _Key, amount: float = ...) -> float: ... - def keys(self, pattern: _Key = ..., **kwargs: _CommandOptions) -> list[_StrType]: ... + def incr(self, name: _Key, amount: int = 1) -> int: ... + def incrby(self, name: _Key, amount: int = 1) -> int: ... + def incrbyfloat(self, name: _Key, amount: float = 1.0) -> float: ... + def keys(self, pattern: _Key = "*", **kwargs: _CommandOptions) -> list[_StrType]: ... def lmove( - self, first_list: _Key, second_list: _Key, src: Literal["LEFT", "RIGHT"] = ..., dest: Literal["LEFT", "RIGHT"] = ... + self, + first_list: _Key, + second_list: _Key, + src: Literal["LEFT", "RIGHT"] = "LEFT", + dest: Literal["LEFT", "RIGHT"] = "RIGHT", ) -> _Value: ... def blmove( self, first_list: _Key, second_list: _Key, timeout: float, - src: Literal["LEFT", "RIGHT"] = ..., - dest: Literal["LEFT", "RIGHT"] = ..., + src: Literal["LEFT", "RIGHT"] = "LEFT", + dest: Literal["LEFT", "RIGHT"] = "RIGHT", ) -> _Value | None: ... def mget(self, keys: _Key | Iterable[_Key], *args: _Key) -> list[_StrType | None]: ... def mset(self, mapping: Mapping[_Key, _Value]) -> Literal[True]: ... @@ -364,14 +368,14 @@ class BasicKeyCommands(Generic[_StrType]): def move(self, name: _Key, db: int) -> bool: ... def persist(self, name: _Key) -> bool: ... def pexpire( - self, name: _Key, time: int | timedelta, nx: bool = ..., xx: bool = ..., gt: bool = ..., lt: bool = ... + self, name: _Key, time: int | timedelta, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False ) -> Literal[1, 0]: ... def pexpireat( - self, name: _Key, when: int | datetime, nx: bool = ..., xx: bool = ..., gt: bool = ..., lt: bool = ... + self, name: _Key, when: int | datetime, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False ) -> Literal[1, 0]: ... def psetex(self, name, time_ms, value): ... def pttl(self, name: _Key) -> int: ... - def hrandfield(self, key, count: Incomplete | None = ..., withvalues: bool = ...): ... + def hrandfield(self, key, count: Incomplete | None = None, withvalues: bool = False): ... def randomkey(self, **kwargs: _CommandOptions): ... def rename(self, src, dst): ... def renamenx(self, src, dst): ... @@ -380,23 +384,23 @@ class BasicKeyCommands(Generic[_StrType]): name, ttl, value, - replace: bool = ..., - absttl: bool = ..., - idletime: Incomplete | None = ..., - frequency: Incomplete | None = ..., + replace: bool = False, + absttl: bool = False, + idletime: Incomplete | None = None, + frequency: Incomplete | None = None, ): ... def set( self, name: _Key, value: _Value, - ex: None | float | timedelta = ..., - px: None | float | timedelta = ..., - nx: bool = ..., - xx: bool = ..., - keepttl: bool = ..., - get: bool = ..., - exat: Incomplete | None = ..., - pxat: Incomplete | None = ..., + ex: None | float | timedelta = None, + px: None | float | timedelta = None, + nx: bool = False, + xx: bool = False, + keepttl: bool = False, + get: bool = False, + exat: Incomplete | None = None, + pxat: Incomplete | None = None, ) -> bool | None: ... def __setitem__(self, name, value) -> None: ... def setbit(self, name: _Key, offset: int, value: int) -> int: ... @@ -408,15 +412,15 @@ class BasicKeyCommands(Generic[_StrType]): algo, value1, value2, - specific_argument: str = ..., - len: bool = ..., - idx: bool = ..., - minmatchlen: Incomplete | None = ..., - withmatchlen: bool = ..., + specific_argument: str = "strings", + len: bool = False, + idx: bool = False, + minmatchlen: Incomplete | None = None, + withmatchlen: bool = False, **kwargs: _CommandOptions, ): ... def strlen(self, name): ... - def substr(self, name, start, end: int = ...): ... + def substr(self, name, start, end: int = -1): ... def touch(self, *args): ... def ttl(self, name: _Key) -> int: ... def type(self, name): ... @@ -426,48 +430,52 @@ class BasicKeyCommands(Generic[_StrType]): class AsyncBasicKeyCommands(Generic[_StrType]): async def append(self, key, value): ... - async def bitcount(self, key: _Key, start: int | None = ..., end: int | None = ..., mode: str | None = ...) -> int: ... - async def bitfield(self, key, default_overflow: Incomplete | None = ...): ... + async def bitcount(self, key: _Key, start: int | None = None, end: int | None = None, mode: str | None = None) -> int: ... + async def bitfield(self, key, default_overflow: Incomplete | None = None): ... async def bitop(self, operation, dest, *keys): ... - async def bitpos(self, key: _Key, bit: int, start: int | None = ..., end: int | None = ..., mode: str | None = ...): ... - async def copy(self, source, destination, destination_db: Incomplete | None = ..., replace: bool = ...): ... - async def decr(self, name, amount: int = ...) -> int: ... - async def decrby(self, name, amount: int = ...) -> int: ... + async def bitpos(self, key: _Key, bit: int, start: int | None = None, end: int | None = None, mode: str | None = None): ... + async def copy(self, source, destination, destination_db: Incomplete | None = None, replace: bool = False): ... + async def decr(self, name, amount: int = 1) -> int: ... + async def decrby(self, name, amount: int = 1) -> int: ... async def delete(self, *names: _Key) -> int: ... async def dump(self, name: _Key) -> _StrType | None: ... async def exists(self, *names: _Key) -> int: ... async def expire( - self, name: _Key, time: int | timedelta, nx: bool = ..., xx: bool = ..., gt: bool = ..., lt: bool = ... + self, name: _Key, time: int | timedelta, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False ) -> bool: ... - async def expireat(self, name, when, nx: bool = ..., xx: bool = ..., gt: bool = ..., lt: bool = ...): ... + async def expireat(self, name, when, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False): ... async def get(self, name: _Key) -> _StrType | None: ... async def getdel(self, name: _Key) -> _StrType | None: ... async def getex( self, name, - ex: Incomplete | None = ..., - px: Incomplete | None = ..., - exat: Incomplete | None = ..., - pxat: Incomplete | None = ..., - persist: bool = ..., + ex: Incomplete | None = None, + px: Incomplete | None = None, + exat: Incomplete | None = None, + pxat: Incomplete | None = None, + persist: bool = False, ): ... async def getbit(self, name: _Key, offset: int) -> int: ... async def getrange(self, key, start, end): ... async def getset(self, name, value) -> _StrType | None: ... - async def incr(self, name: _Key, amount: int = ...) -> int: ... - async def incrby(self, name: _Key, amount: int = ...) -> int: ... - async def incrbyfloat(self, name: _Key, amount: float = ...) -> float: ... - async def keys(self, pattern: _Key = ..., **kwargs: _CommandOptions) -> list[_StrType]: ... + async def incr(self, name: _Key, amount: int = 1) -> int: ... + async def incrby(self, name: _Key, amount: int = 1) -> int: ... + async def incrbyfloat(self, name: _Key, amount: float = 1.0) -> float: ... + async def keys(self, pattern: _Key = "*", **kwargs: _CommandOptions) -> list[_StrType]: ... async def lmove( - self, first_list: _Key, second_list: _Key, src: Literal["LEFT", "RIGHT"] = ..., dest: Literal["LEFT", "RIGHT"] = ... + self, + first_list: _Key, + second_list: _Key, + src: Literal["LEFT", "RIGHT"] = "LEFT", + dest: Literal["LEFT", "RIGHT"] = "RIGHT", ) -> _Value: ... async def blmove( self, first_list: _Key, second_list: _Key, timeout: float, - src: Literal["LEFT", "RIGHT"] = ..., - dest: Literal["LEFT", "RIGHT"] = ..., + src: Literal["LEFT", "RIGHT"] = "LEFT", + dest: Literal["LEFT", "RIGHT"] = "RIGHT", ) -> _Value | None: ... async def mget(self, keys: _Key | Iterable[_Key], *args: _Key) -> list[_StrType | None]: ... async def mset(self, mapping: Mapping[_Key, _Value]) -> Literal[True]: ... @@ -475,14 +483,14 @@ class AsyncBasicKeyCommands(Generic[_StrType]): async def move(self, name: _Key, db: int) -> bool: ... async def persist(self, name: _Key) -> bool: ... async def pexpire( - self, name: _Key, time: int | timedelta, nx: bool = ..., xx: bool = ..., gt: bool = ..., lt: bool = ... + self, name: _Key, time: int | timedelta, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False ) -> Literal[1, 0]: ... async def pexpireat( - self, name: _Key, when: int | datetime, nx: bool = ..., xx: bool = ..., gt: bool = ..., lt: bool = ... + self, name: _Key, when: int | datetime, nx: bool = False, xx: bool = False, gt: bool = False, lt: bool = False ) -> Literal[1, 0]: ... async def psetex(self, name, time_ms, value): ... async def pttl(self, name: _Key) -> int: ... - async def hrandfield(self, key, count: Incomplete | None = ..., withvalues: bool = ...): ... + async def hrandfield(self, key, count: Incomplete | None = None, withvalues: bool = False): ... async def randomkey(self, **kwargs: _CommandOptions): ... async def rename(self, src, dst): ... async def renamenx(self, src, dst): ... @@ -491,23 +499,23 @@ class AsyncBasicKeyCommands(Generic[_StrType]): name, ttl, value, - replace: bool = ..., - absttl: bool = ..., - idletime: Incomplete | None = ..., - frequency: Incomplete | None = ..., + replace: bool = False, + absttl: bool = False, + idletime: Incomplete | None = None, + frequency: Incomplete | None = None, ): ... async def set( self, name: _Key, value: _Value, - ex: None | float | timedelta = ..., - px: None | float | timedelta = ..., - nx: bool = ..., - xx: bool = ..., - keepttl: bool = ..., - get: bool = ..., - exat: Incomplete | None = ..., - pxat: Incomplete | None = ..., + ex: None | float | timedelta = None, + px: None | float | timedelta = None, + nx: bool = False, + xx: bool = False, + keepttl: bool = False, + get: bool = False, + exat: Incomplete | None = None, + pxat: Incomplete | None = None, ) -> bool | None: ... async def setbit(self, name: _Key, offset: int, value: int) -> int: ... async def setex(self, name: _Key, time: int | timedelta, value: _Value) -> bool: ... @@ -518,15 +526,15 @@ class AsyncBasicKeyCommands(Generic[_StrType]): algo, value1, value2, - specific_argument: str = ..., - len: bool = ..., - idx: bool = ..., - minmatchlen: Incomplete | None = ..., - withmatchlen: bool = ..., + specific_argument: str = "strings", + len: bool = False, + idx: bool = False, + minmatchlen: Incomplete | None = None, + withmatchlen: bool = False, **kwargs: _CommandOptions, ): ... async def strlen(self, name): ... - async def substr(self, name, start, end: int = ...): ... + async def substr(self, name, start, end: int = -1): ... async def touch(self, *args): ... async def ttl(self, name: _Key) -> int: ... async def type(self, name): ... @@ -540,59 +548,59 @@ class AsyncBasicKeyCommands(Generic[_StrType]): class ListCommands(Generic[_StrType]): @overload - def blpop(self, keys: _Value | Iterable[_Value], timeout: Literal[0] | None = ...) -> tuple[_StrType, _StrType]: ... + def blpop(self, keys: _Value | Iterable[_Value], timeout: Literal[0] | None = 0) -> tuple[_StrType, _StrType]: ... @overload def blpop(self, keys: _Value | Iterable[_Value], timeout: float) -> tuple[_StrType, _StrType] | None: ... @overload - def brpop(self, keys: _Value | Iterable[_Value], timeout: Literal[0] | None = ...) -> tuple[_StrType, _StrType]: ... + def brpop(self, keys: _Value | Iterable[_Value], timeout: Literal[0] | None = 0) -> tuple[_StrType, _StrType]: ... @overload def brpop(self, keys: _Value | Iterable[_Value], timeout: float) -> tuple[_StrType, _StrType] | None: ... - def brpoplpush(self, src, dst, timeout: int | None = ...): ... + def brpoplpush(self, src, dst, timeout: int | None = 0): ... def lindex(self, name: _Key, index: int) -> _StrType | None: ... def linsert( self, name: _Key, where: Literal["BEFORE", "AFTER", "before", "after"], refvalue: _Value, value: _Value ) -> int: ... def llen(self, name: _Key) -> int: ... - def lpop(self, name, count: int | None = ...): ... + def lpop(self, name, count: int | None = None): ... def lpush(self, name: _Value, *values: _Value) -> int: ... def lpushx(self, name, value): ... def lrange(self, name: _Key, start: int, end: int) -> list[_StrType]: ... def lrem(self, name: _Key, count: int, value: _Value) -> int: ... def lset(self, name: _Key, index: int, value: _Value) -> bool: ... def ltrim(self, name: _Key, start: int, end: int) -> bool: ... - def rpop(self, name, count: int | None = ...): ... + def rpop(self, name, count: int | None = None): ... def rpoplpush(self, src, dst): ... def rpush(self, name: _Value, *values: _Value) -> int: ... def rpushx(self, name, value): ... def lpos( - self, name, value, rank: Incomplete | None = ..., count: Incomplete | None = ..., maxlen: Incomplete | None = ... + self, name, value, rank: Incomplete | None = None, count: Incomplete | None = None, maxlen: Incomplete | None = None ): ... @overload def sort( self, name: _Key, - start: int | None = ..., - num: int | None = ..., - by: _Key | None = ..., - get: _Key | Sequence[_Key] | None = ..., - desc: bool = ..., - alpha: bool = ..., - store: None = ..., - groups: bool = ..., + start: int | None = None, + num: int | None = None, + by: _Key | None = None, + get: _Key | Sequence[_Key] | None = None, + desc: bool = False, + alpha: bool = False, + store: None = None, + groups: bool = False, ) -> list[_StrType]: ... @overload def sort( self, name: _Key, - start: int | None = ..., - num: int | None = ..., - by: _Key | None = ..., - get: _Key | Sequence[_Key] | None = ..., - desc: bool = ..., - alpha: bool = ..., + start: int | None = None, + num: int | None = None, + by: _Key | None = None, + get: _Key | Sequence[_Key] | None = None, + desc: bool = False, + alpha: bool = False, *, store: _Key, - groups: bool = ..., + groups: bool = False, ) -> int: ... @overload def sort( @@ -605,64 +613,64 @@ class ListCommands(Generic[_StrType]): desc: bool, alpha: bool, store: _Key, - groups: bool = ..., + groups: bool = False, ) -> int: ... class AsyncListCommands(Generic[_StrType]): @overload - async def blpop(self, keys: _Value | Iterable[_Value], timeout: Literal[0] | None = ...) -> tuple[_StrType, _StrType]: ... + async def blpop(self, keys: _Value | Iterable[_Value], timeout: Literal[0] | None = 0) -> tuple[_StrType, _StrType]: ... @overload async def blpop(self, keys: _Value | Iterable[_Value], timeout: float) -> tuple[_StrType, _StrType] | None: ... @overload - async def brpop(self, keys: _Value | Iterable[_Value], timeout: Literal[0] | None = ...) -> tuple[_StrType, _StrType]: ... + async def brpop(self, keys: _Value | Iterable[_Value], timeout: Literal[0] | None = 0) -> tuple[_StrType, _StrType]: ... @overload async def brpop(self, keys: _Value | Iterable[_Value], timeout: float) -> tuple[_StrType, _StrType] | None: ... - async def brpoplpush(self, src, dst, timeout: int | None = ...): ... + async def brpoplpush(self, src, dst, timeout: int | None = 0): ... async def lindex(self, name: _Key, index: int) -> _StrType | None: ... async def linsert( self, name: _Key, where: Literal["BEFORE", "AFTER", "before", "after"], refvalue: _Value, value: _Value ) -> int: ... async def llen(self, name: _Key) -> int: ... - async def lpop(self, name, count: int | None = ...): ... + async def lpop(self, name, count: int | None = None): ... async def lpush(self, name: _Value, *values: _Value) -> int: ... async def lpushx(self, name, value): ... async def lrange(self, name: _Key, start: int, end: int) -> list[_StrType]: ... async def lrem(self, name: _Key, count: int, value: _Value) -> int: ... async def lset(self, name: _Key, index: int, value: _Value) -> bool: ... async def ltrim(self, name: _Key, start: int, end: int) -> bool: ... - async def rpop(self, name, count: int | None = ...): ... + async def rpop(self, name, count: int | None = None): ... async def rpoplpush(self, src, dst): ... async def rpush(self, name: _Value, *values: _Value) -> int: ... async def rpushx(self, name, value): ... async def lpos( - self, name, value, rank: Incomplete | None = ..., count: Incomplete | None = ..., maxlen: Incomplete | None = ... + self, name, value, rank: Incomplete | None = None, count: Incomplete | None = None, maxlen: Incomplete | None = None ): ... @overload async def sort( self, name: _Key, - start: int | None = ..., - num: int | None = ..., - by: _Key | None = ..., - get: _Key | Sequence[_Key] | None = ..., - desc: bool = ..., - alpha: bool = ..., - store: None = ..., - groups: bool = ..., + start: int | None = None, + num: int | None = None, + by: _Key | None = None, + get: _Key | Sequence[_Key] | None = None, + desc: bool = False, + alpha: bool = False, + store: None = None, + groups: bool = False, ) -> list[_StrType]: ... @overload async def sort( self, name: _Key, - start: int | None = ..., - num: int | None = ..., - by: _Key | None = ..., - get: _Key | Sequence[_Key] | None = ..., - desc: bool = ..., - alpha: bool = ..., + start: int | None = None, + num: int | None = None, + by: _Key | None = None, + get: _Key | Sequence[_Key] | None = None, + desc: bool = False, + alpha: bool = False, *, store: _Key, - groups: bool = ..., + groups: bool = False, ) -> int: ... @overload async def sort( @@ -675,42 +683,42 @@ class AsyncListCommands(Generic[_StrType]): desc: bool, alpha: bool, store: _Key, - groups: bool = ..., + groups: bool = False, ) -> int: ... class ScanCommands(Generic[_StrType]): def scan( self, - cursor: int = ..., - match: _Key | None = ..., - count: int | None = ..., - _type: str | None = ..., + cursor: int = 0, + match: _Key | None = None, + count: int | None = None, + _type: str | None = None, **kwargs: _CommandOptions, ) -> tuple[int, list[_StrType]]: ... def scan_iter( - self, match: _Key | None = ..., count: int | None = ..., _type: str | None = ..., **kwargs: _CommandOptions + self, match: _Key | None = None, count: int | None = None, _type: str | None = None, **kwargs: _CommandOptions ) -> Iterator[_StrType]: ... def sscan( - self, name: _Key, cursor: int = ..., match: _Key | None = ..., count: int | None = ... + self, name: _Key, cursor: int = 0, match: _Key | None = None, count: int | None = None ) -> tuple[int, list[_StrType]]: ... - def sscan_iter(self, name: _Key, match: _Key | None = ..., count: int | None = ...) -> Iterator[_StrType]: ... + def sscan_iter(self, name: _Key, match: _Key | None = None, count: int | None = None) -> Iterator[_StrType]: ... def hscan( - self, name: _Key, cursor: int = ..., match: _Key | None = ..., count: int | None = ... + self, name: _Key, cursor: int = 0, match: _Key | None = None, count: int | None = None ) -> tuple[int, dict[_StrType, _StrType]]: ... def hscan_iter( - self, name: _Key, match: _Key | None = ..., count: int | None = ... + self, name: _Key, match: _Key | None = None, count: int | None = None ) -> Iterator[tuple[_StrType, _StrType]]: ... @overload def zscan( - self, name: _Key, cursor: int = ..., match: _Key | None = ..., count: int | None = ... + self, name: _Key, cursor: int = 0, match: _Key | None = None, count: int | None = None ) -> tuple[int, list[tuple[_StrType, float]]]: ... @overload def zscan( self, name: _Key, - cursor: int = ..., - match: _Key | None = ..., - count: int | None = ..., + cursor: int = 0, + match: _Key | None = None, + count: int | None = None, *, score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn], ) -> tuple[int, list[tuple[_StrType, _ScoreCastFuncReturn]]]: ... @@ -724,13 +732,13 @@ class ScanCommands(Generic[_StrType]): score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn], ) -> tuple[int, list[tuple[_StrType, _ScoreCastFuncReturn]]]: ... @overload - def zscan_iter(self, name: _Key, match: _Key | None = ..., count: int | None = ...) -> Iterator[tuple[_StrType, float]]: ... + def zscan_iter(self, name: _Key, match: _Key | None = None, count: int | None = None) -> Iterator[tuple[_StrType, float]]: ... @overload def zscan_iter( self, name: _Key, - match: _Key | None = ..., - count: int | None = ..., + match: _Key | None = None, + count: int | None = None, *, score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn], ) -> Iterator[tuple[_StrType, _ScoreCastFuncReturn]]: ... @@ -742,36 +750,36 @@ class ScanCommands(Generic[_StrType]): class AsyncScanCommands(Generic[_StrType]): async def scan( self, - cursor: int = ..., - match: _Key | None = ..., - count: int | None = ..., - _type: str | None = ..., + cursor: int = 0, + match: _Key | None = None, + count: int | None = None, + _type: str | None = None, **kwargs: _CommandOptions, ) -> tuple[int, list[_StrType]]: ... def scan_iter( - self, match: _Key | None = ..., count: int | None = ..., _type: str | None = ..., **kwargs: _CommandOptions + self, match: _Key | None = None, count: int | None = None, _type: str | None = None, **kwargs: _CommandOptions ) -> AsyncIterator[_StrType]: ... async def sscan( - self, name: _Key, cursor: int = ..., match: _Key | None = ..., count: int | None = ... + self, name: _Key, cursor: int = 0, match: _Key | None = None, count: int | None = None ) -> tuple[int, list[_StrType]]: ... - def sscan_iter(self, name: _Key, match: _Key | None = ..., count: int | None = ...) -> AsyncIterator[_StrType]: ... + def sscan_iter(self, name: _Key, match: _Key | None = None, count: int | None = None) -> AsyncIterator[_StrType]: ... async def hscan( - self, name: _Key, cursor: int = ..., match: _Key | None = ..., count: int | None = ... + self, name: _Key, cursor: int = 0, match: _Key | None = None, count: int | None = None ) -> tuple[int, dict[_StrType, _StrType]]: ... def hscan_iter( - self, name: _Key, match: _Key | None = ..., count: int | None = ... + self, name: _Key, match: _Key | None = None, count: int | None = None ) -> AsyncIterator[tuple[_StrType, _StrType]]: ... @overload async def zscan( - self, name: _Key, cursor: int = ..., match: _Key | None = ..., count: int | None = ... + self, name: _Key, cursor: int = 0, match: _Key | None = None, count: int | None = None ) -> tuple[int, list[tuple[_StrType, float]]]: ... @overload async def zscan( self, name: _Key, - cursor: int = ..., - match: _Key | None = ..., - count: int | None = ..., + cursor: int = 0, + match: _Key | None = None, + count: int | None = None, *, score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn], ) -> tuple[int, list[tuple[_StrType, _ScoreCastFuncReturn]]]: ... @@ -786,14 +794,14 @@ class AsyncScanCommands(Generic[_StrType]): ) -> tuple[int, list[tuple[_StrType, _ScoreCastFuncReturn]]]: ... @overload def zscan_iter( - self, name: _Key, match: _Key | None = ..., count: int | None = ... + self, name: _Key, match: _Key | None = None, count: int | None = None ) -> AsyncIterator[tuple[_StrType, float]]: ... @overload def zscan_iter( self, name: _Key, - match: _Key | None = ..., - count: int | None = ..., + match: _Key | None = None, + count: int | None = None, *, score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn], ) -> AsyncIterator[tuple[_StrType, _ScoreCastFuncReturn]]: ... @@ -814,11 +822,11 @@ class SetCommands(Generic[_StrType]): def smismember(self, name, values, *args): ... def smove(self, src: _Key, dst: _Key, value: _Value) -> bool: ... @overload - def spop(self, name: _Key, count: None = ...) -> _Value | None: ... + def spop(self, name: _Key, count: None = None) -> _Value | None: ... @overload def spop(self, name: _Key, count: int) -> list[_Value]: ... @overload - def srandmember(self, name: _Key, number: None = ...) -> _Value | None: ... + def srandmember(self, name: _Key, number: None = None) -> _Value | None: ... @overload def srandmember(self, name: _Key, number: int) -> list[_Value]: ... def srem(self, name: _Key, *values: _Value) -> int: ... @@ -837,11 +845,11 @@ class AsyncSetCommands(Generic[_StrType]): async def smismember(self, name, values, *args): ... async def smove(self, src: _Key, dst: _Key, value: _Value) -> bool: ... @overload - async def spop(self, name: _Key, count: None = ...) -> _Value | None: ... + async def spop(self, name: _Key, count: None = None) -> _Value | None: ... @overload async def spop(self, name: _Key, count: int) -> list[_Value]: ... @overload - async def srandmember(self, name: _Key, number: None = ...) -> _Value | None: ... + async def srandmember(self, name: _Key, number: None = None) -> _Value | None: ... @overload async def srandmember(self, name: _Key, number: int) -> list[_Value]: ... async def srem(self, name: _Key, *values: _Value) -> int: ... @@ -854,12 +862,12 @@ class StreamCommands: self, name, fields, - id: str = ..., - maxlen=..., - approximate: bool = ..., - nomkstream: bool = ..., - minid: Incomplete | None = ..., - limit: Incomplete | None = ..., + id: str = "*", + maxlen=None, + approximate: bool = True, + nomkstream: bool = False, + minid: Incomplete | None = None, + limit: Incomplete | None = None, ): ... def xautoclaim( self, @@ -867,35 +875,51 @@ class StreamCommands: groupname, consumername, min_idle_time, - start_id: StreamIdT = ..., - count: Incomplete | None = ..., - justid: bool = ..., + start_id: StreamIdT = "0-0", + count: Incomplete | None = None, + justid: bool = False, ): ... def xclaim( - self, name, groupname, consumername, min_idle_time, message_ids, idle=..., time=..., retrycount=..., force=..., justid=... + self, + name, + groupname, + consumername, + min_idle_time, + message_ids, + idle=None, + time=None, + retrycount=None, + force=False, + justid=False, ): ... def xdel(self, name, *ids): ... - def xgroup_create(self, name, groupname, id: str = ..., mkstream: bool = ..., entries_read: int | None = ...): ... + def xgroup_create(self, name, groupname, id: str = "$", mkstream: bool = False, entries_read: int | None = None): ... def xgroup_delconsumer(self, name, groupname, consumername): ... def xgroup_destroy(self, name, groupname): ... def xgroup_createconsumer(self, name, groupname, consumername): ... - def xgroup_setid(self, name, groupname, id, entries_read: int | None = ...): ... + def xgroup_setid(self, name, groupname, id, entries_read: int | None = None): ... def xinfo_consumers(self, name, groupname): ... def xinfo_groups(self, name): ... - def xinfo_stream(self, name, full: bool = ...): ... + def xinfo_stream(self, name, full: bool = False): ... def xlen(self, name: _Key) -> int: ... def xpending(self, name, groupname): ... def xpending_range( - self, name: _Key, groupname, min, max, count: int, consumername: Incomplete | None = ..., idle: int | None = ... + self, name: _Key, groupname, min, max, count: int, consumername: Incomplete | None = None, idle: int | None = None ): ... - def xrange(self, name, min: str = ..., max: str = ..., count: Incomplete | None = ...): ... - def xread(self, streams, count: Incomplete | None = ..., block: Incomplete | None = ...): ... + def xrange(self, name, min: str = "-", max: str = "+", count: Incomplete | None = None): ... + def xread(self, streams, count: Incomplete | None = None, block: Incomplete | None = None): ... def xreadgroup( - self, groupname, consumername, streams, count: Incomplete | None = ..., block: Incomplete | None = ..., noack: bool = ... + self, + groupname, + consumername, + streams, + count: Incomplete | None = None, + block: Incomplete | None = None, + noack: bool = False, ): ... - def xrevrange(self, name, max: str = ..., min: str = ..., count: Incomplete | None = ...): ... + def xrevrange(self, name, max: str = "+", min: str = "-", count: Incomplete | None = None): ... def xtrim( - self, name, maxlen: int | None = ..., approximate: bool = ..., minid: Incomplete | None = ..., limit: int | None = ... + self, name, maxlen: int | None = None, approximate: bool = True, minid: Incomplete | None = None, limit: int | None = None ): ... class AsyncStreamCommands: @@ -904,12 +928,12 @@ class AsyncStreamCommands: self, name, fields, - id: str = ..., - maxlen=..., - approximate: bool = ..., - nomkstream: bool = ..., - minid: Incomplete | None = ..., - limit: Incomplete | None = ..., + id: str = "*", + maxlen=None, + approximate: bool = True, + nomkstream: bool = False, + minid: Incomplete | None = None, + limit: Incomplete | None = None, ): ... async def xautoclaim( self, @@ -917,35 +941,51 @@ class AsyncStreamCommands: groupname, consumername, min_idle_time, - start_id: StreamIdT = ..., - count: Incomplete | None = ..., - justid: bool = ..., + start_id: StreamIdT = "0-0", + count: Incomplete | None = None, + justid: bool = False, ): ... async def xclaim( - self, name, groupname, consumername, min_idle_time, message_ids, idle=..., time=..., retrycount=..., force=..., justid=... + self, + name, + groupname, + consumername, + min_idle_time, + message_ids, + idle=None, + time=None, + retrycount=None, + force=False, + justid=False, ): ... async def xdel(self, name, *ids): ... - async def xgroup_create(self, name, groupname, id: str = ..., mkstream: bool = ..., entries_read: int | None = ...): ... + async def xgroup_create(self, name, groupname, id: str = "$", mkstream: bool = False, entries_read: int | None = None): ... async def xgroup_delconsumer(self, name, groupname, consumername): ... async def xgroup_destroy(self, name, groupname): ... async def xgroup_createconsumer(self, name, groupname, consumername): ... - async def xgroup_setid(self, name, groupname, id, entries_read: int | None = ...): ... + async def xgroup_setid(self, name, groupname, id, entries_read: int | None = None): ... async def xinfo_consumers(self, name, groupname): ... async def xinfo_groups(self, name): ... - async def xinfo_stream(self, name, full: bool = ...): ... + async def xinfo_stream(self, name, full: bool = False): ... async def xlen(self, name: _Key) -> int: ... async def xpending(self, name, groupname): ... async def xpending_range( - self, name: _Key, groupname, min, max, count: int, consumername: Incomplete | None = ..., idle: int | None = ... + self, name: _Key, groupname, min, max, count: int, consumername: Incomplete | None = None, idle: int | None = None ): ... - async def xrange(self, name, min: str = ..., max: str = ..., count: Incomplete | None = ...): ... - async def xread(self, streams, count: Incomplete | None = ..., block: Incomplete | None = ...): ... + async def xrange(self, name, min: str = "-", max: str = "+", count: Incomplete | None = None): ... + async def xread(self, streams, count: Incomplete | None = None, block: Incomplete | None = None): ... async def xreadgroup( - self, groupname, consumername, streams, count: Incomplete | None = ..., block: Incomplete | None = ..., noack: bool = ... + self, + groupname, + consumername, + streams, + count: Incomplete | None = None, + block: Incomplete | None = None, + noack: bool = False, ): ... - async def xrevrange(self, name, max: str = ..., min: str = ..., count: Incomplete | None = ...): ... + async def xrevrange(self, name, max: str = "+", min: str = "-", count: Incomplete | None = None): ... async def xtrim( - self, name, maxlen: int | None = ..., approximate: bool = ..., minid: Incomplete | None = ..., limit: int | None = ... + self, name, maxlen: int | None = None, approximate: bool = True, minid: Incomplete | None = None, limit: int | None = None ): ... class SortedSetCommands(Generic[_StrType]): @@ -953,30 +993,30 @@ class SortedSetCommands(Generic[_StrType]): self, name: _Key, mapping: Mapping[_Key, _Value], - nx: bool = ..., - xx: bool = ..., - ch: bool = ..., - incr: bool = ..., - gt: Incomplete | None = ..., - lt: Incomplete | None = ..., + nx: bool = False, + xx: bool = False, + ch: bool = False, + incr: bool = False, + gt: Incomplete | None = False, + lt: Incomplete | None = False, ) -> int: ... def zcard(self, name: _Key) -> int: ... def zcount(self, name: _Key, min: _Value, max: _Value) -> int: ... - def zdiff(self, keys, withscores: bool = ...): ... + def zdiff(self, keys, withscores: bool = False): ... def zdiffstore(self, dest, keys): ... def zincrby(self, name: _Key, amount: float, value: _Value) -> float: ... - def zinter(self, keys, aggregate: Incomplete | None = ..., withscores: bool = ...): ... - def zinterstore(self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] | None = ...) -> int: ... + def zinter(self, keys, aggregate: Incomplete | None = None, withscores: bool = False): ... + def zinterstore(self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] | None = None) -> int: ... def zlexcount(self, name: _Key, min: _Value, max: _Value) -> int: ... - def zpopmax(self, name: _Key, count: int | None = ...) -> list[tuple[_StrType, float]]: ... - def zpopmin(self, name: _Key, count: int | None = ...) -> list[tuple[_StrType, float]]: ... - def zrandmember(self, key, count: Incomplete | None = ..., withscores: bool = ...): ... + def zpopmax(self, name: _Key, count: int | None = None) -> list[tuple[_StrType, float]]: ... + def zpopmin(self, name: _Key, count: int | None = None) -> list[tuple[_StrType, float]]: ... + def zrandmember(self, key, count: Incomplete | None = None, withscores: bool = False): ... @overload - def bzpopmax(self, keys: _Key | Iterable[_Key], timeout: Literal[0] = ...) -> tuple[_StrType, _StrType, float]: ... + def bzpopmax(self, keys: _Key | Iterable[_Key], timeout: Literal[0] = 0) -> tuple[_StrType, _StrType, float]: ... @overload def bzpopmax(self, keys: _Key | Iterable[_Key], timeout: float) -> tuple[_StrType, _StrType, float] | None: ... @overload - def bzpopmin(self, keys: _Key | Iterable[_Key], timeout: Literal[0] = ...) -> tuple[_StrType, _StrType, float]: ... + def bzpopmin(self, keys: _Key | Iterable[_Key], timeout: Literal[0] = 0) -> tuple[_StrType, _StrType, float]: ... @overload def bzpopmin(self, keys: _Key | Iterable[_Key], timeout: float) -> tuple[_StrType, _StrType, float] | None: ... @overload @@ -988,10 +1028,10 @@ class SortedSetCommands(Generic[_StrType]): desc: bool, withscores: Literal[True], score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn], - byscore: bool = ..., - bylex: bool = ..., - offset: int | None = ..., - num: int | None = ..., + byscore: bool = False, + bylex: bool = False, + offset: int | None = None, + num: int | None = None, ) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ... @overload def zrange( @@ -1002,10 +1042,10 @@ class SortedSetCommands(Generic[_StrType]): desc: bool, withscores: Literal[True], score_cast_func: Callable[[_StrType], float] = ..., - byscore: bool = ..., - bylex: bool = ..., - offset: int | None = ..., - num: int | None = ..., + byscore: bool = False, + bylex: bool = False, + offset: int | None = None, + num: int | None = None, ) -> list[tuple[_StrType, float]]: ... @overload def zrange( @@ -1016,10 +1056,10 @@ class SortedSetCommands(Generic[_StrType]): *, withscores: Literal[True], score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn], - byscore: bool = ..., - bylex: bool = ..., - offset: int | None = ..., - num: int | None = ..., + byscore: bool = False, + bylex: bool = False, + offset: int | None = None, + num: int | None = None, ) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ... @overload def zrange( @@ -1030,10 +1070,10 @@ class SortedSetCommands(Generic[_StrType]): *, withscores: Literal[True], score_cast_func: Callable[[_StrType], float] = ..., - byscore: bool = ..., - bylex: bool = ..., - offset: int | None = ..., - num: int | None = ..., + byscore: bool = False, + bylex: bool = False, + offset: int | None = None, + num: int | None = None, ) -> list[tuple[_StrType, float]]: ... @overload def zrange( @@ -1041,13 +1081,13 @@ class SortedSetCommands(Generic[_StrType]): name: _Key, start: int, end: int, - desc: bool = ..., - withscores: bool = ..., + desc: bool = False, + withscores: bool = False, score_cast_func: Callable[[_StrType], Any] = ..., - byscore: bool = ..., - bylex: bool = ..., - offset: int | None = ..., - num: int | None = ..., + byscore: bool = False, + bylex: bool = False, + offset: int | None = None, + num: int | None = None, ) -> list[_StrType]: ... @overload def zrevrange( @@ -1062,7 +1102,7 @@ class SortedSetCommands(Generic[_StrType]): def zrevrange(self, name: _Key, start: int, end: int, withscores: Literal[True]) -> list[tuple[_StrType, float]]: ... @overload def zrevrange( - self, name: _Key, start: int, end: int, withscores: bool = ..., score_cast_func: Callable[[Any], Any] = ... + self, name: _Key, start: int, end: int, withscores: bool = False, score_cast_func: Callable[[Any], Any] = ... ) -> list[_StrType]: ... def zrangestore( self, @@ -1070,17 +1110,17 @@ class SortedSetCommands(Generic[_StrType]): name, start, end, - byscore: bool = ..., - bylex: bool = ..., - desc: bool = ..., - offset: Incomplete | None = ..., - num: Incomplete | None = ..., + byscore: bool = False, + bylex: bool = False, + desc: bool = False, + offset: Incomplete | None = None, + num: Incomplete | None = None, ): ... def zrangebylex( - self, name: _Key, min: _Value, max: _Value, start: int | None = ..., num: int | None = ... + self, name: _Key, min: _Value, max: _Value, start: int | None = None, num: int | None = None ) -> list[_StrType]: ... def zrevrangebylex( - self, name: _Key, max: _Value, min: _Value, start: int | None = ..., num: int | None = ... + self, name: _Key, max: _Value, min: _Value, start: int | None = None, num: int | None = None ) -> list[_StrType]: ... @overload def zrangebyscore( @@ -1088,15 +1128,15 @@ class SortedSetCommands(Generic[_StrType]): name: _Key, min: _Value, max: _Value, - start: int | None = ..., - num: int | None = ..., + start: int | None = None, + num: int | None = None, *, withscores: Literal[True], score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn], ) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ... @overload def zrangebyscore( - self, name: _Key, min: _Value, max: _Value, start: int | None = ..., num: int | None = ..., *, withscores: Literal[True] + self, name: _Key, min: _Value, max: _Value, start: int | None = None, num: int | None = None, *, withscores: Literal[True] ) -> list[tuple[_StrType, float]]: ... @overload def zrangebyscore( @@ -1104,9 +1144,9 @@ class SortedSetCommands(Generic[_StrType]): name: _Key, min: _Value, max: _Value, - start: int | None = ..., - num: int | None = ..., - withscores: bool = ..., + start: int | None = None, + num: int | None = None, + withscores: bool = False, score_cast_func: Callable[[_StrType], Any] = ..., ) -> list[_StrType]: ... @overload @@ -1115,15 +1155,15 @@ class SortedSetCommands(Generic[_StrType]): name: _Key, max: _Value, min: _Value, - start: int | None = ..., - num: int | None = ..., + start: int | None = None, + num: int | None = None, *, withscores: Literal[True], score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn], ) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ... @overload def zrevrangebyscore( - self, name: _Key, max: _Value, min: _Value, start: int | None = ..., num: int | None = ..., *, withscores: Literal[True] + self, name: _Key, max: _Value, min: _Value, start: int | None = None, num: int | None = None, *, withscores: Literal[True] ) -> list[tuple[_StrType, float]]: ... @overload def zrevrangebyscore( @@ -1131,9 +1171,9 @@ class SortedSetCommands(Generic[_StrType]): name: _Key, max: _Value, min: _Value, - start: int | None = ..., - num: int | None = ..., - withscores: bool = ..., + start: int | None = None, + num: int | None = None, + withscores: bool = False, score_cast_func: Callable[[_StrType], Any] = ..., ) -> list[_StrType]: ... def zrank(self, name: _Key, value: _Value) -> int | None: ... @@ -1143,8 +1183,8 @@ class SortedSetCommands(Generic[_StrType]): def zremrangebyscore(self, name: _Key, min: _Value, max: _Value) -> int: ... def zrevrank(self, name: _Key, value: _Value) -> int | None: ... def zscore(self, name: _Key, value: _Value) -> float | None: ... - def zunion(self, keys, aggregate: Incomplete | None = ..., withscores: bool = ...): ... - def zunionstore(self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] | None = ...) -> int: ... + def zunion(self, keys, aggregate: Incomplete | None = None, withscores: bool = False): ... + def zunionstore(self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] | None = None) -> int: ... def zmscore(self, key, members): ... class AsyncSortedSetCommands(Generic[_StrType]): @@ -1152,32 +1192,32 @@ class AsyncSortedSetCommands(Generic[_StrType]): self, name: _Key, mapping: Mapping[_Key, _Value], - nx: bool = ..., - xx: bool = ..., - ch: bool = ..., - incr: bool = ..., - gt: Incomplete | None = ..., - lt: Incomplete | None = ..., + nx: bool = False, + xx: bool = False, + ch: bool = False, + incr: bool = False, + gt: Incomplete | None = False, + lt: Incomplete | None = False, ) -> int: ... async def zcard(self, name: _Key) -> int: ... async def zcount(self, name: _Key, min: _Value, max: _Value) -> int: ... - async def zdiff(self, keys, withscores: bool = ...): ... + async def zdiff(self, keys, withscores: bool = False): ... async def zdiffstore(self, dest, keys): ... async def zincrby(self, name: _Key, amount: float, value: _Value) -> float: ... - async def zinter(self, keys, aggregate: Incomplete | None = ..., withscores: bool = ...): ... + async def zinter(self, keys, aggregate: Incomplete | None = None, withscores: bool = False): ... async def zinterstore( - self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] | None = ... + self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] | None = None ) -> int: ... async def zlexcount(self, name: _Key, min: _Value, max: _Value) -> int: ... - async def zpopmax(self, name: _Key, count: int | None = ...) -> list[tuple[_StrType, float]]: ... - async def zpopmin(self, name: _Key, count: int | None = ...) -> list[tuple[_StrType, float]]: ... - async def zrandmember(self, key, count: Incomplete | None = ..., withscores: bool = ...): ... + async def zpopmax(self, name: _Key, count: int | None = None) -> list[tuple[_StrType, float]]: ... + async def zpopmin(self, name: _Key, count: int | None = None) -> list[tuple[_StrType, float]]: ... + async def zrandmember(self, key, count: Incomplete | None = None, withscores: bool = False): ... @overload - async def bzpopmax(self, keys: _Key | Iterable[_Key], timeout: Literal[0] = ...) -> tuple[_StrType, _StrType, float]: ... + async def bzpopmax(self, keys: _Key | Iterable[_Key], timeout: Literal[0] = 0) -> tuple[_StrType, _StrType, float]: ... @overload async def bzpopmax(self, keys: _Key | Iterable[_Key], timeout: float) -> tuple[_StrType, _StrType, float] | None: ... @overload - async def bzpopmin(self, keys: _Key | Iterable[_Key], timeout: Literal[0] = ...) -> tuple[_StrType, _StrType, float]: ... + async def bzpopmin(self, keys: _Key | Iterable[_Key], timeout: Literal[0] = 0) -> tuple[_StrType, _StrType, float]: ... @overload async def bzpopmin(self, keys: _Key | Iterable[_Key], timeout: float) -> tuple[_StrType, _StrType, float] | None: ... @overload @@ -1189,10 +1229,10 @@ class AsyncSortedSetCommands(Generic[_StrType]): desc: bool, withscores: Literal[True], score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn], - byscore: bool = ..., - bylex: bool = ..., - offset: int | None = ..., - num: int | None = ..., + byscore: bool = False, + bylex: bool = False, + offset: int | None = None, + num: int | None = None, ) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ... @overload async def zrange( @@ -1203,10 +1243,10 @@ class AsyncSortedSetCommands(Generic[_StrType]): desc: bool, withscores: Literal[True], score_cast_func: Callable[[_StrType], float] = ..., - byscore: bool = ..., - bylex: bool = ..., - offset: int | None = ..., - num: int | None = ..., + byscore: bool = False, + bylex: bool = False, + offset: int | None = None, + num: int | None = None, ) -> list[tuple[_StrType, float]]: ... @overload async def zrange( @@ -1214,14 +1254,14 @@ class AsyncSortedSetCommands(Generic[_StrType]): name: _Key, start: int, end: int, - desc: bool = ..., + desc: bool = False, *, withscores: Literal[True], score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn], - byscore: bool = ..., - bylex: bool = ..., - offset: int | None = ..., - num: int | None = ..., + byscore: bool = False, + bylex: bool = False, + offset: int | None = None, + num: int | None = None, ) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ... @overload async def zrange( @@ -1229,14 +1269,14 @@ class AsyncSortedSetCommands(Generic[_StrType]): name: _Key, start: int, end: int, - desc: bool = ..., + desc: bool = False, *, withscores: Literal[True], score_cast_func: Callable[[_StrType], float] = ..., - byscore: bool = ..., - bylex: bool = ..., - offset: int | None = ..., - num: int | None = ..., + byscore: bool = False, + bylex: bool = False, + offset: int | None = None, + num: int | None = None, ) -> list[tuple[_StrType, float]]: ... @overload async def zrange( @@ -1244,13 +1284,13 @@ class AsyncSortedSetCommands(Generic[_StrType]): name: _Key, start: int, end: int, - desc: bool = ..., - withscores: bool = ..., + desc: bool = False, + withscores: bool = False, score_cast_func: Callable[[_StrType], Any] = ..., - byscore: bool = ..., - bylex: bool = ..., - offset: int | None = ..., - num: int | None = ..., + byscore: bool = False, + bylex: bool = False, + offset: int | None = None, + num: int | None = None, ) -> list[_StrType]: ... @overload async def zrevrange( @@ -1265,7 +1305,7 @@ class AsyncSortedSetCommands(Generic[_StrType]): async def zrevrange(self, name: _Key, start: int, end: int, withscores: Literal[True]) -> list[tuple[_StrType, float]]: ... @overload async def zrevrange( - self, name: _Key, start: int, end: int, withscores: bool = ..., score_cast_func: Callable[[Any], Any] = ... + self, name: _Key, start: int, end: int, withscores: bool = False, score_cast_func: Callable[[Any], Any] = ... ) -> list[_StrType]: ... async def zrangestore( self, @@ -1273,17 +1313,17 @@ class AsyncSortedSetCommands(Generic[_StrType]): name, start, end, - byscore: bool = ..., - bylex: bool = ..., - desc: bool = ..., - offset: Incomplete | None = ..., - num: Incomplete | None = ..., + byscore: bool = False, + bylex: bool = False, + desc: bool = False, + offset: Incomplete | None = None, + num: Incomplete | None = None, ): ... async def zrangebylex( - self, name: _Key, min: _Value, max: _Value, start: int | None = ..., num: int | None = ... + self, name: _Key, min: _Value, max: _Value, start: int | None = None, num: int | None = None ) -> list[_StrType]: ... async def zrevrangebylex( - self, name: _Key, max: _Value, min: _Value, start: int | None = ..., num: int | None = ... + self, name: _Key, max: _Value, min: _Value, start: int | None = None, num: int | None = None ) -> list[_StrType]: ... @overload async def zrangebyscore( @@ -1291,15 +1331,15 @@ class AsyncSortedSetCommands(Generic[_StrType]): name: _Key, min: _Value, max: _Value, - start: int | None = ..., - num: int | None = ..., + start: int | None = None, + num: int | None = None, *, withscores: Literal[True], score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn], ) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ... @overload async def zrangebyscore( - self, name: _Key, min: _Value, max: _Value, start: int | None = ..., num: int | None = ..., *, withscores: Literal[True] + self, name: _Key, min: _Value, max: _Value, start: int | None = None, num: int | None = None, *, withscores: Literal[True] ) -> list[tuple[_StrType, float]]: ... @overload async def zrangebyscore( @@ -1307,9 +1347,9 @@ class AsyncSortedSetCommands(Generic[_StrType]): name: _Key, min: _Value, max: _Value, - start: int | None = ..., - num: int | None = ..., - withscores: bool = ..., + start: int | None = None, + num: int | None = None, + withscores: bool = False, score_cast_func: Callable[[_StrType], Any] = ..., ) -> list[_StrType]: ... @overload @@ -1318,15 +1358,15 @@ class AsyncSortedSetCommands(Generic[_StrType]): name: _Key, max: _Value, min: _Value, - start: int | None = ..., - num: int | None = ..., + start: int | None = None, + num: int | None = None, *, withscores: Literal[True], score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn], ) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ... @overload async def zrevrangebyscore( - self, name: _Key, max: _Value, min: _Value, start: int | None = ..., num: int | None = ..., *, withscores: Literal[True] + self, name: _Key, max: _Value, min: _Value, start: int | None = None, num: int | None = None, *, withscores: Literal[True] ) -> list[tuple[_StrType, float]]: ... @overload async def zrevrangebyscore( @@ -1334,9 +1374,9 @@ class AsyncSortedSetCommands(Generic[_StrType]): name: _Key, max: _Value, min: _Value, - start: int | None = ..., - num: int | None = ..., - withscores: bool = ..., + start: int | None = None, + num: int | None = None, + withscores: bool = False, score_cast_func: Callable[[_StrType], Any] = ..., ) -> list[_StrType]: ... async def zrank(self, name: _Key, value: _Value) -> int | None: ... @@ -1346,9 +1386,9 @@ class AsyncSortedSetCommands(Generic[_StrType]): async def zremrangebyscore(self, name: _Key, min: _Value, max: _Value) -> int: ... async def zrevrank(self, name: _Key, value: _Value) -> int | None: ... async def zscore(self, name: _Key, value: _Value) -> float | None: ... - async def zunion(self, keys, aggregate: Incomplete | None = ..., withscores: bool = ...): ... + async def zunion(self, keys, aggregate: Incomplete | None = None, withscores: bool = False): ... async def zunionstore( - self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] | None = ... + self, dest: _Key, keys: Iterable[_Key], aggregate: Literal["SUM", "MIN", "MAX"] | None = None ) -> int: ... async def zmscore(self, key, members): ... @@ -1367,18 +1407,20 @@ class HashCommands(Generic[_StrType]): def hexists(self, name: _Key, key: _Key) -> bool: ... def hget(self, name: _Key, key: _Key) -> _StrType | None: ... def hgetall(self, name: _Key) -> dict[_StrType, _StrType]: ... - def hincrby(self, name: _Key, key: _Key, amount: int = ...) -> int: ... - def hincrbyfloat(self, name: _Key, key: _Key, amount: float = ...) -> float: ... + def hincrby(self, name: _Key, key: _Key, amount: int = 1) -> int: ... + def hincrbyfloat(self, name: _Key, key: _Key, amount: float = 1.0) -> float: ... def hkeys(self, name: _Key) -> list[_StrType]: ... def hlen(self, name: _Key) -> int: ... @overload def hset( - self, name: _Key, key: _Key, value: _Value, mapping: Mapping[_Key, _Value] | None = ..., items: Incomplete | None = ... + self, name: _Key, key: _Key, value: _Value, mapping: Mapping[_Key, _Value] | None = None, items: Incomplete | None = None ) -> int: ... @overload - def hset(self, name: _Key, key: None, value: None, mapping: Mapping[_Key, _Value], items: Incomplete | None = ...) -> int: ... + def hset( + self, name: _Key, key: None, value: None, mapping: Mapping[_Key, _Value], items: Incomplete | None = None + ) -> int: ... @overload - def hset(self, name: _Key, *, mapping: Mapping[_Key, _Value], items: Incomplete | None = ...) -> int: ... + def hset(self, name: _Key, *, mapping: Mapping[_Key, _Value], items: Incomplete | None = None) -> int: ... def hsetnx(self, name: _Key, key: _Key, value: _Value) -> int: ... def hmset(self, name: _Key, mapping: Mapping[_Key, _Value]) -> bool: ... def hmget(self, name: _Key, keys: _Key | Iterable[_Key], *args: _Key) -> list[_StrType | None]: ... @@ -1390,20 +1432,20 @@ class AsyncHashCommands(Generic[_StrType]): async def hexists(self, name: _Key, key: _Key) -> bool: ... async def hget(self, name: _Key, key: _Key) -> _StrType | None: ... async def hgetall(self, name: _Key) -> dict[_StrType, _StrType]: ... - async def hincrby(self, name: _Key, key: _Key, amount: int = ...) -> int: ... - async def hincrbyfloat(self, name: _Key, key: _Key, amount: float = ...) -> float: ... + async def hincrby(self, name: _Key, key: _Key, amount: int = 1) -> int: ... + async def hincrbyfloat(self, name: _Key, key: _Key, amount: float = 1.0) -> float: ... async def hkeys(self, name: _Key) -> list[_StrType]: ... async def hlen(self, name: _Key) -> int: ... @overload async def hset( - self, name: _Key, key: _Key, value: _Value, mapping: Mapping[_Key, _Value] | None = ..., items: Incomplete | None = ... + self, name: _Key, key: _Key, value: _Value, mapping: Mapping[_Key, _Value] | None = None, items: Incomplete | None = None ) -> int: ... @overload async def hset( - self, name: _Key, key: None, value: None, mapping: Mapping[_Key, _Value], items: Incomplete | None = ... + self, name: _Key, key: None, value: None, mapping: Mapping[_Key, _Value], items: Incomplete | None = None ) -> int: ... @overload - async def hset(self, name: _Key, *, mapping: Mapping[_Key, _Value], items: Incomplete | None = ...) -> int: ... + async def hset(self, name: _Key, *, mapping: Mapping[_Key, _Value], items: Incomplete | None = None) -> int: ... async def hsetnx(self, name: _Key, key: _Key, value: _Value) -> int: ... async def hmset(self, name: _Key, mapping: Mapping[_Key, _Value]) -> bool: ... async def hmget(self, name: _Key, keys: _Key | Iterable[_Key], *args: _Key) -> list[_StrType | None]: ... @@ -1413,18 +1455,18 @@ class AsyncHashCommands(Generic[_StrType]): class AsyncScript: def __init__(self, registered_client: AsyncRedis[Any], script: ScriptTextT) -> None: ... async def __call__( - self, keys: Sequence[KeyT] | None = ..., args: Iterable[EncodableT] | None = ..., client: AsyncRedis[Any] | None = ... + self, keys: Sequence[KeyT] | None = None, args: Iterable[EncodableT] | None = None, client: AsyncRedis[Any] | None = None ): ... class PubSubCommands: def publish(self, channel: _Key, message: _Key, **kwargs: _CommandOptions) -> int: ... - def pubsub_channels(self, pattern: _Key = ..., **kwargs: _CommandOptions) -> list[str]: ... + def pubsub_channels(self, pattern: _Key = "*", **kwargs: _CommandOptions) -> list[str]: ... def pubsub_numpat(self, **kwargs: _CommandOptions) -> int: ... def pubsub_numsub(self, *args: _Key, **kwargs: _CommandOptions) -> list[tuple[str, int]]: ... class AsyncPubSubCommands: async def publish(self, channel: _Key, message: _Key, **kwargs: _CommandOptions) -> int: ... - async def pubsub_channels(self, pattern: _Key = ..., **kwargs: _CommandOptions) -> list[str]: ... + async def pubsub_channels(self, pattern: _Key = "*", **kwargs: _CommandOptions) -> list[str]: ... async def pubsub_numpat(self, **kwargs: _CommandOptions) -> int: ... async def pubsub_numsub(self, *args: _Key, **kwargs: _CommandOptions) -> list[tuple[str, int]]: ... @@ -1433,7 +1475,7 @@ class ScriptCommands(Generic[_StrType]): def evalsha(self, sha, numkeys, *keys_and_args): ... def script_exists(self, *args): ... def script_debug(self, *args): ... - def script_flush(self, sync_type: Incomplete | None = ...): ... + def script_flush(self, sync_type: Incomplete | None = None): ... def script_kill(self): ... def script_load(self, script): ... def register_script(self, script: str | _StrType) -> Script: ... @@ -1443,14 +1485,14 @@ class AsyncScriptCommands(Generic[_StrType]): async def evalsha(self, sha, numkeys, *keys_and_args): ... async def script_exists(self, *args): ... async def script_debug(self, *args): ... - async def script_flush(self, sync_type: Incomplete | None = ...): ... + async def script_flush(self, sync_type: Incomplete | None = None): ... async def script_kill(self): ... async def script_load(self, script): ... def register_script(self, script: ScriptTextT) -> AsyncScript: ... # type: ignore[override] class GeoCommands: - def geoadd(self, name, values, nx: bool = ..., xx: bool = ..., ch: bool = ...): ... - def geodist(self, name, place1, place2, unit: Incomplete | None = ...): ... + def geoadd(self, name, values, nx: bool = False, xx: bool = False, ch: bool = False): ... + def geodist(self, name, place1, place2, unit: Incomplete | None = None): ... def geohash(self, name, *values): ... def geopos(self, name, *values): ... def georadius( @@ -1459,68 +1501,68 @@ class GeoCommands: longitude, latitude, radius, - unit: Incomplete | None = ..., - withdist: bool = ..., - withcoord: bool = ..., - withhash: bool = ..., - count: Incomplete | None = ..., - sort: Incomplete | None = ..., - store: Incomplete | None = ..., - store_dist: Incomplete | None = ..., - any: bool = ..., + unit: Incomplete | None = None, + withdist: bool = False, + withcoord: bool = False, + withhash: bool = False, + count: Incomplete | None = None, + sort: Incomplete | None = None, + store: Incomplete | None = None, + store_dist: Incomplete | None = None, + any: bool = False, ): ... def georadiusbymember( self, name, member, radius, - unit: Incomplete | None = ..., - withdist: bool = ..., - withcoord: bool = ..., - withhash: bool = ..., - count: Incomplete | None = ..., - sort: Incomplete | None = ..., - store: Incomplete | None = ..., - store_dist: Incomplete | None = ..., - any: bool = ..., + unit: Incomplete | None = None, + withdist: bool = False, + withcoord: bool = False, + withhash: bool = False, + count: Incomplete | None = None, + sort: Incomplete | None = None, + store: Incomplete | None = None, + store_dist: Incomplete | None = None, + any: bool = False, ): ... def geosearch( self, name, - member: Incomplete | None = ..., - longitude: Incomplete | None = ..., - latitude: Incomplete | None = ..., - unit: str = ..., - radius: Incomplete | None = ..., - width: Incomplete | None = ..., - height: Incomplete | None = ..., - sort: Incomplete | None = ..., - count: Incomplete | None = ..., - any: bool = ..., - withcoord: bool = ..., - withdist: bool = ..., - withhash: bool = ..., + member: Incomplete | None = None, + longitude: Incomplete | None = None, + latitude: Incomplete | None = None, + unit: str = "m", + radius: Incomplete | None = None, + width: Incomplete | None = None, + height: Incomplete | None = None, + sort: Incomplete | None = None, + count: Incomplete | None = None, + any: bool = False, + withcoord: bool = False, + withdist: bool = False, + withhash: bool = False, ): ... def geosearchstore( self, dest, name, - member: Incomplete | None = ..., - longitude: Incomplete | None = ..., - latitude: Incomplete | None = ..., - unit: str = ..., - radius: Incomplete | None = ..., - width: Incomplete | None = ..., - height: Incomplete | None = ..., - sort: Incomplete | None = ..., - count: Incomplete | None = ..., - any: bool = ..., - storedist: bool = ..., + member: Incomplete | None = None, + longitude: Incomplete | None = None, + latitude: Incomplete | None = None, + unit: str = "m", + radius: Incomplete | None = None, + width: Incomplete | None = None, + height: Incomplete | None = None, + sort: Incomplete | None = None, + count: Incomplete | None = None, + any: bool = False, + storedist: bool = False, ): ... class AsyncGeoCommands: - async def geoadd(self, name, values, nx: bool = ..., xx: bool = ..., ch: bool = ...): ... - async def geodist(self, name, place1, place2, unit: Incomplete | None = ...): ... + async def geoadd(self, name, values, nx: bool = False, xx: bool = False, ch: bool = False): ... + async def geodist(self, name, place1, place2, unit: Incomplete | None = None): ... async def geohash(self, name, *values): ... async def geopos(self, name, *values): ... async def georadius( @@ -1529,63 +1571,63 @@ class AsyncGeoCommands: longitude, latitude, radius, - unit: Incomplete | None = ..., - withdist: bool = ..., - withcoord: bool = ..., - withhash: bool = ..., - count: Incomplete | None = ..., - sort: Incomplete | None = ..., - store: Incomplete | None = ..., - store_dist: Incomplete | None = ..., - any: bool = ..., + unit: Incomplete | None = None, + withdist: bool = False, + withcoord: bool = False, + withhash: bool = False, + count: Incomplete | None = None, + sort: Incomplete | None = None, + store: Incomplete | None = None, + store_dist: Incomplete | None = None, + any: bool = False, ): ... async def georadiusbymember( self, name, member, radius, - unit: Incomplete | None = ..., - withdist: bool = ..., - withcoord: bool = ..., - withhash: bool = ..., - count: Incomplete | None = ..., - sort: Incomplete | None = ..., - store: Incomplete | None = ..., - store_dist: Incomplete | None = ..., - any: bool = ..., + unit: Incomplete | None = None, + withdist: bool = False, + withcoord: bool = False, + withhash: bool = False, + count: Incomplete | None = None, + sort: Incomplete | None = None, + store: Incomplete | None = None, + store_dist: Incomplete | None = None, + any: bool = False, ): ... async def geosearch( self, name, - member: Incomplete | None = ..., - longitude: Incomplete | None = ..., - latitude: Incomplete | None = ..., - unit: str = ..., - radius: Incomplete | None = ..., - width: Incomplete | None = ..., - height: Incomplete | None = ..., - sort: Incomplete | None = ..., - count: Incomplete | None = ..., - any: bool = ..., - withcoord: bool = ..., - withdist: bool = ..., - withhash: bool = ..., + member: Incomplete | None = None, + longitude: Incomplete | None = None, + latitude: Incomplete | None = None, + unit: str = "m", + radius: Incomplete | None = None, + width: Incomplete | None = None, + height: Incomplete | None = None, + sort: Incomplete | None = None, + count: Incomplete | None = None, + any: bool = False, + withcoord: bool = False, + withdist: bool = False, + withhash: bool = False, ): ... async def geosearchstore( self, dest, name, - member: Incomplete | None = ..., - longitude: Incomplete | None = ..., - latitude: Incomplete | None = ..., - unit: str = ..., - radius: Incomplete | None = ..., - width: Incomplete | None = ..., - height: Incomplete | None = ..., - sort: Incomplete | None = ..., - count: Incomplete | None = ..., - any: bool = ..., - storedist: bool = ..., + member: Incomplete | None = None, + longitude: Incomplete | None = None, + latitude: Incomplete | None = None, + unit: str = "m", + radius: Incomplete | None = None, + width: Incomplete | None = None, + height: Incomplete | None = None, + sort: Incomplete | None = None, + count: Incomplete | None = None, + any: bool = False, + storedist: bool = False, ): ... class ModuleCommands: @@ -1599,13 +1641,13 @@ class ModuleCommands: class Script: def __init__(self, registered_client, script) -> None: ... - def __call__(self, keys=..., args=..., client: Incomplete | None = ...): ... + def __call__(self, keys=[], args=[], client: Incomplete | None = None): ... class BitFieldOperation: - def __init__(self, client, key, default_overflow: Incomplete | None = ...): ... + def __init__(self, client, key, default_overflow: Incomplete | None = None): ... def reset(self) -> None: ... def overflow(self, overflow): ... - def incrby(self, fmt, offset, increment, overflow: Incomplete | None = ...): ... + def incrby(self, fmt, offset, increment, overflow: Incomplete | None = None): ... def get(self, fmt, offset): ... def set(self, fmt, offset, value): ... @property @@ -1626,26 +1668,28 @@ class AsyncClusterCommands: async def readonly(self, **kwargs: _CommandOptions) -> bool: ... class FunctionCommands: - def function_load(self, code: str, replace: bool | None = ...) -> Awaitable[str] | str: ... + def function_load(self, code: str, replace: bool | None = False) -> Awaitable[str] | str: ... def function_delete(self, library: str) -> Awaitable[str] | str: ... - def function_flush(self, mode: str = ...) -> Awaitable[str] | str: ... - def function_list(self, library: str | None = ..., withcode: bool | None = ...) -> Awaitable[list[Any]] | list[Any]: ... + def function_flush(self, mode: str = "SYNC") -> Awaitable[str] | str: ... + def function_list(self, library: str | None = "*", withcode: bool | None = False) -> Awaitable[list[Any]] | list[Any]: ... def fcall(self, function, numkeys: int, *keys_and_args: list[Any] | None) -> Awaitable[str] | str: ... def fcall_ro(self, function, numkeys: int, *keys_and_args: list[Any] | None) -> Awaitable[str] | str: ... def function_dump(self) -> Awaitable[str] | str: ... - def function_restore(self, payload: str, policy: str | None = ...) -> Awaitable[str] | str: ... + def function_restore(self, payload: str, policy: str | None = "APPEND") -> Awaitable[str] | str: ... def function_kill(self) -> Awaitable[str] | str: ... def function_stats(self) -> Awaitable[list[Any]] | list[Any]: ... class AsyncFunctionCommands: - async def function_load(self, code: str, replace: bool | None = ...) -> Awaitable[str] | str: ... + async def function_load(self, code: str, replace: bool | None = False) -> Awaitable[str] | str: ... async def function_delete(self, library: str) -> Awaitable[str] | str: ... - async def function_flush(self, mode: str = ...) -> Awaitable[str] | str: ... - async def function_list(self, library: str | None = ..., withcode: bool | None = ...) -> Awaitable[list[Any]] | list[Any]: ... + async def function_flush(self, mode: str = "SYNC") -> Awaitable[str] | str: ... + async def function_list( + self, library: str | None = "*", withcode: bool | None = False + ) -> Awaitable[list[Any]] | list[Any]: ... async def fcall(self, function, numkeys: int, *keys_and_args: list[Any] | None) -> Awaitable[str] | str: ... async def fcall_ro(self, function, numkeys: int, *keys_and_args: list[Any] | None) -> Awaitable[str] | str: ... async def function_dump(self) -> Awaitable[str] | str: ... - async def function_restore(self, payload: str, policy: str | None = ...) -> Awaitable[str] | str: ... + async def function_restore(self, payload: str, policy: str | None = "APPEND") -> Awaitable[str] | str: ... async def function_kill(self) -> Awaitable[str] | str: ... async def function_stats(self) -> Awaitable[list[Any]] | list[Any]: ... diff --git a/stubs/redis/redis/commands/graph/__init__.pyi b/stubs/redis/redis/commands/graph/__init__.pyi index 2586aedbc39e..a8209b8dc7c1 100644 --- a/stubs/redis/redis/commands/graph/__init__.pyi +++ b/stubs/redis/redis/commands/graph/__init__.pyi @@ -20,7 +20,7 @@ class Graph(GraphCommands): def get_property(self, idx): ... def add_node(self, node) -> None: ... def add_edge(self, edge) -> None: ... - def call_procedure(self, procedure, *args, read_only: bool = ..., **kwagrs): ... + def call_procedure(self, procedure, *args, read_only: bool = False, **kwagrs): ... def labels(self): ... def relationship_types(self): ... def property_keys(self): ... diff --git a/stubs/redis/redis/commands/graph/commands.pyi b/stubs/redis/redis/commands/graph/commands.pyi index b5ccf8519752..b57418dddaed 100644 --- a/stubs/redis/redis/commands/graph/commands.pyi +++ b/stubs/redis/redis/commands/graph/commands.pyi @@ -5,16 +5,21 @@ class GraphCommands: def commit(self): ... version: Any def query( - self, q, params: Incomplete | None = ..., timeout: Incomplete | None = ..., read_only: bool = ..., profile: bool = ... + self, + q, + params: Incomplete | None = None, + timeout: Incomplete | None = None, + read_only: bool = False, + profile: bool = False, ): ... def merge(self, pattern): ... def delete(self): ... nodes: Any edges: Any def flush(self) -> None: ... - def explain(self, query, params: Incomplete | None = ...): ... + def explain(self, query, params: Incomplete | None = None): ... def bulk(self, **kwargs) -> None: ... def profile(self, query): ... def slowlog(self): ... - def config(self, name, value: Incomplete | None = ..., set: bool = ...): ... + def config(self, name, value: Incomplete | None = None, set: bool = False): ... def list_keys(self): ... diff --git a/stubs/redis/redis/commands/graph/edge.pyi b/stubs/redis/redis/commands/graph/edge.pyi index 159755792e21..3bd36b65f409 100644 --- a/stubs/redis/redis/commands/graph/edge.pyi +++ b/stubs/redis/redis/commands/graph/edge.pyi @@ -8,7 +8,7 @@ class Edge: src_node: Any dest_node: Any def __init__( - self, src_node, relation, dest_node, edge_id: Incomplete | None = ..., properties: Incomplete | None = ... + self, src_node, relation, dest_node, edge_id: Incomplete | None = None, properties: Incomplete | None = None ) -> None: ... def to_string(self): ... def __eq__(self, rhs): ... diff --git a/stubs/redis/redis/commands/graph/node.pyi b/stubs/redis/redis/commands/graph/node.pyi index 9160daee9bc7..e7a65537b130 100644 --- a/stubs/redis/redis/commands/graph/node.pyi +++ b/stubs/redis/redis/commands/graph/node.pyi @@ -9,10 +9,10 @@ class Node: properties: Any def __init__( self, - node_id: Incomplete | None = ..., - alias: Incomplete | None = ..., - label: str | list[str] | None = ..., - properties: Incomplete | None = ..., + node_id: Incomplete | None = None, + alias: Incomplete | None = None, + label: str | list[str] | None = None, + properties: Incomplete | None = None, ) -> None: ... def to_string(self): ... def __eq__(self, rhs): ... diff --git a/stubs/redis/redis/commands/graph/query_result.pyi b/stubs/redis/redis/commands/graph/query_result.pyi index 53cf3ebf44f7..446d67196fe4 100644 --- a/stubs/redis/redis/commands/graph/query_result.pyi +++ b/stubs/redis/redis/commands/graph/query_result.pyi @@ -37,7 +37,7 @@ class QueryResult: graph: Any header: Any result_set: Any - def __init__(self, graph, response, profile: bool = ...) -> None: ... + def __init__(self, graph, response, profile: bool = False) -> None: ... def parse_results(self, raw_result_set) -> None: ... statistics: Any def parse_statistics(self, raw_statistics) -> None: ... diff --git a/stubs/redis/redis/commands/helpers.pyi b/stubs/redis/redis/commands/helpers.pyi index ec1bb28b21fb..b4e5ac7f7677 100644 --- a/stubs/redis/redis/commands/helpers.pyi +++ b/stubs/redis/redis/commands/helpers.pyi @@ -4,7 +4,7 @@ def delist(x): ... def parse_to_list(response): ... def parse_list_to_dict(response): ... def parse_to_dict(response): ... -def random_string(length: int = ...) -> str: ... +def random_string(length: int = 10) -> str: ... def quote_string(v): ... def decode_dict_keys(obj): ... def stringify_param_value(value): ... diff --git a/stubs/redis/redis/commands/json/__init__.pyi b/stubs/redis/redis/commands/json/__init__.pyi index ef69aceb6cb0..f9e8825b9a9e 100644 --- a/stubs/redis/redis/commands/json/__init__.pyi +++ b/stubs/redis/redis/commands/json/__init__.pyi @@ -9,7 +9,7 @@ class JSON(JSONCommands): client: Any execute_command: Any MODULE_VERSION: Incomplete | None - def __init__(self, client, version: Incomplete | None = ..., decoder=..., encoder=...) -> None: ... - def pipeline(self, transaction: bool = ..., shard_hint: Incomplete | None = ...) -> Pipeline: ... + def __init__(self, client, version: Incomplete | None = None, decoder=..., encoder=...) -> None: ... + def pipeline(self, transaction: bool = True, shard_hint: Incomplete | None = None) -> Pipeline: ... class Pipeline(JSONCommands, ClientPipeline[Incomplete]): ... # type: ignore[misc] diff --git a/stubs/redis/redis/commands/json/commands.pyi b/stubs/redis/redis/commands/json/commands.pyi index d86d7287b8a7..38d4d4c6c6a9 100644 --- a/stubs/redis/redis/commands/json/commands.pyi +++ b/stubs/redis/redis/commands/json/commands.pyi @@ -1,32 +1,32 @@ from _typeshed import Incomplete class JSONCommands: - def arrappend(self, name: str, path: str | None = ..., *args) -> list[int | None]: ... + def arrappend(self, name: str, path: str | None = ".", *args) -> list[int | None]: ... def arrindex( self, name: str, path: str, scalar: int, start: int | None = None, stop: int | None = None ) -> list[int | None]: ... def arrinsert(self, name: str, path: str, index: int, *args) -> list[int | None]: ... - def arrlen(self, name: str, path: str | None = ...) -> list[int | None]: ... - def arrpop(self, name: str, path: str | None = ..., index: int | None = -1) -> list[str | None]: ... + def arrlen(self, name: str, path: str | None = ".") -> list[int | None]: ... + def arrpop(self, name: str, path: str | None = ".", index: int | None = -1) -> list[str | None]: ... def arrtrim(self, name: str, path: str, start: int, stop: int) -> list[int | None]: ... - def type(self, name: str, path: str | None = ...) -> list[str]: ... - def resp(self, name: str, path: str | None = ...) -> list[Incomplete]: ... - def objkeys(self, name, path=...): ... - def objlen(self, name, path=...): ... + def type(self, name: str, path: str | None = ".") -> list[str]: ... + def resp(self, name: str, path: str | None = ".") -> list[Incomplete]: ... + def objkeys(self, name, path="."): ... + def objlen(self, name, path="."): ... def numincrby(self, name, path, number): ... def nummultby(self, name, path, number): ... - def clear(self, name, path=...): ... - def delete(self, key, path=...): ... + def clear(self, name, path="."): ... + def delete(self, key, path="."): ... forget = delete - def get(self, name, *args, no_escape: bool = ...): ... + def get(self, name, *args, no_escape: bool = False): ... def mget(self, keys, path): ... - def set(self, name, path, obj, nx: bool = ..., xx: bool = ..., decode_keys: bool = ...): ... - def set_file(self, name, path, file_name, nx: bool = ..., xx: bool = ..., decode_keys: bool = ...): ... - def set_path(self, json_path, root_folder, nx: bool = ..., xx: bool = ..., decode_keys: bool = ...): ... - def strlen(self, name, path: Incomplete | None = ...): ... - def toggle(self, name, path=...): ... - def strappend(self, name, value, path=...): ... - def debug(self, subcommand, key: Incomplete | None = ..., path=...): ... + def set(self, name, path, obj, nx: bool = False, xx: bool = False, decode_keys: bool = False): ... + def set_file(self, name, path, file_name, nx: bool = False, xx: bool = False, decode_keys: bool = False): ... + def set_path(self, json_path, root_folder, nx: bool = False, xx: bool = False, decode_keys: bool = False): ... + def strlen(self, name, path: Incomplete | None = None): ... + def toggle(self, name, path="."): ... + def strappend(self, name, value, path="."): ... + def debug(self, subcommand, key: Incomplete | None = None, path="."): ... def jsonget(self, *args, **kwargs): ... def jsonmget(self, *args, **kwargs): ... def jsonset(self, *args, **kwargs): ... diff --git a/stubs/redis/redis/commands/redismodules.pyi b/stubs/redis/redis/commands/redismodules.pyi index 6f535b2315fb..6de03ef3edd7 100644 --- a/stubs/redis/redis/commands/redismodules.pyi +++ b/stubs/redis/redis/commands/redismodules.pyi @@ -4,11 +4,11 @@ from .timeseries import TimeSeries class RedisModuleCommands: def json(self, encoder=..., decoder=...) -> JSON: ... - def ft(self, index_name: str = ...) -> Search: ... + def ft(self, index_name: str = "idx") -> Search: ... def ts(self) -> TimeSeries: ... def bf(self): ... def cf(self): ... def cms(self): ... def topk(self): ... def tdigest(self): ... - def graph(self, index_name: str = ...): ... + def graph(self, index_name: str = "idx"): ... diff --git a/stubs/redis/redis/commands/search/__init__.pyi b/stubs/redis/redis/commands/search/__init__.pyi index d62721a01e73..3366d4516c95 100644 --- a/stubs/redis/redis/commands/search/__init__.pyi +++ b/stubs/redis/redis/commands/search/__init__.pyi @@ -4,19 +4,19 @@ from .commands import SearchCommands class Search(SearchCommands): class BatchIndexer: - def __init__(self, client, chunk_size: int = ...) -> None: ... + def __init__(self, client, chunk_size: int = 1000) -> None: ... def add_document( self, doc_id, - nosave: bool = ..., - score: float = ..., - payload: Incomplete | None = ..., - replace: bool = ..., - partial: bool = ..., - no_create: bool = ..., + nosave: bool = False, + score: float = 1.0, + payload: Incomplete | None = None, + replace: bool = False, + partial: bool = False, + no_create: bool = False, **fields, ): ... - def add_document_hash(self, doc_id, score: float = ..., replace: bool = ...): ... + def add_document_hash(self, doc_id, score: float = 1.0, replace: bool = False): ... def commit(self): ... - def __init__(self, client, index_name: str = ...) -> None: ... + def __init__(self, client, index_name: str = "idx") -> None: ... diff --git a/stubs/redis/redis/commands/search/aggregation.pyi b/stubs/redis/redis/commands/search/aggregation.pyi index 0ccd50523891..854be852d3d4 100644 --- a/stubs/redis/redis/commands/search/aggregation.pyi +++ b/stubs/redis/redis/commands/search/aggregation.pyi @@ -6,7 +6,7 @@ FIELDNAME: Any class Limit: offset: Any count: Any - def __init__(self, offset: int = ..., count: int = ...) -> None: ... + def __init__(self, offset: int = 0, count: int = 0) -> None: ... def build_args(self): ... class Reducer: @@ -28,7 +28,7 @@ class Desc(SortDirection): DIRSTRING: ClassVar[Literal["DESC"]] class AggregateRequest: - def __init__(self, query: str = ...) -> None: ... + def __init__(self, query: str = "*") -> None: ... def load(self, *fields): ... def group_by(self, fields, *reducers): ... def apply(self, **kwexpr): ... @@ -37,7 +37,7 @@ class AggregateRequest: def filter(self, expressions): ... def with_schema(self): ... def verbatim(self): ... - def cursor(self, count: int = ..., max_idle: float = ...): ... + def cursor(self, count: int = 0, max_idle: float = 0.0): ... def build_args(self): ... class Cursor: diff --git a/stubs/redis/redis/commands/search/commands.pyi b/stubs/redis/redis/commands/search/commands.pyi index 29777c63820c..63995e758b1f 100644 --- a/stubs/redis/redis/commands/search/commands.pyi +++ b/stubs/redis/redis/commands/search/commands.pyi @@ -50,49 +50,49 @@ FUZZY: Literal["FUZZY"] WITHPAYLOADS: Literal["WITHPAYLOADS"] class SearchCommands: - def batch_indexer(self, chunk_size: int = ...): ... + def batch_indexer(self, chunk_size: int = 100): ... def create_index( self, fields, - no_term_offsets: bool = ..., - no_field_flags: bool = ..., - stopwords: Incomplete | None = ..., - definition: Incomplete | None = ..., - max_text_fields: bool = ..., # added in 4.1.1 - temporary: Incomplete | None = ..., # added in 4.1.1 - no_highlight: bool = ..., # added in 4.1.1 - no_term_frequencies: bool = ..., # added in 4.1.1 - skip_initial_scan: bool = ..., # added in 4.1.1 + no_term_offsets: bool = False, + no_field_flags: bool = False, + stopwords: Incomplete | None = None, + definition: Incomplete | None = None, + max_text_fields: bool = False, # added in 4.1.1 + temporary: Incomplete | None = None, # added in 4.1.1 + no_highlight: bool = False, # added in 4.1.1 + no_term_frequencies: bool = False, # added in 4.1.1 + skip_initial_scan: bool = False, # added in 4.1.1 ): ... def alter_schema_add(self, fields): ... - def dropindex(self, delete_documents: bool = ...): ... + def dropindex(self, delete_documents: bool = False): ... def add_document( self, doc_id, - nosave: bool = ..., - score: float = ..., - payload: Incomplete | None = ..., - replace: bool = ..., - partial: bool = ..., - language: Incomplete | None = ..., - no_create: bool = ..., + nosave: bool = False, + score: float = 1.0, + payload: Incomplete | None = None, + replace: bool = False, + partial: bool = False, + language: Incomplete | None = None, + no_create: bool = False, **fields, ): ... - def add_document_hash(self, doc_id, score: float = ..., language: Incomplete | None = ..., replace: bool = ...): ... - def delete_document(self, doc_id, conn: Incomplete | None = ..., delete_actual_document: bool = ...): ... + def add_document_hash(self, doc_id, score: float = 1.0, language: Incomplete | None = None, replace: bool = False): ... + def delete_document(self, doc_id, conn: Incomplete | None = None, delete_actual_document: bool = False): ... def load_document(self, id): ... def get(self, *ids): ... def info(self): ... def get_params_args(self, query_params: _QueryParams) -> list[Any]: ... - def search(self, query: str | Query, query_params: _QueryParams | None = ...) -> Result: ... - def explain(self, query: str | Query, query_params: _QueryParams | None = ...): ... + def search(self, query: str | Query, query_params: _QueryParams | None = None) -> Result: ... + def explain(self, query: str | Query, query_params: _QueryParams | None = None): ... def explain_cli(self, query): ... - def aggregate(self, query: AggregateRequest | Cursor, query_params: _QueryParams | None = ...) -> AggregateResult: ... + def aggregate(self, query: AggregateRequest | Cursor, query_params: _QueryParams | None = None) -> AggregateResult: ... def profile( - self, query: str | Query | AggregateRequest, limited: bool = ..., query_params: Mapping[str, str | float] | None = ... + self, query: str | Query | AggregateRequest, limited: bool = False, query_params: Mapping[str, str | float] | None = None ) -> tuple[Incomplete, Incomplete]: ... def spellcheck( - self, query, distance: Incomplete | None = ..., include: Incomplete | None = ..., exclude: Incomplete | None = ... + self, query, distance: Incomplete | None = None, include: Incomplete | None = None, exclude: Incomplete | None = None ): ... def dict_add(self, name, *terms): ... def dict_del(self, name, *terms): ... @@ -106,6 +106,6 @@ class SearchCommands: def sugadd(self, key, *suggestions, **kwargs): ... def suglen(self, key): ... def sugdel(self, key, string): ... - def sugget(self, key, prefix, fuzzy: bool = ..., num: int = ..., with_scores: bool = ..., with_payloads: bool = ...): ... - def synupdate(self, groupid, skipinitial: bool = ..., *terms): ... + def sugget(self, key, prefix, fuzzy: bool = False, num: int = 10, with_scores: bool = False, with_payloads: bool = False): ... + def synupdate(self, groupid, skipinitial: bool = False, *terms): ... def syndump(self): ... diff --git a/stubs/redis/redis/commands/search/query.pyi b/stubs/redis/redis/commands/search/query.pyi index e88f2a565951..eb1846bab957 100644 --- a/stubs/redis/redis/commands/search/query.pyi +++ b/stubs/redis/redis/commands/search/query.pyi @@ -6,15 +6,15 @@ class Query: def query_string(self): ... def limit_ids(self, *ids): ... def return_fields(self, *fields): ... - def return_field(self, field, as_field: Incomplete | None = ...): ... + def return_field(self, field, as_field: Incomplete | None = None): ... def summarize( self, - fields: Incomplete | None = ..., - context_len: Incomplete | None = ..., - num_frags: Incomplete | None = ..., - sep: Incomplete | None = ..., + fields: Incomplete | None = None, + context_len: Incomplete | None = None, + num_frags: Incomplete | None = None, + sep: Incomplete | None = None, ): ... - def highlight(self, fields: Incomplete | None = ..., tags: Incomplete | None = ...): ... + def highlight(self, fields: Incomplete | None = None, tags: Incomplete | None = None): ... def language(self, language): ... def slop(self, slop): ... def in_order(self): ... @@ -28,7 +28,7 @@ class Query: def with_scores(self): ... def limit_fields(self, *fields): ... def add_filter(self, flt): ... - def sort_by(self, field, asc: bool = ...): ... + def sort_by(self, field, asc: bool = True): ... def expander(self, expander): ... class Filter: @@ -38,15 +38,15 @@ class Filter: class NumericFilter(Filter): INF: str NEG_INF: str - def __init__(self, field, minval, maxval, minExclusive: bool = ..., maxExclusive: bool = ...) -> None: ... + def __init__(self, field, minval, maxval, minExclusive: bool = False, maxExclusive: bool = False) -> None: ... class GeoFilter(Filter): METERS: str KILOMETERS: str FEET: str MILES: str - def __init__(self, field, lon, lat, radius, unit=...) -> None: ... + def __init__(self, field, lon, lat, radius, unit="km") -> None: ... class SortbyField: args: Any - def __init__(self, field, asc: bool = ...) -> None: ... + def __init__(self, field, asc: bool = True) -> None: ... diff --git a/stubs/redis/redis/commands/search/result.pyi b/stubs/redis/redis/commands/search/result.pyi index 2908b9a61dc6..046c31705b5c 100644 --- a/stubs/redis/redis/commands/search/result.pyi +++ b/stubs/redis/redis/commands/search/result.pyi @@ -4,4 +4,4 @@ class Result: total: Any duration: Any docs: Any - def __init__(self, res, hascontent, duration: int = ..., has_payload: bool = ..., with_scores: bool = ...) -> None: ... + def __init__(self, res, hascontent, duration: int = 0, has_payload: bool = False, with_scores: bool = False) -> None: ... diff --git a/stubs/redis/redis/commands/timeseries/__init__.pyi b/stubs/redis/redis/commands/timeseries/__init__.pyi index 425d3a4ca038..95457d6fe4dd 100644 --- a/stubs/redis/redis/commands/timeseries/__init__.pyi +++ b/stubs/redis/redis/commands/timeseries/__init__.pyi @@ -8,7 +8,7 @@ class TimeSeries(TimeSeriesCommands): MODULE_CALLBACKS: dict[str, Any] client: Any execute_command: Any - def __init__(self, client: Incomplete | None = ..., **kwargs) -> None: ... - def pipeline(self, transaction: bool = ..., shard_hint: Incomplete | None = ...) -> Pipeline: ... + def __init__(self, client: Incomplete | None = None, **kwargs) -> None: ... + def pipeline(self, transaction: bool = True, shard_hint: Incomplete | None = None) -> Pipeline: ... class Pipeline(TimeSeriesCommands, ClientPipeline[Incomplete]): ... # type: ignore[misc] diff --git a/stubs/redis/redis/commands/timeseries/commands.pyi b/stubs/redis/redis/commands/timeseries/commands.pyi index dc15c85064b9..989542c9c62e 100644 --- a/stubs/redis/redis/commands/timeseries/commands.pyi +++ b/stubs/redis/redis/commands/timeseries/commands.pyi @@ -24,55 +24,55 @@ class TimeSeriesCommands: def create( self, key: _Key, - retention_msecs: int | None = ..., - uncompressed: bool | None = ..., - labels: dict[str, str] | None = ..., - chunk_size: int | None = ..., - duplicate_policy: str | None = ..., + retention_msecs: int | None = None, + uncompressed: bool | None = False, + labels: dict[str, str] | None = None, + chunk_size: int | None = None, + duplicate_policy: str | None = None, ): ... def alter( self, key: _Key, - retention_msecs: int | None = ..., - labels: dict[str, str] | None = ..., - chunk_size: int | None = ..., - duplicate_policy: str | None = ..., + retention_msecs: int | None = None, + labels: dict[str, str] | None = None, + chunk_size: int | None = None, + duplicate_policy: str | None = None, ): ... def add( self, key: _Key, timestamp: int | str, value: float, - retention_msecs: int | None = ..., - uncompressed: bool | None = ..., - labels: dict[str, str] | None = ..., - chunk_size: int | None = ..., - duplicate_policy: str | None = ..., + retention_msecs: int | None = None, + uncompressed: bool | None = False, + labels: dict[str, str] | None = None, + chunk_size: int | None = None, + duplicate_policy: str | None = None, ): ... def madd(self, ktv_tuples): ... def incrby( self, key: _Key, value: float, - timestamp: int | str | None = ..., - retention_msecs: int | None = ..., - uncompressed: bool | None = ..., - labels: dict[str, str] | None = ..., - chunk_size: int | None = ..., + timestamp: int | str | None = None, + retention_msecs: int | None = None, + uncompressed: bool | None = False, + labels: dict[str, str] | None = None, + chunk_size: int | None = None, ): ... def decrby( self, key: _Key, value: float, - timestamp: int | str | None = ..., - retention_msecs: int | None = ..., - uncompressed: bool | None = ..., - labels: dict[str, str] | None = ..., - chunk_size: int | None = ..., + timestamp: int | str | None = None, + retention_msecs: int | None = None, + uncompressed: bool | None = False, + labels: dict[str, str] | None = None, + chunk_size: int | None = None, ): ... def delete(self, key, from_time, to_time): ... def createrule( - self, source_key: _Key, dest_key: _Key, aggregation_type: str, bucket_size_msec: int, align_timestamp: int | None = ... + self, source_key: _Key, dest_key: _Key, aggregation_type: str, bucket_size_msec: int, align_timestamp: int | None = None ): ... def deleterule(self, source_key, dest_key): ... def range( @@ -80,76 +80,80 @@ class TimeSeriesCommands: key: _Key, from_time: int | str, to_time: int | str, - count: int | None = ..., - aggregation_type: str | None = ..., - bucket_size_msec: int | None = ..., - filter_by_ts: list[int] | None = ..., - filter_by_min_value: int | None = ..., - filter_by_max_value: int | None = ..., - align: int | str | None = ..., - latest: bool | None = ..., - bucket_timestamp: str | None = ..., - empty: bool | None = ..., + count: int | None = None, + aggregation_type: str | None = None, + bucket_size_msec: int | None = 0, + filter_by_ts: list[int] | None = None, + filter_by_min_value: int | None = None, + filter_by_max_value: int | None = None, + align: int | str | None = None, + latest: bool | None = False, + bucket_timestamp: str | None = None, + empty: bool | None = False, ): ... def revrange( self, key: _Key, from_time: int | str, to_time: int | str, - count: int | None = ..., - aggregation_type: str | None = ..., - bucket_size_msec: int | None = ..., - filter_by_ts: list[int] | None = ..., - filter_by_min_value: int | None = ..., - filter_by_max_value: int | None = ..., - align: int | str | None = ..., - latest: bool | None = ..., - bucket_timestamp: str | None = ..., - empty: bool | None = ..., + count: int | None = None, + aggregation_type: str | None = None, + bucket_size_msec: int | None = 0, + filter_by_ts: list[int] | None = None, + filter_by_min_value: int | None = None, + filter_by_max_value: int | None = None, + align: int | str | None = None, + latest: bool | None = False, + bucket_timestamp: str | None = None, + empty: bool | None = False, ): ... def mrange( self, from_time: int | str, to_time: int | str, filters: list[str], - count: int | None = ..., - aggregation_type: str | None = ..., - bucket_size_msec: int | None = ..., - with_labels: bool | None = ..., - filter_by_ts: list[int] | None = ..., - filter_by_min_value: int | None = ..., - filter_by_max_value: int | None = ..., - groupby: str | None = ..., - reduce: str | None = ..., - select_labels: list[str] | None = ..., - align: int | str | None = ..., - latest: bool | None = ..., - bucket_timestamp: str | None = ..., - empty: bool | None = ..., + count: int | None = None, + aggregation_type: str | None = None, + bucket_size_msec: int | None = 0, + with_labels: bool | None = False, + filter_by_ts: list[int] | None = None, + filter_by_min_value: int | None = None, + filter_by_max_value: int | None = None, + groupby: str | None = None, + reduce: str | None = None, + select_labels: list[str] | None = None, + align: int | str | None = None, + latest: bool | None = False, + bucket_timestamp: str | None = None, + empty: bool | None = False, ): ... def mrevrange( self, from_time: int | str, to_time: int | str, filters: list[str], - count: int | None = ..., - aggregation_type: str | None = ..., - bucket_size_msec: int | None = ..., - with_labels: bool | None = ..., - filter_by_ts: list[int] | None = ..., - filter_by_min_value: int | None = ..., - filter_by_max_value: int | None = ..., - groupby: str | None = ..., - reduce: str | None = ..., - select_labels: list[str] | None = ..., - align: int | str | None = ..., - latest: bool | None = ..., - bucket_timestamp: str | None = ..., - empty: bool | None = ..., + count: int | None = None, + aggregation_type: str | None = None, + bucket_size_msec: int | None = 0, + with_labels: bool | None = False, + filter_by_ts: list[int] | None = None, + filter_by_min_value: int | None = None, + filter_by_max_value: int | None = None, + groupby: str | None = None, + reduce: str | None = None, + select_labels: list[str] | None = None, + align: int | str | None = None, + latest: bool | None = False, + bucket_timestamp: str | None = None, + empty: bool | None = False, ): ... - def get(self, key: _Key, latest: bool | None = ...): ... + def get(self, key: _Key, latest: bool | None = False): ... def mget( - self, filters: list[str], with_labels: bool | None = ..., select_labels: list[str] | None = ..., latest: bool | None = ... + self, + filters: list[str], + with_labels: bool | None = False, + select_labels: list[str] | None = None, + latest: bool | None = False, ): ... def info(self, key): ... def queryindex(self, filters): ... diff --git a/stubs/redis/redis/connection.pyi b/stubs/redis/redis/connection.pyi index 8d98efcad9d7..f6840ee580af 100644 --- a/stubs/redis/redis/connection.pyi +++ b/stubs/redis/redis/connection.pyi @@ -57,7 +57,7 @@ class PythonParser(BaseParser): def on_connect(self, connection: Connection) -> None: ... def on_disconnect(self) -> None: ... def can_read(self, timeout: float | None) -> bool: ... - def read_response(self, disable_decoding: bool = ...) -> Any: ... # `str | bytes` or `list[str | bytes]` + def read_response(self, disable_decoding: bool = False) -> Any: ... # `str | bytes` or `list[str | bytes]` class HiredisParser(BaseParser): socket_read_size: int @@ -66,8 +66,8 @@ class HiredisParser(BaseParser): def on_connect(self, connection: Connection, **kwargs) -> None: ... def on_disconnect(self) -> None: ... def can_read(self, timeout: float | None) -> bool: ... - def read_from_socket(self, timeout: float | None = ..., raise_on_timeout: bool = ...) -> bool: ... - def read_response(self, disable_decoding: bool = ...) -> Any: ... # `str | bytes` or `list[str | bytes]` + def read_from_socket(self, timeout: float | None = ..., raise_on_timeout: bool = True) -> bool: ... + def read_response(self, disable_decoding: bool = False) -> Any: ... # `str | bytes` or `list[str | bytes]` DefaultParser: type[BaseParser] # Hiredis or PythonParser @@ -79,7 +79,7 @@ class Encoder: decode_responses: bool def __init__(self, encoding: str, encoding_errors: str, decode_responses: bool) -> None: ... def encode(self, value: _Encodable) -> bytes: ... - def decode(self, value: str | bytes | memoryview, force: bool = ...) -> str: ... + def decode(self, value: str | bytes | memoryview, force: bool = False) -> str: ... class AbstractConnection: pid: int @@ -182,18 +182,18 @@ class SSLConnection(Connection): ssl_ocsp_expected_cert: Incomplete | None # added in 4.1.1 def __init__( self, - ssl_keyfile=..., - ssl_certfile=..., - ssl_cert_reqs=..., - ssl_ca_certs=..., - ssl_ca_data: Incomplete | None = ..., - ssl_check_hostname: bool = ..., - ssl_ca_path: Incomplete | None = ..., - ssl_password: Incomplete | None = ..., - ssl_validate_ocsp: bool = ..., - ssl_validate_ocsp_stapled: bool = ..., # added in 4.1.1 - ssl_ocsp_context: Incomplete | None = ..., # added in 4.1.1 - ssl_ocsp_expected_cert: Incomplete | None = ..., # added in 4.1.1 + ssl_keyfile=None, + ssl_certfile=None, + ssl_cert_reqs="required", + ssl_ca_certs=None, + ssl_ca_data: Incomplete | None = None, + ssl_check_hostname: bool = False, + ssl_ca_path: Incomplete | None = None, + ssl_password: Incomplete | None = None, + ssl_validate_ocsp: bool = False, + ssl_validate_ocsp_stapled: bool = False, # added in 4.1.1 + ssl_ocsp_context: Incomplete | None = None, # added in 4.1.1 + ssl_ocsp_expected_cert: Incomplete | None = None, # added in 4.1.1 *, host: str = "localhost", port: int = 6379, @@ -254,13 +254,13 @@ class ConnectionPool: @classmethod def from_url(cls, url: str, *, db: int = ..., decode_components: bool = ..., **kwargs) -> Self: ... def __init__( - self, connection_class: type[Connection] = ..., max_connections: int | None = ..., **connection_kwargs + self, connection_class: type[Connection] = ..., max_connections: int | None = None, **connection_kwargs ) -> None: ... def reset(self) -> None: ... def get_connection(self, command_name: Unused, *keys, **options: _ConnectionPoolOptions) -> Connection: ... def make_connection(self) -> Connection: ... def release(self, connection: Connection) -> None: ... - def disconnect(self, inuse_connections: bool = ...) -> None: ... + def disconnect(self, inuse_connections: bool = True) -> None: ... def get_encoder(self) -> Encoder: ... def owns_connection(self, connection: Connection) -> bool: ... @@ -270,8 +270,8 @@ class BlockingConnectionPool(ConnectionPool): pool: Queue[Connection | None] # might not be defined def __init__( self, - max_connections: int = ..., - timeout: float = ..., + max_connections: int = 50, + timeout: float = 20, connection_class: type[Connection] = ..., queue_class: type[Queue[Any]] = ..., **connection_kwargs, diff --git a/stubs/redis/redis/crc.pyi b/stubs/redis/redis/crc.pyi index 87585a3fda31..cfd7e8fe83cf 100644 --- a/stubs/redis/redis/crc.pyi +++ b/stubs/redis/redis/crc.pyi @@ -2,4 +2,4 @@ from redis.typing import EncodedT REDIS_CLUSTER_HASH_SLOTS: int -def key_slot(key: EncodedT, bucket: int = ...) -> int: ... +def key_slot(key: EncodedT, bucket: int = 16384) -> int: ... diff --git a/stubs/redis/redis/credentials.pyi b/stubs/redis/redis/credentials.pyi index aecf728a9ae6..7a2d78ecb0cf 100644 --- a/stubs/redis/redis/credentials.pyi +++ b/stubs/redis/redis/credentials.pyi @@ -7,5 +7,5 @@ class CredentialProvider: class UsernamePasswordCredentialProvider(CredentialProvider): username: str password: str - def __init__(self, username: str | None = ..., password: str | None = ...) -> None: ... + def __init__(self, username: str | None = None, password: str | None = None) -> None: ... def get_credentials(self) -> tuple[str] | tuple[str, str]: ... diff --git a/stubs/redis/redis/lock.pyi b/stubs/redis/redis/lock.pyi index 63c461d68c8c..3bbb410aed53 100644 --- a/stubs/redis/redis/lock.pyi +++ b/stubs/redis/redis/lock.pyi @@ -27,11 +27,11 @@ class Lock: self, redis: Redis[Any], name: str, - timeout: float | None = ..., - sleep: float = ..., - blocking: bool = ..., - blocking_timeout: float | None = ..., - thread_local: bool = ..., + timeout: float | None = None, + sleep: float = 0.1, + blocking: bool = True, + blocking_timeout: float | None = None, + thread_local: bool = True, ) -> None: ... def register_scripts(self) -> None: ... def __enter__(self) -> Self: ... @@ -40,17 +40,17 @@ class Lock: ) -> bool | None: ... def acquire( self, - sleep: float | None = ..., - blocking: bool | None = ..., - blocking_timeout: float | None = ..., - token: str | bytes | None = ..., + sleep: float | None = None, + blocking: bool | None = None, + blocking_timeout: float | None = None, + token: str | bytes | None = None, ) -> bool: ... def do_acquire(self, token: str | bytes) -> bool: ... def locked(self) -> bool: ... def owned(self) -> bool: ... def release(self) -> None: ... def do_release(self, expected_token: str | bytes) -> None: ... - def extend(self, additional_time: float, replace_ttl: bool = ...) -> bool: ... + def extend(self, additional_time: float, replace_ttl: bool = False) -> bool: ... def do_extend(self, additional_time: float, replace_ttl: bool) -> bool: ... def reacquire(self) -> bool: ... def do_reacquire(self) -> bool: ... diff --git a/stubs/redis/redis/ocsp.pyi b/stubs/redis/redis/ocsp.pyi index da9473a1c2ac..0416a2319332 100644 --- a/stubs/redis/redis/ocsp.pyi +++ b/stubs/redis/redis/ocsp.pyi @@ -5,14 +5,14 @@ from typing_extensions import Literal from cryptography.x509.base import Certificate from OpenSSL.SSL import Connection -def ocsp_staple_verifier(con: Connection, ocsp_bytes: bytes, expected: bytes | None = ...) -> Literal[True]: ... +def ocsp_staple_verifier(con: Connection, ocsp_bytes: bytes, expected: bytes | None = None) -> Literal[True]: ... class OCSPVerifier: SOCK: SSLObject | SSLSocket HOST: str PORT: int CA_CERTS: str | None - def __init__(self, sock: SSLObject | SSLSocket, host: str, port: int, ca_certs: str | None = ...) -> None: ... + def __init__(self, sock: SSLObject | SSLSocket, host: str, port: int, ca_certs: str | None = None) -> None: ... # cryptography.x509.general_name.GeneralName.value is typed as Any def components_from_socket(self) -> tuple[Certificate, Incomplete | None, Incomplete]: ... def components_from_direct_connection(self) -> tuple[Certificate, Incomplete | None, Incomplete]: ... diff --git a/stubs/redis/redis/sentinel.pyi b/stubs/redis/redis/sentinel.pyi index ea13ae681287..d57c470ea522 100644 --- a/stubs/redis/redis/sentinel.pyi +++ b/stubs/redis/redis/sentinel.pyi @@ -20,7 +20,7 @@ class SentinelManagedConnection(Connection): def connect_to(self, address: _AddressAndPort) -> None: ... def connect(self) -> None: ... # The result can be either `str | bytes` or `list[str | bytes]` - def read_response(self, disable_decoding: bool = ...) -> Any: ... + def read_response(self, disable_decoding: bool = False) -> Any: ... class SentinelManagedSSLConnection(SentinelManagedConnection, SSLConnection): ... @@ -43,8 +43,8 @@ class Sentinel(SentinelCommands): def __init__( self, sentinels: Iterable[_AddressAndPort], - min_other_sentinels: int = ..., - sentinel_kwargs: dict[str, Any] | None = ..., + min_other_sentinels: int = 0, + sentinel_kwargs: dict[str, Any] | None = None, **connection_kwargs, ) -> None: ... def check_master_state(self, state: _SentinelState, service_name: str) -> bool: ... diff --git a/stubs/redis/redis/utils.pyi b/stubs/redis/redis/utils.pyi index 7a562c4b1b2e..32de59413a33 100644 --- a/stubs/redis/redis/utils.pyi +++ b/stubs/redis/redis/utils.pyi @@ -14,7 +14,7 @@ CRYPTOGRAPHY_AVAILABLE: bool @overload def from_url(url: str, *, db: int = ..., decode_responses: Literal[True], **kwargs: Any) -> Redis[str]: ... @overload -def from_url(url: str, *, db: int = ..., decode_responses: Literal[False] = ..., **kwargs: Any) -> Redis[bytes]: ... +def from_url(url: str, *, db: int = ..., decode_responses: Literal[False] = False, **kwargs: Any) -> Redis[bytes]: ... def pipeline(redis_obj: Redis[_StrType]) -> AbstractContextManager[Pipeline[_StrType]]: ... def str_if_bytes(value: str | bytes) -> str: ... def safe_str(value: object) -> str: ... diff --git a/stubs/regex/regex/_regex_core.pyi b/stubs/regex/regex/_regex_core.pyi index cca9a476c367..e5ab3f970920 100644 --- a/stubs/regex/regex/_regex_core.pyi +++ b/stubs/regex/regex/_regex_core.pyi @@ -6,7 +6,7 @@ from typing_extensions import TypeAlias from .regex import Pattern class error(Exception): - def __init__(self, message: str, pattern: AnyStr | None = ..., pos: int | None = ...) -> None: ... + def __init__(self, message: str, pattern: AnyStr | None = None, pos: int | None = None) -> None: ... class RegexFlag(enum.IntFlag): A: int @@ -87,5 +87,5 @@ class Scanner(Generic[AnyStr]): lexicon: _Lexicon[AnyStr] scanner: Pattern[AnyStr] - def __init__(self, lexicon: _Lexicon[AnyStr], flags: int = ...) -> None: ... + def __init__(self, lexicon: _Lexicon[AnyStr], flags: int = 0) -> None: ... def scan(self, string: AnyStr) -> tuple[list[Any], AnyStr]: ... diff --git a/stubs/regex/regex/regex.pyi b/stubs/regex/regex/regex.pyi index 6a6d25f47cfe..0d37d0c9fc32 100644 --- a/stubs/regex/regex/regex.pyi +++ b/stubs/regex/regex/regex.pyi @@ -16,185 +16,185 @@ __version__: str def compile( pattern: AnyStr | Pattern[AnyStr], - flags: int = ..., - ignore_unused: bool = ..., - cache_pattern: bool | None = ..., + flags: int = 0, + ignore_unused: bool = False, + cache_pattern: bool | None = None, **kwargs: Any, ) -> Pattern[AnyStr]: ... @overload def search( pattern: str | Pattern[str], string: str, - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - partial: bool = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + partial: bool = False, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> Match[str] | None: ... @overload def search( pattern: bytes | Pattern[bytes], string: ReadableBuffer, - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - partial: bool = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + partial: bool = False, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> Match[bytes] | None: ... @overload def match( pattern: str | Pattern[str], string: str, - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - partial: bool = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + partial: bool = False, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> Match[str] | None: ... @overload def match( pattern: bytes | Pattern[bytes], string: ReadableBuffer, - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - partial: bool = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + partial: bool = False, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> Match[bytes] | None: ... @overload def fullmatch( pattern: str | Pattern[str], string: str, - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - partial: bool = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + partial: bool = False, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> Match[str] | None: ... @overload def fullmatch( pattern: bytes | Pattern[bytes], string: ReadableBuffer, - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - partial: bool = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + partial: bool = False, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> Match[bytes] | None: ... @overload def split( pattern: str | Pattern[str], string: str, - maxsplit: int = ..., - flags: int = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + maxsplit: int = 0, + flags: int = 0, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> list[str | Any]: ... @overload def split( pattern: ReadableBuffer | Pattern[bytes], string: ReadableBuffer, - maxsplit: int = ..., - flags: int = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + maxsplit: int = 0, + flags: int = 0, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> list[bytes | Any]: ... @overload def splititer( pattern: str | Pattern[str], string: str, - maxsplit: int = ..., - flags: int = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + maxsplit: int = 0, + flags: int = 0, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> _regex.Splitter[str]: ... @overload def splititer( pattern: ReadableBuffer | Pattern[bytes], string: ReadableBuffer, - maxsplit: int = ..., - flags: int = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + maxsplit: int = 0, + flags: int = 0, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> _regex.Splitter[bytes]: ... @overload def findall( pattern: str | Pattern[str], string: str, - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - overlapped: bool = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + overlapped: bool = False, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> list[Any]: ... @overload def findall( pattern: ReadableBuffer | Pattern[bytes], string: ReadableBuffer, - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - overlapped: bool = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + overlapped: bool = False, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> list[Any]: ... @overload def finditer( pattern: str | Pattern[str], string: str, - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - overlapped: bool = ..., - partial: bool = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + overlapped: bool = False, + partial: bool = False, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> _regex.Scanner[str]: ... @overload def finditer( pattern: ReadableBuffer | Pattern[bytes], string: ReadableBuffer, - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - overlapped: bool = ..., - partial: bool = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + overlapped: bool = False, + partial: bool = False, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> _regex.Scanner[bytes]: ... @overload @@ -202,13 +202,13 @@ def sub( pattern: str | Pattern[str], repl: str | Callable[[Match[str]], str], string: str, - count: int = ..., - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + count: int = 0, + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> str: ... @overload @@ -216,13 +216,13 @@ def sub( pattern: ReadableBuffer | Pattern[bytes], repl: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer], string: ReadableBuffer, - count: int = ..., - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + count: int = 0, + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> bytes: ... @overload @@ -230,13 +230,13 @@ def subf( pattern: str | Pattern[str], format: str | Callable[[Match[str]], str], string: str, - count: int = ..., - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + count: int = 0, + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> str: ... @overload @@ -244,13 +244,13 @@ def subf( pattern: ReadableBuffer | Pattern[bytes], format: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer], string: ReadableBuffer, - count: int = ..., - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + count: int = 0, + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> bytes: ... @overload @@ -258,13 +258,13 @@ def subn( pattern: str | Pattern[str], repl: str | Callable[[Match[str]], str], string: str, - count: int = ..., - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + count: int = 0, + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> tuple[str, int]: ... @overload @@ -272,13 +272,13 @@ def subn( pattern: ReadableBuffer | Pattern[bytes], repl: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer], string: ReadableBuffer, - count: int = ..., - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + count: int = 0, + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> tuple[bytes, int]: ... @overload @@ -286,13 +286,13 @@ def subfn( pattern: str | Pattern[str], format: str | Callable[[Match[str]], str], string: str, - count: int = ..., - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + count: int = 0, + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> tuple[str, int]: ... @overload @@ -300,22 +300,22 @@ def subfn( pattern: ReadableBuffer | Pattern[bytes], format: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer], string: ReadableBuffer, - count: int = ..., - flags: int = ..., - pos: int | None = ..., - endpos: int | None = ..., - concurrent: bool | None = ..., - timeout: float | None = ..., - ignore_unused: bool = ..., + count: int = 0, + flags: int = 0, + pos: int | None = None, + endpos: int | None = None, + concurrent: bool | None = None, + timeout: float | None = None, + ignore_unused: bool = False, **kwargs: Any, ) -> tuple[bytes, int]: ... def purge() -> None: ... @overload -def cache_all(value: bool = ...) -> None: ... +def cache_all(value: bool = True) -> None: ... @overload def cache_all(value: None) -> bool: ... -def escape(pattern: AnyStr, special_only: bool = ..., literal_spaces: bool = ...) -> AnyStr: ... -def template(pattern: AnyStr | Pattern[AnyStr], flags: int = ...) -> Pattern[AnyStr]: ... +def escape(pattern: AnyStr, special_only: bool = True, literal_spaces: bool = False) -> AnyStr: ... +def template(pattern: AnyStr | Pattern[AnyStr], flags: int = 0) -> Pattern[AnyStr]: ... Regex = compile @@ -593,17 +593,17 @@ class Match(Generic[AnyStr]): @property def fuzzy_changes(self) -> tuple[list[int], list[int], list[int]]: ... @overload - def group(self, __group: Literal[0] = ...) -> AnyStr: ... + def group(self, __group: Literal[0] = 0) -> AnyStr: ... @overload def group(self, __group: int | str = ...) -> AnyStr | Any: ... @overload def group(self, __group1: int | str, __group2: int | str, *groups: int | str) -> tuple[AnyStr | Any, ...]: ... @overload - def groups(self, default: None = ...) -> tuple[AnyStr | Any, ...]: ... + def groups(self, default: None = None) -> tuple[AnyStr | Any, ...]: ... @overload def groups(self, default: _T) -> tuple[AnyStr | _T, ...]: ... @overload - def groupdict(self, default: None = ...) -> dict[str, AnyStr | Any]: ... + def groupdict(self, default: None = None) -> dict[str, AnyStr | Any]: ... @overload def groupdict(self, default: _T) -> dict[str, AnyStr | _T]: ... @overload diff --git a/stubs/requests/requests/adapters.pyi b/stubs/requests/requests/adapters.pyi index dbdd59f70df6..f410cc7b205a 100644 --- a/stubs/requests/requests/adapters.pyi +++ b/stubs/requests/requests/adapters.pyi @@ -42,11 +42,11 @@ class BaseAdapter: def send( self, request: PreparedRequest, - stream: bool = ..., - timeout: None | float | tuple[float, float] | tuple[float, None] = ..., - verify: bool | str = ..., - cert: None | bytes | str | tuple[bytes | str, bytes | str] = ..., - proxies: Mapping[str, str] | None = ..., + stream: bool = False, + timeout: None | float | tuple[float, float] | tuple[float, None] = None, + verify: bool | str = True, + cert: None | bytes | str | tuple[bytes | str, bytes | str] = None, + proxies: Mapping[str, str] | None = None, ) -> Response: ... def close(self) -> None: ... @@ -56,14 +56,14 @@ class HTTPAdapter(BaseAdapter): config: Any proxy_manager: Any def __init__( - self, pool_connections: int = ..., pool_maxsize: int = ..., max_retries: Retry | int | None = ..., pool_block: bool = ... + self, pool_connections: int = 10, pool_maxsize: int = 10, max_retries: Retry | int | None = 0, pool_block: bool = False ) -> None: ... poolmanager: Any - def init_poolmanager(self, connections, maxsize, block=..., **pool_kwargs): ... + def init_poolmanager(self, connections, maxsize, block=False, **pool_kwargs): ... def proxy_manager_for(self, proxy, **proxy_kwargs): ... def cert_verify(self, conn, url, verify, cert): ... def build_response(self, req, resp): ... - def get_connection(self, url, proxies=...): ... + def get_connection(self, url, proxies=None): ... def close(self): ... def request_url(self, request, proxies): ... def add_headers(self, request, **kwargs): ... @@ -71,9 +71,9 @@ class HTTPAdapter(BaseAdapter): def send( self, request: PreparedRequest, - stream: bool = ..., - timeout: None | float | tuple[float, float] | tuple[float, None] = ..., - verify: bool | str = ..., - cert: None | bytes | str | tuple[bytes | str, bytes | str] = ..., - proxies: Mapping[str, str] | None = ..., + stream: bool = False, + timeout: None | float | tuple[float, float] | tuple[float, None] = None, + verify: bool | str = True, + cert: None | bytes | str | tuple[bytes | str, bytes | str] = None, + proxies: Mapping[str, str] | None = None, ) -> Response: ... diff --git a/stubs/requests/requests/api.pyi b/stubs/requests/requests/api.pyi index c07a4900ca8b..5578f13a5aca 100644 --- a/stubs/requests/requests/api.pyi +++ b/stubs/requests/requests/api.pyi @@ -28,7 +28,7 @@ def request( ) -> Response: ... def get( url: str | bytes, - params: _Params | None = ..., + params: _Params | None = None, *, data: _Data | None = ..., headers: _HeadersMapping | None = ..., @@ -82,8 +82,8 @@ def head( ) -> Response: ... def post( url: str | bytes, - data: _Data | None = ..., - json: Incomplete | None = ..., + data: _Data | None = None, + json: Incomplete | None = None, *, params: _Params | None = ..., headers: _HeadersMapping | None = ..., @@ -100,7 +100,7 @@ def post( ) -> Response: ... def put( url: str | bytes, - data: _Data | None = ..., + data: _Data | None = None, *, params: _Params | None = ..., headers: _HeadersMapping | None = ..., @@ -118,7 +118,7 @@ def put( ) -> Response: ... def patch( url: str | bytes, - data: _Data | None = ..., + data: _Data | None = None, *, params: _Params | None = ..., headers: _HeadersMapping | None = ..., diff --git a/stubs/requests/requests/cookies.pyi b/stubs/requests/requests/cookies.pyi index b7f0812a4eaa..dad454000592 100644 --- a/stubs/requests/requests/cookies.pyi +++ b/stubs/requests/requests/cookies.pyi @@ -11,7 +11,7 @@ class MockRequest: def get_full_url(self): ... def is_unverifiable(self): ... def has_header(self, name): ... - def get_header(self, name, default=...): ... + def get_header(self, name, default=None): ... def add_header(self, key, val): ... def add_unredirected_header(self, name, value): ... def get_new_headers(self): ... @@ -29,12 +29,12 @@ class MockResponse: def extract_cookies_to_jar(jar, request, response): ... def get_cookie_header(jar, request): ... -def remove_cookie_by_name(cookiejar, name, domain=..., path=...): ... +def remove_cookie_by_name(cookiejar, name, domain=None, path=None): ... class CookieConflictError(RuntimeError): ... class RequestsCookieJar(CookieJar, MutableMapping[Any, Any]): - def get(self, name, default=..., domain=..., path=...): ... + def get(self, name, default=None, domain=None, path=None): ... def set(self, name, value, **kwargs): ... def iterkeys(self): ... def keys(self): ... @@ -45,7 +45,7 @@ class RequestsCookieJar(CookieJar, MutableMapping[Any, Any]): def list_domains(self): ... def list_paths(self): ... def multiple_domains(self): ... - def get_dict(self, domain=..., path=...): ... + def get_dict(self, domain=None, path=None): ... def __getitem__(self, name): ... def __setitem__(self, name, value) -> None: ... def __delitem__(self, name) -> None: ... @@ -56,5 +56,5 @@ class RequestsCookieJar(CookieJar, MutableMapping[Any, Any]): def create_cookie(name, value, **kwargs): ... def morsel_to_cookie(morsel): ... -def cookiejar_from_dict(cookie_dict, cookiejar=..., overwrite=...): ... +def cookiejar_from_dict(cookie_dict, cookiejar=None, overwrite=True): ... def merge_cookies(cookiejar, cookies): ... diff --git a/stubs/requests/requests/models.pyi b/stubs/requests/requests/models.pyi index a2f4f15ea5a7..5fc38b72e904 100644 --- a/stubs/requests/requests/models.pyi +++ b/stubs/requests/requests/models.pyi @@ -66,7 +66,17 @@ class Request(RequestHooksMixin): auth: Any cookies: Any def __init__( - self, method=..., url=..., headers=..., files=..., data=..., params=..., auth=..., cookies=..., hooks=..., json=... + self, + method=None, + url=None, + headers=None, + files=None, + data=None, + params=None, + auth=None, + cookies=None, + hooks=None, + json=None, ) -> None: ... def prepare(self) -> PreparedRequest: ... @@ -78,15 +88,25 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin): hooks: Any def __init__(self) -> None: ... def prepare( - self, method=..., url=..., headers=..., files=..., data=..., params=..., auth=..., cookies=..., hooks=..., json=... + self, + method=None, + url=None, + headers=None, + files=None, + data=None, + params=None, + auth=None, + cookies=None, + hooks=None, + json=None, ) -> None: ... def copy(self) -> PreparedRequest: ... def prepare_method(self, method) -> None: ... def prepare_url(self, url, params) -> None: ... def prepare_headers(self, headers) -> None: ... - def prepare_body(self, data, files, json=...) -> None: ... + def prepare_body(self, data, files, json=None) -> None: ... def prepare_content_length(self, body) -> None: ... - def prepare_auth(self, auth, url=...) -> None: ... + def prepare_auth(self, auth, url="") -> None: ... def prepare_cookies(self, cookies) -> None: ... def prepare_hooks(self, hooks) -> None: ... @@ -119,9 +139,9 @@ class Response: def is_permanent_redirect(self) -> bool: ... @property def apparent_encoding(self) -> str: ... - def iter_content(self, chunk_size: int | None = ..., decode_unicode: bool = ...) -> Iterator[Any]: ... + def iter_content(self, chunk_size: int | None = 1, decode_unicode: bool = False) -> Iterator[Any]: ... def iter_lines( - self, chunk_size: int | None = ..., decode_unicode: bool = ..., delimiter: str | bytes | None = ... + self, chunk_size: int | None = 512, decode_unicode: bool = False, delimiter: str | bytes | None = None ) -> Iterator[Any]: ... @property def content(self) -> bytes: ... diff --git a/stubs/requests/requests/sessions.pyi b/stubs/requests/requests/sessions.pyi index 19b86d320ec8..2d5dec234d14 100644 --- a/stubs/requests/requests/sessions.pyi +++ b/stubs/requests/requests/sessions.pyi @@ -44,12 +44,12 @@ class SessionRedirectMixin: self, resp, req, - stream: bool = ..., - timeout: Incomplete | None = ..., - verify: bool = ..., - cert: Incomplete | None = ..., - proxies: Incomplete | None = ..., - yield_requests: bool = ..., + stream: bool = False, + timeout: Incomplete | None = None, + verify: bool = True, + cert: Incomplete | None = None, + proxies: Incomplete | None = None, + yield_requests: bool = False, **adapter_kwargs, ): ... def rebuild_auth(self, prepared_request, response): ... @@ -140,20 +140,20 @@ class Session(SessionRedirectMixin): self, method: str | bytes, url: str | bytes, - params: _Params | None = ..., - data: _Data | None = ..., - headers: _HeadersUpdateMapping | None = ..., - cookies: None | RequestsCookieJar | _TextMapping = ..., - files: _Files | None = ..., - auth: _Auth | None = ..., - timeout: _Timeout | None = ..., - allow_redirects: bool = ..., - proxies: _TextMapping | None = ..., - hooks: _HooksInput | None = ..., - stream: bool | None = ..., - verify: _Verify | None = ..., - cert: _Cert | None = ..., - json: Incomplete | None = ..., + params: _Params | None = None, + data: _Data | None = None, + headers: _HeadersUpdateMapping | None = None, + cookies: None | RequestsCookieJar | _TextMapping = None, + files: _Files | None = None, + auth: _Auth | None = None, + timeout: _Timeout | None = None, + allow_redirects: bool = True, + proxies: _TextMapping | None = None, + hooks: _HooksInput | None = None, + stream: bool | None = None, + verify: _Verify | None = None, + cert: _Cert | None = None, + json: Incomplete | None = None, ) -> Response: ... def get( self, @@ -215,8 +215,8 @@ class Session(SessionRedirectMixin): def post( self, url: str | bytes, - data: _Data | None = ..., - json: Incomplete | None = ..., + data: _Data | None = None, + json: Incomplete | None = None, *, params: _Params | None = ..., headers: _HeadersUpdateMapping | None = ..., @@ -234,7 +234,7 @@ class Session(SessionRedirectMixin): def put( self, url: str | bytes, - data: _Data | None = ..., + data: _Data | None = None, *, params: _Params | None = ..., headers: _HeadersUpdateMapping | None = ..., @@ -253,7 +253,7 @@ class Session(SessionRedirectMixin): def patch( self, url: str | bytes, - data: _Data | None = ..., + data: _Data | None = None, *, params: _Params | None = ..., headers: _HeadersUpdateMapping | None = ..., diff --git a/stubs/requests/requests/structures.pyi b/stubs/requests/requests/structures.pyi index 14ef93c4a1ee..8739ee493e74 100644 --- a/stubs/requests/requests/structures.pyi +++ b/stubs/requests/requests/structures.pyi @@ -5,7 +5,7 @@ _D = TypeVar("_D") _VT = TypeVar("_VT") class CaseInsensitiveDict(MutableMapping[str, _VT], Generic[_VT]): - def __init__(self, data: Mapping[str, _VT] | Iterable[tuple[str, _VT]] | None = ..., **kwargs: _VT) -> None: ... + def __init__(self, data: Mapping[str, _VT] | Iterable[tuple[str, _VT]] | None = None, **kwargs: _VT) -> None: ... def lower_items(self) -> Iterator[tuple[str, _VT]]: ... def __setitem__(self, key: str, value: _VT) -> None: ... def __getitem__(self, key: str) -> _VT: ... @@ -16,10 +16,10 @@ class CaseInsensitiveDict(MutableMapping[str, _VT], Generic[_VT]): class LookupDict(dict[str, _VT]): name: Any - def __init__(self, name: Any = ...) -> None: ... + def __init__(self, name: Any = None) -> None: ... def __getitem__(self, key: str) -> _VT | None: ... # type: ignore[override] def __setattr__(self, __attr: str, __value: _VT) -> None: ... @overload - def get(self, key: str, default: None = ...) -> _VT | None: ... + def get(self, key: str, default: None = None) -> _VT | None: ... @overload def get(self, key: str, default: _D | _VT) -> _D | _VT: ... diff --git a/stubs/requests/requests/utils.pyi b/stubs/requests/requests/utils.pyi index 34cd796cddce..20dd0e0e8283 100644 --- a/stubs/requests/requests/utils.pyi +++ b/stubs/requests/requests/utils.pyi @@ -22,7 +22,7 @@ DEFAULT_ACCEPT_ENCODING: str def dict_to_sequence(d): ... def super_len(o): ... -def get_netrc_auth(url: _Uri, raise_errors: bool = ...) -> tuple[str, str] | None: ... +def get_netrc_auth(url: _Uri, raise_errors: bool = False) -> tuple[str, str] | None: ... def guess_filename(obj): ... def extract_zipped_paths(path): ... def atomic_open(filename: StrOrBytesPath) -> _GeneratorContextManager[BufferedWriter]: ... @@ -30,7 +30,7 @@ def from_key_val_list(value): ... def to_key_val_list(value): ... def parse_list_header(value): ... def parse_dict_header(value): ... -def unquote_header_value(value, is_filename: bool = ...): ... +def unquote_header_value(value, is_filename: bool = False): ... def dict_from_cookiejar(cj): ... def add_dict_to_cookiejar(cj, cookie_dict): ... def get_encodings_from_content(content): ... @@ -49,16 +49,16 @@ def is_ipv4_address(string_ip: str) -> bool: ... def is_valid_cidr(string_network: str) -> bool: ... def set_environ(env_name: str, value: None) -> _GeneratorContextManager[None]: ... def should_bypass_proxies(url: _Uri, no_proxy: Iterable[str] | None) -> bool: ... -def get_environ_proxies(url: _Uri, no_proxy: Iterable[str] | None = ...) -> dict[Any, Any]: ... +def get_environ_proxies(url: _Uri, no_proxy: Iterable[str] | None = None) -> dict[Any, Any]: ... def select_proxy(url: _Uri, proxies: Mapping[Any, Any] | None): ... -def resolve_proxies(request: Request | PreparedRequest, proxies: Mapping[str, str] | None, trust_env: bool = ...): ... -def default_user_agent(name: str = ...) -> str: ... +def resolve_proxies(request: Request | PreparedRequest, proxies: Mapping[str, str] | None, trust_env: bool = True): ... +def default_user_agent(name: str = "python-requests") -> str: ... def default_headers() -> CaseInsensitiveDict[str]: ... def parse_header_links(value: str) -> list[dict[str, str]]: ... def guess_json_utf(data): ... def prepend_scheme_if_needed(url, new_scheme): ... def get_auth_from_url(url: _Uri) -> tuple[str, str]: ... -def to_native_string(string, encoding=...): ... +def to_native_string(string, encoding="ascii"): ... def urldefragauth(url: _Uri): ... def rewind_body(prepared_request: PreparedRequest) -> None: ... def check_header_validity(header: tuple[AnyStr, AnyStr]) -> None: ... diff --git a/stubs/retry/retry/api.pyi b/stubs/retry/retry/api.pyi index 2221d45430d8..e550c1ca2c90 100644 --- a/stubs/retry/retry/api.pyi +++ b/stubs/retry/retry/api.pyi @@ -9,22 +9,22 @@ logging_logger: Logger def retry_call( f: Callable[..., _R], - fargs: Sequence[Any] | None = ..., - fkwargs: dict[str, Any] | None = ..., + fargs: Sequence[Any] | None = None, + fkwargs: dict[str, Any] | None = None, exceptions: type[Exception] | tuple[type[Exception], ...] = ..., - tries: int = ..., - delay: float = ..., - max_delay: float | None = ..., - backoff: float = ..., - jitter: tuple[float, float] | float = ..., + tries: int = -1, + delay: float = 0, + max_delay: float | None = None, + backoff: float = 1, + jitter: tuple[float, float] | float = 0, logger: Logger | None = ..., ) -> _R: ... def retry( exceptions: type[Exception] | tuple[type[Exception], ...] = ..., - tries: int = ..., - delay: float = ..., - max_delay: float | None = ..., - backoff: float = ..., - jitter: tuple[float, float] | float = ..., + tries: int = -1, + delay: float = 0, + max_delay: float | None = None, + backoff: float = 1, + jitter: tuple[float, float] | float = 0, logger: Logger | None = ..., ) -> IdentityFunction: ... diff --git a/stubs/setuptools/pkg_resources/__init__.pyi b/stubs/setuptools/pkg_resources/__init__.pyi index 7888500e67e6..6c88955cb26f 100644 --- a/stubs/setuptools/pkg_resources/__init__.pyi +++ b/stubs/setuptools/pkg_resources/__init__.pyi @@ -26,21 +26,21 @@ def fixup_namespace_packages(path_item: str) -> None: ... class WorkingSet: entries: list[str] - def __init__(self, entries: Iterable[str] | None = ...) -> None: ... + def __init__(self, entries: Iterable[str] | None = None) -> None: ... def require(self, *requirements: _NestedStr) -> Sequence[Distribution]: ... def run_script(self, requires: str, script_name: str) -> None: ... - def iter_entry_points(self, group: str, name: str | None = ...) -> Generator[EntryPoint, None, None]: ... + def iter_entry_points(self, group: str, name: str | None = None) -> Generator[EntryPoint, None, None]: ... def add_entry(self, entry: str) -> None: ... def __contains__(self, dist: Distribution) -> bool: ... def __iter__(self) -> Generator[Distribution, None, None]: ... def find(self, req: Requirement) -> Distribution | None: ... def resolve( - self, requirements: Iterable[Requirement], env: Environment | None = ..., installer: _InstallerType | None = ... + self, requirements: Iterable[Requirement], env: Environment | None = None, installer: _InstallerType | None = None ) -> list[Distribution]: ... - def add(self, dist: Distribution, entry: str | None = ..., insert: bool = ..., replace: bool = ...) -> None: ... + def add(self, dist: Distribution, entry: str | None = None, insert: bool = True, replace: bool = False) -> None: ... def subscribe(self, callback: Callable[[Distribution], object]) -> None: ... def find_plugins( - self, plugin_env: Environment, full_env: Environment | None = ..., fallback: bool = ... + self, plugin_env: Environment, full_env: Environment | None = None, fallback: bool = True ) -> tuple[list[Distribution], dict[Distribution, Exception]]: ... working_set: WorkingSet = ... @@ -51,7 +51,9 @@ iter_entry_points = working_set.iter_entry_points add_activation_listener = working_set.subscribe class Environment: - def __init__(self, search_path: Sequence[str] | None = ..., platform: str | None = ..., python: str | None = ...) -> None: ... + def __init__( + self, search_path: Sequence[str] | None = None, platform: str | None = ..., python: str | None = ... + ) -> None: ... def __getitem__(self, project_name: str) -> list[Distribution]: ... def __iter__(self) -> Generator[str, None, None]: ... def add(self, dist: Distribution) -> None: ... @@ -60,16 +62,16 @@ class Environment: def __add__(self, other: Distribution | Environment) -> Environment: ... def __iadd__(self, other: Distribution | Environment) -> Self: ... @overload - def best_match(self, req: Requirement, working_set: WorkingSet, *, replace_conflicting: bool = ...) -> Distribution: ... + def best_match(self, req: Requirement, working_set: WorkingSet, *, replace_conflicting: bool = False) -> Distribution: ... @overload def best_match( - self, req: Requirement, working_set: WorkingSet, installer: Callable[[Requirement], _T], replace_conflicting: bool = ... + self, req: Requirement, working_set: WorkingSet, installer: Callable[[Requirement], _T], replace_conflicting: bool = False ) -> _T: ... @overload def obtain(self, requirement: Requirement) -> None: ... @overload def obtain(self, requirement: Requirement, installer: Callable[[Requirement], _T]) -> _T: ... - def scan(self, search_path: Sequence[str] | None = ...) -> None: ... + def scan(self, search_path: Sequence[str] | None = None) -> None: ... class DistInfoDistribution(Distribution): PKG_INFO: ClassVar[Literal["METADATA"]] @@ -109,23 +111,23 @@ class EntryPoint: self, name: str, module_name: str, - attrs: tuple[str, ...] = ..., - extras: tuple[str, ...] = ..., - dist: Distribution | None = ..., + attrs: tuple[str, ...] = (), + extras: tuple[str, ...] = (), + dist: Distribution | None = None, ) -> None: ... @classmethod - def parse(cls, src: str, dist: Distribution | None = ...) -> EntryPoint: ... + def parse(cls, src: str, dist: Distribution | None = None) -> EntryPoint: ... @classmethod - def parse_group(cls, group: str, lines: str | Sequence[str], dist: Distribution | None = ...) -> dict[str, EntryPoint]: ... + def parse_group(cls, group: str, lines: str | Sequence[str], dist: Distribution | None = None) -> dict[str, EntryPoint]: ... @classmethod def parse_map( - cls, data: dict[str, str | Sequence[str]] | str | Sequence[str], dist: Distribution | None = ... + cls, data: dict[str, str | Sequence[str]] | str | Sequence[str], dist: Distribution | None = None ) -> dict[str, EntryPoint]: ... - def load(self, require: bool = ..., env: Environment | None = ..., installer: _InstallerType | None = ...) -> Any: ... - def require(self, env: Environment | None = ..., installer: _InstallerType | None = ...) -> None: ... + def load(self, require: bool = True, env: Environment | None = ..., installer: _InstallerType | None = ...) -> Any: ... + def require(self, env: Environment | None = None, installer: _InstallerType | None = None) -> None: ... def resolve(self) -> Any: ... -def find_distributions(path_item: str, only: bool = ...) -> Generator[Distribution, None, None]: ... +def find_distributions(path_item: str, only: bool = False) -> Generator[Distribution, None, None]: ... @overload def get_distribution(dist: _D) -> _D: ... @overload @@ -148,23 +150,23 @@ class Distribution(NullProvider, IResourceProvider, IMetadataProvider): precedence: int def __init__( self, - location: str | None = ..., - metadata: _MetadataType = ..., - project_name: str | None = ..., - version: str | None = ..., + location: str | None = None, + metadata: _MetadataType = None, + project_name: str | None = None, + version: str | None = None, py_version: str = ..., - platform: str | None = ..., - precedence: int = ..., + platform: str | None = None, + precedence: int = 3, ) -> None: ... @classmethod def from_location( - cls, location: str, basename: str, metadata: _MetadataType = ..., **kw: str | None | int + cls, location: str, basename: str, metadata: _MetadataType = None, **kw: str | None | int ) -> Distribution: ... @classmethod - def from_filename(cls, filename: str, metadata: _MetadataType = ..., **kw: str | None | int) -> Distribution: ... - def activate(self, path: list[str] | None = ...) -> None: ... + def from_filename(cls, filename: str, metadata: _MetadataType = None, **kw: str | None | int) -> Distribution: ... + def activate(self, path: list[str] | None = None) -> None: ... def as_requirement(self) -> Requirement: ... - def requires(self, extras: tuple[str, ...] = ...) -> list[Requirement]: ... + def requires(self, extras: tuple[str, ...] = ()) -> list[Requirement]: ... def clone(self, **kw: str | int | None) -> Requirement: ... def egg_name(self) -> str: ... # type: ignore[override] # supertype's egg_name is a variable, not a method def __cmp__(self, other: Any) -> bool: ... @@ -188,7 +190,7 @@ def resource_isdir(package_or_requirement: _PkgReqType, resource_name: str) -> b def resource_listdir(package_or_requirement: _PkgReqType, resource_name: str) -> list[str]: ... def resource_filename(package_or_requirement: _PkgReqType, resource_name: str) -> str: ... def set_extraction_path(path: str) -> None: ... -def cleanup_resources(force: bool = ...) -> list[str]: ... +def cleanup_resources(force: bool = False) -> list[str]: ... class IResourceManager: def resource_exists(self, package_or_requirement: _PkgReqType, resource_name: str) -> bool: ... diff --git a/stubs/setuptools/setuptools/__init__.pyi b/stubs/setuptools/setuptools/__init__.pyi index 3111dd68069d..0fef3642e449 100644 --- a/stubs/setuptools/setuptools/__init__.pyi +++ b/stubs/setuptools/setuptools/__init__.pyi @@ -13,7 +13,7 @@ __version__: str class PackageFinder: @classmethod - def find(cls, where: str = ..., exclude: Iterable[str] = ..., include: Iterable[str] = ...) -> list[str]: ... + def find(cls, where: str = ".", exclude: Iterable[str] = (), include: Iterable[str] = ("*",)) -> list[str]: ... class PEP420PackageFinder(PackageFinder): ... @@ -67,7 +67,7 @@ class Command(_Command): command_consumes_arguments: bool def __init__(self, dist: Distribution, **kw: Any) -> None: ... def ensure_string_list(self, option: str | list[str]) -> None: ... - def reinitialize_command(self, command: _Command | str, reinit_subcommands: int = ..., **kw: Any) -> _Command: ... + def reinitialize_command(self, command: _Command | str, reinit_subcommands: int = 0, **kw: Any) -> _Command: ... @abstractmethod def initialize_options(self) -> None: ... @abstractmethod diff --git a/stubs/setuptools/setuptools/archive_util.pyi b/stubs/setuptools/setuptools/archive_util.pyi index b550a6164396..b11be8191cb3 100644 --- a/stubs/setuptools/setuptools/archive_util.pyi +++ b/stubs/setuptools/setuptools/archive_util.pyi @@ -6,7 +6,7 @@ from ._distutils.errors import DistutilsError class UnrecognizedFormat(DistutilsError): ... def default_filter(src, dst): ... -def unpack_archive(filename, extract_dir, progress_filter=..., drivers: Incomplete | None = ...) -> None: ... +def unpack_archive(filename, extract_dir, progress_filter=..., drivers: Incomplete | None = None) -> None: ... def unpack_directory(filename, extract_dir, progress_filter=...) -> None: ... def unpack_zipfile(filename, extract_dir, progress_filter=...) -> None: ... def unpack_tarfile(filename, extract_dir, progress_filter=...): ... diff --git a/stubs/setuptools/setuptools/build_meta.pyi b/stubs/setuptools/setuptools/build_meta.pyi index 323e34827399..f01e7cd5fefc 100644 --- a/stubs/setuptools/setuptools/build_meta.pyi +++ b/stubs/setuptools/setuptools/build_meta.pyi @@ -13,26 +13,26 @@ class Distribution(dist.Distribution): def patch(cls) -> None: ... class _BuildMetaBackend: - def run_setup(self, setup_script: str = ...) -> None: ... - def get_requires_for_build_wheel(self, config_settings: Mapping[str, Any] | None = ...) -> list[str]: ... - def get_requires_for_build_sdist(self, config_settings: Mapping[str, Any] | None = ...) -> list[str]: ... + def run_setup(self, setup_script: str = "setup.py") -> None: ... + def get_requires_for_build_wheel(self, config_settings: Mapping[str, Any] | None = None) -> list[str]: ... + def get_requires_for_build_sdist(self, config_settings: Mapping[str, Any] | None = None) -> list[str]: ... def prepare_metadata_for_build_wheel( - self, metadata_directory: str, config_settings: Mapping[str, Any] | None = ... + self, metadata_directory: str, config_settings: Mapping[str, Any] | None = None ) -> str: ... def build_wheel( - self, wheel_directory: str, config_settings: Mapping[str, Any] | None = ..., metadata_directory: str | None = ... + self, wheel_directory: str, config_settings: Mapping[str, Any] | None = None, metadata_directory: str | None = None ) -> str: ... - def build_sdist(self, sdist_directory: str, config_settings: Mapping[str, Any] | None = ...) -> str: ... + def build_sdist(self, sdist_directory: str, config_settings: Mapping[str, Any] | None = None) -> str: ... def build_editable( - self, wheel_directory: str, config_settings: Mapping[str, Any] | None = ..., metadata_directory: str | None = ... + self, wheel_directory: str, config_settings: Mapping[str, Any] | None = None, metadata_directory: str | None = None ) -> str: ... - def get_requires_for_build_editable(self, config_settings: Mapping[str, Any] | None = ...) -> list[str]: ... + def get_requires_for_build_editable(self, config_settings: Mapping[str, Any] | None = None) -> list[str]: ... def prepare_metadata_for_build_editable( - self, metadata_directory: str, config_settings: Mapping[str, Any] | None = ... + self, metadata_directory: str, config_settings: Mapping[str, Any] | None = None ) -> str: ... class _BuildMetaLegacyBackend(_BuildMetaBackend): - def run_setup(self, setup_script: str = ...) -> None: ... + def run_setup(self, setup_script: str = "setup.py") -> None: ... _BACKEND: _BuildMetaBackend = ... get_requires_for_build_wheel = _BACKEND.get_requires_for_build_wheel diff --git a/stubs/setuptools/setuptools/command/build_ext.pyi b/stubs/setuptools/setuptools/command/build_ext.pyi index 507718c27004..b2ceb17bc2bc 100644 --- a/stubs/setuptools/setuptools/command/build_ext.pyi +++ b/stubs/setuptools/setuptools/command/build_ext.pyi @@ -27,20 +27,20 @@ class build_ext(_build_ext): def build_extension(self, ext) -> None: ... def links_to_dynamic(self, ext): ... def get_outputs(self): ... - def write_stub(self, output_dir, ext, compile: bool = ...) -> None: ... + def write_stub(self, output_dir, ext, compile: bool = False) -> None: ... def link_shared_object( self, objects, output_libname, - output_dir: Incomplete | None = ..., - libraries: Incomplete | None = ..., - library_dirs: Incomplete | None = ..., - runtime_library_dirs: Incomplete | None = ..., - export_symbols: Incomplete | None = ..., - debug: int = ..., - extra_preargs: Incomplete | None = ..., - extra_postargs: Incomplete | None = ..., - build_temp: Incomplete | None = ..., - target_lang: Incomplete | None = ..., + output_dir: Incomplete | None = None, + libraries: Incomplete | None = None, + library_dirs: Incomplete | None = None, + runtime_library_dirs: Incomplete | None = None, + export_symbols: Incomplete | None = None, + debug: int = 0, + extra_preargs: Incomplete | None = None, + extra_postargs: Incomplete | None = None, + build_temp: Incomplete | None = None, + target_lang: Incomplete | None = None, ) -> None: ... diff --git a/stubs/setuptools/setuptools/command/easy_install.pyi b/stubs/setuptools/setuptools/command/easy_install.pyi index d0289f629c6a..b2b0d859c5de 100644 --- a/stubs/setuptools/setuptools/command/easy_install.pyi +++ b/stubs/setuptools/setuptools/command/easy_install.pyi @@ -51,7 +51,7 @@ class easy_install(Command): def finalize_options(self) -> None: ... def expand_basedirs(self) -> None: ... def expand_dirs(self) -> None: ... - def run(self, show_deprecation: bool = ...) -> None: ... + def run(self, show_deprecation: bool = True) -> None: ... def pseudo_tempname(self): ... def warn_deprecated_options(self) -> None: ... def check_site_dir(self) -> None: ... @@ -61,22 +61,22 @@ class easy_install(Command): def add_output(self, path) -> None: ... def not_editable(self, spec) -> None: ... def check_editable(self, spec) -> None: ... - def easy_install(self, spec, deps: bool = ...): ... - def install_item(self, spec, download, tmpdir, deps, install_needed: bool = ...): ... + def easy_install(self, spec, deps: bool = False): ... + def install_item(self, spec, download, tmpdir, deps, install_needed: bool = False): ... def select_scheme(self, name) -> None: ... - def process_distribution(self, requirement, dist, deps: bool = ..., *info) -> None: ... + def process_distribution(self, requirement, dist, deps: bool = True, *info) -> None: ... def should_unzip(self, dist): ... def maybe_move(self, spec, dist_filename, setup_base): ... def install_wrapper_scripts(self, dist) -> None: ... - def install_script(self, dist, script_name, script_text, dev_path: Incomplete | None = ...) -> None: ... - def write_script(self, script_name, contents, mode: str = ..., blockers=...) -> None: ... + def install_script(self, dist, script_name, script_text, dev_path: Incomplete | None = None) -> None: ... + def write_script(self, script_name, contents, mode: str = "t", blockers=()) -> None: ... def install_eggs(self, spec, dist_filename, tmpdir): ... def egg_distribution(self, egg_path): ... def install_egg(self, egg_path, tmpdir): ... def install_exe(self, dist_filename, tmpdir): ... def exe_to_egg(self, dist_filename, egg_tmp): ... def install_wheel(self, wheel_path, tmpdir): ... - def installation_report(self, req, dist, what: str = ...): ... + def installation_report(self, req, dist, what: str = "Installed"): ... def report_editable(self, spec, setup_script): ... def run_setup(self, setup_script, setup_base, args) -> None: ... def build_and_install(self, setup_script, setup_base): ... @@ -96,7 +96,7 @@ class PthDistributions(Environment): filename: Any sitedirs: Any basedir: Any - def __init__(self, filename, sitedirs=...) -> None: ... + def __init__(self, filename, sitedirs=()) -> None: ... def save(self) -> None: ... def add(self, dist) -> None: ... def remove(self, dist) -> None: ... @@ -127,17 +127,17 @@ class ScriptWriter: template: Any command_spec_class: Any @classmethod - def get_script_args(cls, dist, executable: Incomplete | None = ..., wininst: bool = ...) -> Iterator[tuple[str, str]]: ... + def get_script_args(cls, dist, executable: Incomplete | None = None, wininst: bool = False) -> Iterator[tuple[str, str]]: ... @classmethod - def get_script_header(cls, script_text, executable: Incomplete | None = ..., wininst: bool = ...) -> str: ... + def get_script_header(cls, script_text, executable: Incomplete | None = None, wininst: bool = False) -> str: ... @classmethod - def get_args(cls, dist, header: Incomplete | None = ...) -> Iterator[tuple[str, str]]: ... + def get_args(cls, dist, header: Incomplete | None = None) -> Iterator[tuple[str, str]]: ... @classmethod def get_writer(cls, force_windows: bool) -> type[ScriptWriter]: ... @classmethod def best(cls) -> type[ScriptWriter]: ... @classmethod - def get_header(cls, script_text: str = ..., executable: Incomplete | None = ...) -> str: ... + def get_header(cls, script_text: str = "", executable: Incomplete | None = None) -> str: ... class WindowsScriptWriter(ScriptWriter): command_spec_class: Any diff --git a/stubs/setuptools/setuptools/command/egg_info.pyi b/stubs/setuptools/setuptools/command/egg_info.pyi index 931911f07149..d63a3c7f1af3 100644 --- a/stubs/setuptools/setuptools/command/egg_info.pyi +++ b/stubs/setuptools/setuptools/command/egg_info.pyi @@ -34,7 +34,7 @@ class egg_info(InfoCommon, Command): def tag_svn_revision(self, value) -> None: ... def save_version_info(self, filename) -> None: ... def finalize_options(self) -> None: ... - def write_or_delete_file(self, what, filename, data, force: bool = ...) -> None: ... + def write_or_delete_file(self, what, filename, data, force: bool = False) -> None: ... def write_file(self, what, filename, data) -> None: ... def delete_file(self, filename) -> None: ... def run(self) -> None: ... @@ -43,7 +43,7 @@ class egg_info(InfoCommon, Command): def check_broken_egg_info(self) -> None: ... class FileList(_FileList): - def __init__(self, warn=..., debug_print=..., ignore_egg_info_dir: bool = ...) -> None: ... + def __init__(self, warn=None, debug_print=None, ignore_egg_info_dir: bool = False) -> None: ... def process_template_line(self, line) -> None: ... def include(self, pattern): ... def exclude(self, pattern): ... @@ -79,7 +79,7 @@ def write_requirements(cmd, basename, filename) -> None: ... def write_setup_requirements(cmd, basename, filename) -> None: ... def write_toplevel_names(cmd, basename, filename) -> None: ... def overwrite_arg(cmd, basename, filename) -> None: ... -def write_arg(cmd, basename, filename, force: bool = ...) -> None: ... +def write_arg(cmd, basename, filename, force: bool = False) -> None: ... def write_entries(cmd, basename, filename) -> None: ... def get_pkg_info_revision(): ... diff --git a/stubs/setuptools/setuptools/command/install_lib.pyi b/stubs/setuptools/setuptools/command/install_lib.pyi index 7cd28d8f1343..f76028e0fb4d 100644 --- a/stubs/setuptools/setuptools/command/install_lib.pyi +++ b/stubs/setuptools/setuptools/command/install_lib.pyi @@ -4,6 +4,6 @@ class install_lib(orig.install_lib): def run(self) -> None: ... def get_exclusions(self): ... def copy_tree( - self, infile, outfile, preserve_mode: int = ..., preserve_times: int = ..., preserve_symlinks: int = ..., level: int = ... + self, infile, outfile, preserve_mode: int = 1, preserve_times: int = 1, preserve_symlinks: int = 0, level: int = 1 ): ... def get_outputs(self): ... diff --git a/stubs/setuptools/setuptools/command/install_scripts.pyi b/stubs/setuptools/setuptools/command/install_scripts.pyi index 3dc4c1a1fb80..7157dc5d3d6b 100644 --- a/stubs/setuptools/setuptools/command/install_scripts.pyi +++ b/stubs/setuptools/setuptools/command/install_scripts.pyi @@ -7,4 +7,4 @@ class install_scripts(orig.install_scripts): def initialize_options(self) -> None: ... outfiles: Any def run(self) -> None: ... - def write_script(self, script_name, contents, mode: str = ..., *ignored) -> None: ... + def write_script(self, script_name, contents, mode: str = "t", *ignored) -> None: ... diff --git a/stubs/setuptools/setuptools/command/sdist.pyi b/stubs/setuptools/setuptools/command/sdist.pyi index f544dbfc7cb8..fe4b59d73dad 100644 --- a/stubs/setuptools/setuptools/command/sdist.pyi +++ b/stubs/setuptools/setuptools/command/sdist.pyi @@ -2,7 +2,7 @@ from typing import Any from .._distutils.command import sdist as orig -def walk_revctrl(dirname: str = ...) -> None: ... +def walk_revctrl(dirname: str = "") -> None: ... class sdist(orig.sdist): user_options: Any diff --git a/stubs/setuptools/setuptools/command/setopt.pyi b/stubs/setuptools/setuptools/command/setopt.pyi index 0461717a9b64..8ad8da2ce130 100644 --- a/stubs/setuptools/setuptools/command/setopt.pyi +++ b/stubs/setuptools/setuptools/command/setopt.pyi @@ -3,8 +3,8 @@ from typing import Any from setuptools import Command -def config_file(kind: str = ...): ... -def edit_config(filename, settings, dry_run: bool = ...) -> None: ... +def config_file(kind: str = "local"): ... +def edit_config(filename, settings, dry_run: bool = False) -> None: ... class option_base(Command): user_options: Any diff --git a/stubs/setuptools/setuptools/command/test.pyi b/stubs/setuptools/setuptools/command/test.pyi index 1b7a32f4f4b6..004b534e79dd 100644 --- a/stubs/setuptools/setuptools/command/test.pyi +++ b/stubs/setuptools/setuptools/command/test.pyi @@ -11,7 +11,7 @@ _T = TypeVar("_T") class ScanningLoader(TestLoader): def __init__(self) -> None: ... - def loadTestsFromModule(self, module: ModuleType, pattern: Incomplete | None = ...) -> list[TestSuite]: ... # type: ignore[override] + def loadTestsFromModule(self, module: ModuleType, pattern: Incomplete | None = None) -> list[TestSuite]: ... # type: ignore[override] class NonDataProperty(Generic[_T]): fget: Callable[..., _T] @@ -33,7 +33,7 @@ class test(Command): @NonDataProperty def test_args(self) -> list[str]: ... def with_project_on_sys_path(self, func) -> None: ... - def project_on_sys_path(self, include_dists=...): ... + def project_on_sys_path(self, include_dists=[]): ... @staticmethod def paths_on_pythonpath(paths) -> None: ... @staticmethod diff --git a/stubs/setuptools/setuptools/config.pyi b/stubs/setuptools/setuptools/config.pyi index 251f2b803b10..0d865c53cb6f 100644 --- a/stubs/setuptools/setuptools/config.pyi +++ b/stubs/setuptools/setuptools/config.pyi @@ -1,2 +1,2 @@ -def read_configuration(filepath, find_others: bool = ..., ignore_option_errors: bool = ...): ... -def parse_configuration(distribution, command_options, ignore_option_errors: bool = ...): ... +def read_configuration(filepath, find_others: bool = False, ignore_option_errors: bool = False): ... +def parse_configuration(distribution, command_options, ignore_option_errors: bool = False): ... diff --git a/stubs/setuptools/setuptools/depends.pyi b/stubs/setuptools/setuptools/depends.pyi index a34fe5392bfb..072ebc51e524 100644 --- a/stubs/setuptools/setuptools/depends.pyi +++ b/stubs/setuptools/setuptools/depends.pyi @@ -6,15 +6,15 @@ class Require: name, requested_version, module, - homepage: str = ..., - attribute: Incomplete | None = ..., - format: Incomplete | None = ..., + homepage: str = "", + attribute: Incomplete | None = None, + format: Incomplete | None = None, ) -> None: ... def full_name(self): ... def version_ok(self, version): ... - def get_version(self, paths: Incomplete | None = ..., default: str = ...): ... - def is_present(self, paths: Incomplete | None = ...): ... - def is_current(self, paths: Incomplete | None = ...): ... + def get_version(self, paths: Incomplete | None = None, default: str = "unknown"): ... + def is_present(self, paths: Incomplete | None = None): ... + def is_current(self, paths: Incomplete | None = None): ... -def get_module_constant(module, symbol, default: int = ..., paths: Incomplete | None = ...): ... -def extract_constant(code, symbol, default: int = ...): ... +def get_module_constant(module, symbol, default: int = -1, paths: Incomplete | None = None): ... +def extract_constant(code, symbol, default: int = -1): ... diff --git a/stubs/setuptools/setuptools/dist.pyi b/stubs/setuptools/setuptools/dist.pyi index 3e34d9b1b6f9..8ace1407a35b 100644 --- a/stubs/setuptools/setuptools/dist.pyi +++ b/stubs/setuptools/setuptools/dist.pyi @@ -13,7 +13,7 @@ class Distribution(_Distribution): def __init__(self, attrs: MutableMapping[str, Any] | None = None) -> None: ... def warn_dash_deprecation(self, opt: str, section: str) -> str: ... def make_option_lowercase(self, opt: str, section: str) -> str: ... - def parse_config_files(self, filenames: Iterable[str] | None = ..., ignore_option_errors: bool = ...) -> None: ... + def parse_config_files(self, filenames: Iterable[str] | None = None, ignore_option_errors: bool = False) -> None: ... def fetch_build_eggs(self, requires: str | Iterable[str]): ... def get_egg_cache_dir(self) -> str: ... def fetch_build_egg(self, req): ... diff --git a/stubs/setuptools/setuptools/extern/__init__.pyi b/stubs/setuptools/setuptools/extern/__init__.pyi index 864dc18dcb98..080cdf737a86 100644 --- a/stubs/setuptools/setuptools/extern/__init__.pyi +++ b/stubs/setuptools/setuptools/extern/__init__.pyi @@ -5,13 +5,13 @@ class VendorImporter: root_name: Any vendored_names: Any vendor_pkg: Any - def __init__(self, root_name, vendored_names=..., vendor_pkg: Incomplete | None = ...) -> None: ... + def __init__(self, root_name, vendored_names=(), vendor_pkg: Incomplete | None = None) -> None: ... @property def search_path(self) -> None: ... def load_module(self, fullname): ... def create_module(self, spec): ... def exec_module(self, module) -> None: ... - def find_spec(self, fullname, path: Incomplete | None = ..., target: Incomplete | None = ...): ... + def find_spec(self, fullname, path: Incomplete | None = None, target: Incomplete | None = None): ... def install(self) -> None: ... names: Any diff --git a/stubs/setuptools/setuptools/glob.pyi b/stubs/setuptools/setuptools/glob.pyi index 3da334debc03..3ae65a804a0a 100644 --- a/stubs/setuptools/setuptools/glob.pyi +++ b/stubs/setuptools/setuptools/glob.pyi @@ -1,3 +1,3 @@ -def glob(pathname, recursive: bool = ...): ... -def iglob(pathname, recursive: bool = ...): ... +def glob(pathname, recursive: bool = False): ... +def iglob(pathname, recursive: bool = False): ... def escape(pathname): ... diff --git a/stubs/setuptools/setuptools/msvc.pyi b/stubs/setuptools/setuptools/msvc.pyi index 952f1189386b..6ad7b176a91b 100644 --- a/stubs/setuptools/setuptools/msvc.pyi +++ b/stubs/setuptools/setuptools/msvc.pyi @@ -12,9 +12,9 @@ class PlatformInfo: def target_cpu(self): ... def target_is_x86(self): ... def current_is_x86(self): ... - def current_dir(self, hidex86: bool = ..., x64: bool = ...): ... - def target_dir(self, hidex86: bool = ..., x64: bool = ...): ... - def cross_dir(self, forcex86: bool = ...): ... + def current_dir(self, hidex86: bool = False, x64: bool = False): ... + def target_dir(self, hidex86: bool = False, x64: bool = False): ... + def cross_dir(self, forcex86: bool = False): ... class RegistryInfo: HKEYS: Incomplete @@ -38,7 +38,7 @@ class RegistryInfo: def netfx_sdk(self): ... @property def windows_kits_roots(self): ... - def microsoft(self, key, x86: bool = ...): ... + def microsoft(self, key, x86: bool = False): ... def lookup(self, key, name): ... class SystemInfo: @@ -49,7 +49,7 @@ class SystemInfo: pi: Incomplete known_vs_paths: Incomplete vs_ver: Incomplete - def __init__(self, registry_info, vc_ver: Incomplete | None = ...) -> None: ... + def __init__(self, registry_info, vc_ver: Incomplete | None = None) -> None: ... def find_reg_vs_vers(self): ... def find_programdata_vs_vers(self): ... @property @@ -87,7 +87,7 @@ class EnvironmentInfo: pi: Incomplete ri: Incomplete si: Incomplete - def __init__(self, arch, vc_ver: Incomplete | None = ..., vc_min_ver: int = ...) -> None: ... + def __init__(self, arch, vc_ver: Incomplete | None = None, vc_min_ver: int = 0) -> None: ... @property def vs_ver(self): ... @property @@ -132,4 +132,4 @@ class EnvironmentInfo: def FSharp(self): ... @property def VCRuntimeRedist(self): ... - def return_env(self, exists: bool = ...): ... + def return_env(self, exists: bool = True): ... diff --git a/stubs/setuptools/setuptools/package_index.pyi b/stubs/setuptools/setuptools/package_index.pyi index f672a1047f16..171745051de9 100644 --- a/stubs/setuptools/setuptools/package_index.pyi +++ b/stubs/setuptools/setuptools/package_index.pyi @@ -5,9 +5,9 @@ from typing import Any from pkg_resources import Environment def parse_bdist_wininst(name): ... -def distros_for_url(url, metadata: Incomplete | None = ...) -> None: ... +def distros_for_url(url, metadata: Incomplete | None = None) -> None: ... def interpret_distro_name( - location, basename, metadata, py_version: Incomplete | None = ..., precedence=..., platform: Incomplete | None = ... + location, basename, metadata, py_version: Incomplete | None = None, precedence=1, platform: Incomplete | None = None ) -> None: ... class ContentChecker: @@ -36,18 +36,24 @@ class PackageIndex(Environment): to_scan: Any opener: Any def __init__( - self, index_url: str = ..., hosts=..., ca_bundle: Incomplete | None = ..., verify_ssl: bool = ..., *args, **kw + self, + index_url: str = "https://pypi.org/simple/", + hosts=("*",), + ca_bundle: Incomplete | None = None, + verify_ssl: bool = True, + *args, + **kw, ) -> None: ... - def process_url(self, url, retrieve: bool = ...) -> None: ... - def process_filename(self, fn, nested: bool = ...) -> None: ... - def url_ok(self, url, fatal: bool = ...): ... + def process_url(self, url, retrieve: bool = False) -> None: ... + def process_filename(self, fn, nested: bool = False) -> None: ... + def url_ok(self, url, fatal: bool = False): ... def scan_egg_links(self, search_path) -> None: ... def scan_egg_link(self, path, entry) -> None: ... def process_index(self, url, page): ... def need_version_info(self, url) -> None: ... - def scan_all(self, msg: Incomplete | None = ..., *args) -> None: ... + def scan_all(self, msg: Incomplete | None = None, *args) -> None: ... def find_packages(self, requirement) -> None: ... - def obtain(self, requirement, installer: Incomplete | None = ...): ... + def obtain(self, requirement, installer: Incomplete | None = None): ... def check_hash(self, checker, filename, tfp) -> None: ... def add_find_links(self, urls) -> None: ... def prescan(self) -> None: ... @@ -57,16 +63,16 @@ class PackageIndex(Environment): self, requirement, tmpdir, - force_scan: bool = ..., - source: bool = ..., - develop_ok: bool = ..., - local_index: Incomplete | None = ..., + force_scan: bool = False, + source: bool = False, + develop_ok: bool = False, + local_index: Incomplete | None = None, ): ... - def fetch(self, requirement, tmpdir, force_scan: bool = ..., source: bool = ...): ... + def fetch(self, requirement, tmpdir, force_scan: bool = False, source: bool = False): ... def gen_setup(self, filename, fragment, tmpdir): ... dl_blocksize: int def reporthook(self, url, filename, blocknum, blksize, size) -> None: ... - def open_url(self, url, warning: Incomplete | None = ...): ... + def open_url(self, url, warning: Incomplete | None = None): ... def scan_url(self, url) -> None: ... def debug(self, msg, *args) -> None: ... def info(self, msg, *args) -> None: ... diff --git a/stubs/setuptools/setuptools/sandbox.pyi b/stubs/setuptools/setuptools/sandbox.pyi index 71fb7cf5cab6..89e141184a65 100644 --- a/stubs/setuptools/setuptools/sandbox.pyi +++ b/stubs/setuptools/setuptools/sandbox.pyi @@ -28,7 +28,7 @@ class DirectorySandbox(AbstractSandbox): write_ops: Any def __init__(self, sandbox, exceptions=...) -> None: ... def tmpnam(self) -> None: ... - def open(self, file, flags, mode: int = ..., *args, **kw): ... + def open(self, file, flags, mode: int = 511, *args, **kw): ... class SandboxViolation(DistutilsError): tmpl: Any diff --git a/stubs/simplejson/simplejson/encoder.pyi b/stubs/simplejson/simplejson/encoder.pyi index a3603029ada0..88c3da92c93f 100644 --- a/stubs/simplejson/simplejson/encoder.pyi +++ b/stubs/simplejson/simplejson/encoder.pyi @@ -5,6 +5,6 @@ class JSONEncoder: def __init__(self, *args: Any, **kwargs: Any) -> None: ... def encode(self, o: Any) -> str: ... def default(self, o: Any) -> NoReturn: ... - def iterencode(self, o: Any, _one_shot: bool = ...) -> Iterator[str]: ... + def iterencode(self, o: Any, _one_shot: bool = False) -> Iterator[str]: ... class JSONEncoderForHTML(JSONEncoder): ... diff --git a/stubs/simplejson/simplejson/errors.pyi b/stubs/simplejson/simplejson/errors.pyi index 10cff3f28203..b4b6539c652e 100644 --- a/stubs/simplejson/simplejson/errors.pyi +++ b/stubs/simplejson/simplejson/errors.pyi @@ -1,7 +1,7 @@ __all__ = ["JSONDecodeError"] def linecol(doc: str, pos: int) -> tuple[int, int]: ... -def errmsg(msg: str, doc: str, pos: int, end: int | None = ...) -> str: ... +def errmsg(msg: str, doc: str, pos: int, end: int | None = None) -> str: ... class JSONDecodeError(ValueError): msg: str @@ -12,5 +12,5 @@ class JSONDecodeError(ValueError): colno: int endlineno: int | None endcolno: int | None - def __init__(self, msg: str, doc: str, pos: int, end: int | None = ...) -> None: ... + def __init__(self, msg: str, doc: str, pos: int, end: int | None = None) -> None: ... def __reduce__(self) -> tuple[JSONDecodeError, tuple[str, str, int, int | None]]: ... diff --git a/stubs/six/six/__init__.pyi b/stubs/six/six/__init__.pyi index a5333e1ffb63..d3de453e0c3b 100644 --- a/stubs/six/six/__init__.pyi +++ b/stubs/six/six/__init__.pyi @@ -84,16 +84,16 @@ def assertNotRegex(self: unittest.TestCase, text: AnyStr, expected_regex: AnyStr exec_ = exec -def reraise(tp: type[BaseException] | None, value: BaseException | None, tb: types.TracebackType | None = ...) -> NoReturn: ... +def reraise(tp: type[BaseException] | None, value: BaseException | None, tb: types.TracebackType | None = None) -> NoReturn: ... def raise_from(value: BaseException | type[BaseException], from_value: BaseException | None) -> NoReturn: ... print_ = print def with_metaclass(meta: type, *bases: type) -> type: ... def add_metaclass(metaclass: type) -> IdentityFunction: ... -def ensure_binary(s: bytes | str, encoding: str = ..., errors: str = ...) -> bytes: ... -def ensure_str(s: bytes | str, encoding: str = ..., errors: str = ...) -> str: ... -def ensure_text(s: bytes | str, encoding: str = ..., errors: str = ...) -> str: ... +def ensure_binary(s: bytes | str, encoding: str = "utf-8", errors: str = "strict") -> bytes: ... +def ensure_str(s: bytes | str, encoding: str = "utf-8", errors: str = "strict") -> str: ... +def ensure_text(s: bytes | str, encoding: str = "utf-8", errors: str = "strict") -> str: ... def python_2_unicode_compatible(klass: _T) -> _T: ... class _LazyDescr: @@ -103,13 +103,15 @@ class _LazyDescr: class MovedModule(_LazyDescr): mod: str - def __init__(self, name: str, old: str, new: str | None = ...) -> None: ... + def __init__(self, name: str, old: str, new: str | None = None) -> None: ... def __getattr__(self, attr: str) -> Any: ... class MovedAttribute(_LazyDescr): mod: str attr: str - def __init__(self, name: str, old_mod: str, new_mod: str, old_attr: str | None = ..., new_attr: str | None = ...) -> None: ... + def __init__( + self, name: str, old_mod: str, new_mod: str, old_attr: str | None = None, new_attr: str | None = None + ) -> None: ... def add_move(move: MovedModule | MovedAttribute) -> None: ... def remove_move(name: str) -> None: ... diff --git a/stubs/slumber/slumber/__init__.pyi b/stubs/slumber/slumber/__init__.pyi index f35d7855ed00..cd581707085a 100644 --- a/stubs/slumber/slumber/__init__.pyi +++ b/stubs/slumber/slumber/__init__.pyi @@ -14,14 +14,14 @@ class ResourceAttributesMixin: class Resource(ResourceAttributesMixin): def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def __call__(self, id: str | None = ..., format: str | None = ..., url_override: str | None = ...) -> Self: ... + def __call__(self, id: str | None = None, format: str | None = None, url_override: str | None = None) -> Self: ... def as_raw(self) -> Self: ... def get(self, **kwargs: Any) -> Response: ... def options(self, **kwargs: Any) -> Response: ... def head(self, **kwargs: Any) -> Response: ... - def post(self, data: _Data | None = ..., files: _Files | None = ..., **kwargs: Any) -> Response: ... - def patch(self, data: _Data | None = ..., files: _Files | None = ..., **kwargs: Any) -> Response: ... - def put(self, data: _Data | None = ..., files: _Files | None = ..., **kwargs: Any) -> Response: ... + def post(self, data: _Data | None = None, files: _Files | None = None, **kwargs: Any) -> Response: ... + def patch(self, data: _Data | None = None, files: _Files | None = None, **kwargs: Any) -> Response: ... + def put(self, data: _Data | None = None, files: _Files | None = None, **kwargs: Any) -> Response: ... def delete(self, **kwargs: Any) -> Response: ... def url(self) -> str: ... @@ -29,11 +29,11 @@ class API(ResourceAttributesMixin): resource_class: type[Resource] def __init__( self, - base_url: str | None = ..., - auth: _Auth | None = ..., - format: str | None = ..., - append_slash: bool = ..., - session: Session | None = ..., - serializer: Serializer | None = ..., + base_url: str | None = None, + auth: _Auth | None = None, + format: str | None = None, + append_slash: bool = True, + session: Session | None = None, + serializer: Serializer | None = None, raw: bool = ..., ) -> None: ... diff --git a/stubs/slumber/slumber/serialize.pyi b/stubs/slumber/slumber/serialize.pyi index b9256756a8cf..e806a448e9b8 100644 --- a/stubs/slumber/slumber/serialize.pyi +++ b/stubs/slumber/slumber/serialize.pyi @@ -21,8 +21,8 @@ class YamlSerializer(BaseSerializer): class Serializer: serializers: list[BaseSerializer] default: str - def __init__(self, default: str | None = ..., serializers: list[BaseSerializer] | None = ...) -> None: ... - def get_serializer(self, name: str | None = ..., content_type: str | None = ...) -> BaseSerializer: ... - def loads(self, data: _Data, format: str | None = ...) -> Any: ... - def dumps(self, data: _Data, format: str | None = ...) -> Any: ... - def get_content_type(self, format: str | None = ...) -> str: ... + def __init__(self, default: str | None = None, serializers: list[BaseSerializer] | None = None) -> None: ... + def get_serializer(self, name: str | None = None, content_type: str | None = None) -> BaseSerializer: ... + def loads(self, data: _Data, format: str | None = None) -> Any: ... + def dumps(self, data: _Data, format: str | None = None) -> Any: ... + def get_content_type(self, format: str | None = None) -> str: ... diff --git a/stubs/stdlib-list/stdlib_list/base.pyi b/stubs/stdlib-list/stdlib_list/base.pyi index 83321049eb6d..a9d4db5873b3 100644 --- a/stubs/stdlib-list/stdlib_list/base.pyi +++ b/stubs/stdlib-list/stdlib_list/base.pyi @@ -2,5 +2,5 @@ long_versions: list[str] short_versions: list[str] def get_canonical_version(version: str) -> str: ... -def stdlib_list(version: str | None = ...) -> list[str]: ... -def in_stdlib(module_name: str, version: str | None = ...) -> bool: ... +def stdlib_list(version: str | None = None) -> list[str]: ... +def in_stdlib(module_name: str, version: str | None = None) -> bool: ... diff --git a/stubs/stripe/stripe/__init__.pyi b/stubs/stripe/stripe/__init__.pyi index d05cf52b6f94..c1823fb933e7 100644 --- a/stubs/stripe/stripe/__init__.pyi +++ b/stubs/stripe/stripe/__init__.pyi @@ -21,5 +21,5 @@ ca_bundle_path: Any log: Any def set_app_info( - name, partner_id: Incomplete | None = ..., url: Incomplete | None = ..., version: Incomplete | None = ... + name, partner_id: Incomplete | None = None, url: Incomplete | None = None, version: Incomplete | None = None ) -> None: ... diff --git a/stubs/stripe/stripe/api_requestor.pyi b/stubs/stripe/stripe/api_requestor.pyi index 858371a18c5f..cf9a41a9ccc9 100644 --- a/stubs/stripe/stripe/api_requestor.pyi +++ b/stubs/stripe/stripe/api_requestor.pyi @@ -12,22 +12,27 @@ class APIRequestor: stripe_account: Any def __init__( self, - key: Incomplete | None = ..., - client: Incomplete | None = ..., - api_base: Incomplete | None = ..., - api_version: Incomplete | None = ..., - account: Incomplete | None = ..., + key: Incomplete | None = None, + client: Incomplete | None = None, + api_base: Incomplete | None = None, + api_version: Incomplete | None = None, + account: Incomplete | None = None, ) -> None: ... @classmethod def format_app_info(cls, info): ... - def request(self, method, url, params: Incomplete | None = ..., headers: Incomplete | None = ...): ... - def request_stream(self, method, url, params: Incomplete | None = ..., headers: Incomplete | None = ...): ... + def request(self, method, url, params: Incomplete | None = None, headers: Incomplete | None = None): ... + def request_stream(self, method, url, params: Incomplete | None = None, headers: Incomplete | None = None): ... def handle_error_response(self, rbody, rcode, resp, rheaders) -> None: ... def specific_api_error(self, rbody, rcode, resp, rheaders, error_data): ... def specific_oauth_error(self, rbody, rcode, resp, rheaders, error_code): ... def request_headers(self, api_key, method): ... def request_raw( - self, method, url, params: Incomplete | None = ..., supplied_headers: Incomplete | None = ..., is_streaming: bool = ... + self, + method, + url, + params: Incomplete | None = None, + supplied_headers: Incomplete | None = None, + is_streaming: bool = False, ): ... def interpret_response(self, rbody, rcode, rheaders): ... def interpret_streaming_response(self, stream, rcode, rheaders): ... diff --git a/stubs/stripe/stripe/api_resources/abstract/api_resource.pyi b/stubs/stripe/stripe/api_resources/abstract/api_resource.pyi index 8891f1133801..0e9406eb4636 100644 --- a/stubs/stripe/stripe/api_resources/abstract/api_resource.pyi +++ b/stubs/stripe/stripe/api_resources/abstract/api_resource.pyi @@ -6,7 +6,7 @@ from stripe.stripe_object import StripeObject as StripeObject class APIResource(StripeObject): @classmethod - def retrieve(cls, id, api_key: Incomplete | None = ..., **params) -> Self: ... + def retrieve(cls, id, api_key: Incomplete | None = None, **params) -> Self: ... def refresh(self) -> Self: ... @classmethod def class_url(cls) -> str: ... diff --git a/stubs/stripe/stripe/api_resources/abstract/createable_api_resource.pyi b/stubs/stripe/stripe/api_resources/abstract/createable_api_resource.pyi index 1191ea7ff600..b7f0c021099c 100644 --- a/stubs/stripe/stripe/api_resources/abstract/createable_api_resource.pyi +++ b/stubs/stripe/stripe/api_resources/abstract/createable_api_resource.pyi @@ -8,9 +8,9 @@ class CreateableAPIResource(APIResource): @classmethod def create( cls, - api_key: Incomplete | None = ..., - idempotency_key: str | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + idempotency_key: str | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, **params, ) -> Self: ... diff --git a/stubs/stripe/stripe/api_resources/abstract/custom_method.pyi b/stubs/stripe/stripe/api_resources/abstract/custom_method.pyi index 8ac66a251bdc..4e0a71b545fa 100644 --- a/stubs/stripe/stripe/api_resources/abstract/custom_method.pyi +++ b/stubs/stripe/stripe/api_resources/abstract/custom_method.pyi @@ -1,3 +1,3 @@ from _typeshed import Incomplete -def custom_method(name, http_verb, http_path: Incomplete | None = ..., is_streaming: bool = ...): ... +def custom_method(name, http_verb, http_path: Incomplete | None = None, is_streaming: bool = False): ... diff --git a/stubs/stripe/stripe/api_resources/abstract/listable_api_resource.pyi b/stubs/stripe/stripe/api_resources/abstract/listable_api_resource.pyi index 926e41fcf472..13ad6ff82bb2 100644 --- a/stubs/stripe/stripe/api_resources/abstract/listable_api_resource.pyi +++ b/stubs/stripe/stripe/api_resources/abstract/listable_api_resource.pyi @@ -12,8 +12,8 @@ class ListableAPIResource(APIResource): @classmethod def list( cls, - api_key: Incomplete | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, **params, ) -> ListObject: ... diff --git a/stubs/stripe/stripe/api_resources/abstract/nested_resource_class_methods.pyi b/stubs/stripe/stripe/api_resources/abstract/nested_resource_class_methods.pyi index 080ce1753308..a1687f3916fa 100644 --- a/stubs/stripe/stripe/api_resources/abstract/nested_resource_class_methods.pyi +++ b/stubs/stripe/stripe/api_resources/abstract/nested_resource_class_methods.pyi @@ -3,5 +3,5 @@ from _typeshed import Incomplete from stripe import api_requestor as api_requestor def nested_resource_class_methods( - resource, path: Incomplete | None = ..., operations: Incomplete | None = ..., resource_plural: Incomplete | None = ... + resource, path: Incomplete | None = None, operations: Incomplete | None = None, resource_plural: Incomplete | None = None ): ... diff --git a/stubs/stripe/stripe/api_resources/abstract/updateable_api_resource.pyi b/stubs/stripe/stripe/api_resources/abstract/updateable_api_resource.pyi index ffbcbb141a65..00ede54fa75f 100644 --- a/stubs/stripe/stripe/api_resources/abstract/updateable_api_resource.pyi +++ b/stubs/stripe/stripe/api_resources/abstract/updateable_api_resource.pyi @@ -5,4 +5,4 @@ from stripe.api_resources.abstract.api_resource import APIResource as APIResourc class UpdateableAPIResource(APIResource): @classmethod def modify(cls, sid: str, **params) -> Self: ... - def save(self, idempotency_key: str | None = ...) -> Self: ... + def save(self, idempotency_key: str | None = None) -> Self: ... diff --git a/stubs/stripe/stripe/api_resources/abstract/verify_mixin.pyi b/stubs/stripe/stripe/api_resources/abstract/verify_mixin.pyi index 139533f26695..01a1ce2c0bcc 100644 --- a/stubs/stripe/stripe/api_resources/abstract/verify_mixin.pyi +++ b/stubs/stripe/stripe/api_resources/abstract/verify_mixin.pyi @@ -1,2 +1,2 @@ class VerifyMixin: - def verify(self, idempotency_key: str | None = ..., **params): ... + def verify(self, idempotency_key: str | None = None, **params): ... diff --git a/stubs/stripe/stripe/api_resources/account.pyi b/stubs/stripe/stripe/api_resources/account.pyi index 98c789604b66..901dd7723242 100644 --- a/stubs/stripe/stripe/api_resources/account.pyi +++ b/stubs/stripe/stripe/api_resources/account.pyi @@ -12,20 +12,20 @@ from stripe.api_resources.abstract import ( class Account(CreateableAPIResource, DeletableAPIResource, ListableAPIResource): OBJECT_NAME: str - def reject(self, idempotency_key: str | None = ..., **params): ... + def reject(self, idempotency_key: str | None = None, **params): ... @classmethod - def retrieve(cls, id: Incomplete | None = ..., api_key: Incomplete | None = ..., **params): ... + def retrieve(cls, id: Incomplete | None = None, api_key: Incomplete | None = None, **params): ... @classmethod - def modify(cls, id: Incomplete | None = ..., **params): ... + def modify(cls, id: Incomplete | None = None, **params): ... def instance_url(self): ... - def persons(self, idempotency_key: str | None = ..., **params): ... + def persons(self, idempotency_key: str | None = None, **params): ... def deauthorize(self, **params): ... def serialize(self, previous): ... @classmethod - def capabilitys_url(cls, id, nested_id=...): ... + def capabilitys_url(cls, id, nested_id=None): ... @classmethod def capabilitys_request( - cls, method, url, api_key=..., idempotency_key=..., stripe_version=..., stripe_account=..., **params + cls, method, url, api_key=None, idempotency_key=None, stripe_version=None, stripe_account=None, **params ): ... @classmethod def retrieve_capability(cls, id, nested_id, **params): ... @@ -34,10 +34,10 @@ class Account(CreateableAPIResource, DeletableAPIResource, ListableAPIResource): @classmethod def list_capabilities(cls, id, **params): ... @classmethod - def external_accounts_url(cls, id, nested_id=...): ... + def external_accounts_url(cls, id, nested_id=None): ... @classmethod def external_accounts_request( - cls, method, url, api_key=..., idempotency_key=..., stripe_version=..., stripe_account=..., **params + cls, method, url, api_key=None, idempotency_key=None, stripe_version=None, stripe_account=None, **params ): ... @classmethod def create_external_account(cls, id, **params): ... @@ -50,17 +50,19 @@ class Account(CreateableAPIResource, DeletableAPIResource, ListableAPIResource): @classmethod def list_external_accounts(cls, id, **params): ... @classmethod - def login_links_url(cls, id, nested_id=...): ... + def login_links_url(cls, id, nested_id=None): ... @classmethod def login_links_request( - cls, method, url, api_key=..., idempotency_key=..., stripe_version=..., stripe_account=..., **params + cls, method, url, api_key=None, idempotency_key=None, stripe_version=None, stripe_account=None, **params ): ... @classmethod def create_login_link(cls, id, **params): ... @classmethod - def persons_url(cls, id, nested_id=...): ... + def persons_url(cls, id, nested_id=None): ... @classmethod - def persons_request(cls, method, url, api_key=..., idempotency_key=..., stripe_version=..., stripe_account=..., **params): ... + def persons_request( + cls, method, url, api_key=None, idempotency_key=None, stripe_version=None, stripe_account=None, **params + ): ... @classmethod def create_person(cls, id, **params): ... @classmethod diff --git a/stubs/stripe/stripe/api_resources/alipay_account.pyi b/stubs/stripe/stripe/api_resources/alipay_account.pyi index f18475a6774f..3e475c9a2d9b 100644 --- a/stubs/stripe/stripe/api_resources/alipay_account.pyi +++ b/stubs/stripe/stripe/api_resources/alipay_account.pyi @@ -16,8 +16,8 @@ class AlipayAccount(DeletableAPIResource, UpdateableAPIResource): def retrieve( cls, id, - api_key: Incomplete | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, **params, ) -> NoReturn: ... diff --git a/stubs/stripe/stripe/api_resources/application_fee.pyi b/stubs/stripe/stripe/api_resources/application_fee.pyi index e9d275a84485..722ba2f62ad8 100644 --- a/stubs/stripe/stripe/api_resources/application_fee.pyi +++ b/stubs/stripe/stripe/api_resources/application_fee.pyi @@ -5,4 +5,4 @@ from stripe.api_resources.abstract import ( class ApplicationFee(ListableAPIResource): OBJECT_NAME: str - def refund(self, idempotency_key: str | None = ..., **params): ... + def refund(self, idempotency_key: str | None = None, **params): ... diff --git a/stubs/stripe/stripe/api_resources/application_fee_refund.pyi b/stubs/stripe/stripe/api_resources/application_fee_refund.pyi index 865bb0fc9ed9..7014f67f62a3 100644 --- a/stubs/stripe/stripe/api_resources/application_fee_refund.pyi +++ b/stubs/stripe/stripe/api_resources/application_fee_refund.pyi @@ -11,4 +11,4 @@ class ApplicationFeeRefund(UpdateableAPIResource): def modify(cls, fee, sid: str, **params) -> Self: ... # type: ignore[override] def instance_url(self) -> str: ... @classmethod - def retrieve(cls, id, api_key: Incomplete | None = ..., **params) -> NoReturn: ... + def retrieve(cls, id, api_key: Incomplete | None = None, **params) -> NoReturn: ... diff --git a/stubs/stripe/stripe/api_resources/bank_account.pyi b/stubs/stripe/stripe/api_resources/bank_account.pyi index 5698d9146087..7bfc50c175f9 100644 --- a/stubs/stripe/stripe/api_resources/bank_account.pyi +++ b/stubs/stripe/stripe/api_resources/bank_account.pyi @@ -19,8 +19,8 @@ class BankAccount(DeletableAPIResource, UpdateableAPIResource, VerifyMixin): def retrieve( cls, id, - api_key: Incomplete | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, **params, ) -> NoReturn: ... diff --git a/stubs/stripe/stripe/api_resources/capability.pyi b/stubs/stripe/stripe/api_resources/capability.pyi index fc0a30b36bc8..34cc62b6df4c 100644 --- a/stubs/stripe/stripe/api_resources/capability.pyi +++ b/stubs/stripe/stripe/api_resources/capability.pyi @@ -10,4 +10,4 @@ class Capability(UpdateableAPIResource): @classmethod def modify(cls, sid, **params) -> NoReturn: ... @classmethod - def retrieve(cls, id, api_key: Incomplete | None = ..., **params) -> NoReturn: ... + def retrieve(cls, id, api_key: Incomplete | None = None, **params) -> NoReturn: ... diff --git a/stubs/stripe/stripe/api_resources/card.pyi b/stubs/stripe/stripe/api_resources/card.pyi index 663cb32b6509..85da7d928b4c 100644 --- a/stubs/stripe/stripe/api_resources/card.pyi +++ b/stubs/stripe/stripe/api_resources/card.pyi @@ -19,8 +19,8 @@ class Card(DeletableAPIResource, UpdateableAPIResource): def retrieve( cls, id, - api_key: Incomplete | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, **params, ) -> NoReturn: ... diff --git a/stubs/stripe/stripe/api_resources/charge.pyi b/stubs/stripe/stripe/api_resources/charge.pyi index a9c6246683ec..57bc5e979b73 100644 --- a/stubs/stripe/stripe/api_resources/charge.pyi +++ b/stubs/stripe/stripe/api_resources/charge.pyi @@ -9,9 +9,9 @@ from stripe.api_resources.abstract import ( class Charge(CreateableAPIResource, ListableAPIResource, SearchableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def capture(self, idempotency_key: str | None = ..., **params): ... - def refund(self, idempotency_key: str | None = ..., **params): ... - def update_dispute(self, idempotency_key: str | None = ..., **params): ... - def close_dispute(self, idempotency_key: str | None = ..., **params): ... - def mark_as_fraudulent(self, idempotency_key: str | None = ...): ... - def mark_as_safe(self, idempotency_key: str | None = ...): ... + def capture(self, idempotency_key: str | None = None, **params): ... + def refund(self, idempotency_key: str | None = None, **params): ... + def update_dispute(self, idempotency_key: str | None = None, **params): ... + def close_dispute(self, idempotency_key: str | None = None, **params): ... + def mark_as_fraudulent(self, idempotency_key: str | None = None): ... + def mark_as_safe(self, idempotency_key: str | None = None): ... diff --git a/stubs/stripe/stripe/api_resources/checkout/session.pyi b/stubs/stripe/stripe/api_resources/checkout/session.pyi index 47ca104624b1..b4cc12bf6088 100644 --- a/stubs/stripe/stripe/api_resources/checkout/session.pyi +++ b/stubs/stripe/stripe/api_resources/checkout/session.pyi @@ -13,4 +13,4 @@ class Session(CreateableAPIResource, ListableAPIResource): def expire(cls, session, api_key=None, stripe_version=None, stripe_account=None, **params): ... @overload @classmethod - def expire(cls, idempotency_key: str | None = ..., **params): ... + def expire(cls, idempotency_key: str | None = None, **params): ... diff --git a/stubs/stripe/stripe/api_resources/credit_note.pyi b/stubs/stripe/stripe/api_resources/credit_note.pyi index 906b80a1e443..ae42f830407d 100644 --- a/stubs/stripe/stripe/api_resources/credit_note.pyi +++ b/stubs/stripe/stripe/api_resources/credit_note.pyi @@ -10,12 +10,12 @@ from stripe.api_resources.abstract import ( class CreditNote(CreateableAPIResource, ListableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def void_credit_note(self, idempotency_key: str | None = ..., **params): ... + def void_credit_note(self, idempotency_key: str | None = None, **params): ... @classmethod def preview( cls, - api_key: Incomplete | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, **params, ): ... diff --git a/stubs/stripe/stripe/api_resources/customer.pyi b/stubs/stripe/stripe/api_resources/customer.pyi index 36e3327d99be..c407974cb27d 100644 --- a/stubs/stripe/stripe/api_resources/customer.pyi +++ b/stubs/stripe/stripe/api_resources/customer.pyi @@ -13,10 +13,10 @@ class Customer(CreateableAPIResource, DeletableAPIResource, ListableAPIResource, OBJECT_NAME: str def delete_discount(self, **params) -> None: ... @classmethod - def balance_transactions_url(cls, id, nested_id=...): ... + def balance_transactions_url(cls, id, nested_id=None): ... @classmethod def balance_transactions_request( - cls, method, url, api_key=..., idempotency_key=..., stripe_version=..., stripe_account=..., **params + cls, method, url, api_key=None, idempotency_key=None, stripe_version=None, stripe_account=None, **params ): ... @classmethod def create_balance_transaction(cls, id, **params): ... @@ -27,9 +27,11 @@ class Customer(CreateableAPIResource, DeletableAPIResource, ListableAPIResource, @classmethod def list_balance_transactions(cls, id, **params): ... @classmethod - def sources_url(cls, id, nested_id=...): ... + def sources_url(cls, id, nested_id=None): ... @classmethod - def sources_request(cls, method, url, api_key=..., idempotency_key=..., stripe_version=..., stripe_account=..., **params): ... + def sources_request( + cls, method, url, api_key=None, idempotency_key=None, stripe_version=None, stripe_account=None, **params + ): ... @classmethod def create_source(cls, id, **params): ... @classmethod @@ -41,9 +43,11 @@ class Customer(CreateableAPIResource, DeletableAPIResource, ListableAPIResource, @classmethod def list_sources(cls, id, **params): ... @classmethod - def tax_ids_url(cls, id, nested_id=...): ... + def tax_ids_url(cls, id, nested_id=None): ... @classmethod - def tax_ids_request(cls, method, url, api_key=..., idempotency_key=..., stripe_version=..., stripe_account=..., **params): ... + def tax_ids_request( + cls, method, url, api_key=None, idempotency_key=None, stripe_version=None, stripe_account=None, **params + ): ... @classmethod def create_tax_id(cls, id, **params): ... @classmethod diff --git a/stubs/stripe/stripe/api_resources/customer_balance_transaction.pyi b/stubs/stripe/stripe/api_resources/customer_balance_transaction.pyi index 6a27ca9cfac7..eda8485d981c 100644 --- a/stubs/stripe/stripe/api_resources/customer_balance_transaction.pyi +++ b/stubs/stripe/stripe/api_resources/customer_balance_transaction.pyi @@ -8,4 +8,4 @@ class CustomerBalanceTransaction(APIResource): OBJECT_NAME: str def instance_url(self) -> str: ... @classmethod - def retrieve(cls, id, api_key: Incomplete | None = ..., **params) -> NoReturn: ... + def retrieve(cls, id, api_key: Incomplete | None = None, **params) -> NoReturn: ... diff --git a/stubs/stripe/stripe/api_resources/dispute.pyi b/stubs/stripe/stripe/api_resources/dispute.pyi index 6f79d2aee4fa..3f3114b7dfe0 100644 --- a/stubs/stripe/stripe/api_resources/dispute.pyi +++ b/stubs/stripe/stripe/api_resources/dispute.pyi @@ -6,4 +6,4 @@ from stripe.api_resources.abstract import ( class Dispute(ListableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def close(self, idempotency_key: str | None = ..., **params): ... + def close(self, idempotency_key: str | None = None, **params): ... diff --git a/stubs/stripe/stripe/api_resources/ephemeral_key.pyi b/stubs/stripe/stripe/api_resources/ephemeral_key.pyi index 287efb6b1b6d..6df40287b817 100644 --- a/stubs/stripe/stripe/api_resources/ephemeral_key.pyi +++ b/stubs/stripe/stripe/api_resources/ephemeral_key.pyi @@ -8,9 +8,9 @@ class EphemeralKey(DeletableAPIResource): @classmethod def create( cls, - api_key: Incomplete | None = ..., - idempotency_key: str | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + idempotency_key: str | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, **params, ): ... diff --git a/stubs/stripe/stripe/api_resources/error_object.pyi b/stubs/stripe/stripe/api_resources/error_object.pyi index ba075a8a8d6c..d43b883cb4fa 100644 --- a/stubs/stripe/stripe/api_resources/error_object.pyi +++ b/stubs/stripe/stripe/api_resources/error_object.pyi @@ -6,20 +6,20 @@ class ErrorObject(StripeObject): def refresh_from( self, values, - api_key: Incomplete | None = ..., - partial: bool = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., - last_response: Incomplete | None = ..., + api_key: Incomplete | None = None, + partial: bool = False, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, + last_response: Incomplete | None = None, ): ... class OAuthErrorObject(StripeObject): def refresh_from( self, values, - api_key: Incomplete | None = ..., - partial: bool = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., - last_response: Incomplete | None = ..., + api_key: Incomplete | None = None, + partial: bool = False, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, + last_response: Incomplete | None = None, ): ... diff --git a/stubs/stripe/stripe/api_resources/file.pyi b/stubs/stripe/stripe/api_resources/file.pyi index 9c3198560696..d524c8596a92 100644 --- a/stubs/stripe/stripe/api_resources/file.pyi +++ b/stubs/stripe/stripe/api_resources/file.pyi @@ -11,10 +11,10 @@ class File(ListableAPIResource): @classmethod def create( cls, - api_key: Incomplete | None = ..., - api_version: Incomplete | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + api_version: Incomplete | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, **params, ): ... diff --git a/stubs/stripe/stripe/api_resources/identity/verification_session.pyi b/stubs/stripe/stripe/api_resources/identity/verification_session.pyi index 5a9e29c63837..c9e5e42f769c 100644 --- a/stubs/stripe/stripe/api_resources/identity/verification_session.pyi +++ b/stubs/stripe/stripe/api_resources/identity/verification_session.pyi @@ -7,5 +7,5 @@ from stripe.api_resources.abstract import ( class VerificationSession(CreateableAPIResource, ListableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def cancel(self, idempotency_key: str | None = ..., **params): ... - def redact(self, idempotency_key: str | None = ..., **params): ... + def cancel(self, idempotency_key: str | None = None, **params): ... + def redact(self, idempotency_key: str | None = None, **params): ... diff --git a/stubs/stripe/stripe/api_resources/invoice.pyi b/stubs/stripe/stripe/api_resources/invoice.pyi index 50d8c9f312a8..855af6765124 100644 --- a/stubs/stripe/stripe/api_resources/invoice.pyi +++ b/stubs/stripe/stripe/api_resources/invoice.pyi @@ -13,16 +13,16 @@ from stripe.api_resources.abstract import ( class Invoice(CreateableAPIResource, DeletableAPIResource, ListableAPIResource, SearchableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def finalize_invoice(self, idempotency_key: str | None = ..., **params) -> Self: ... - def mark_uncollectible(self, idempotency_key: str | None = ..., **params) -> Self: ... - def pay(self, idempotency_key: str | None = ..., **params) -> Self: ... - def send_invoice(self, idempotency_key: str | None = ..., **params) -> Self: ... - def void_invoice(self, idempotency_key: str | None = ..., **params) -> Self: ... + def finalize_invoice(self, idempotency_key: str | None = None, **params) -> Self: ... + def mark_uncollectible(self, idempotency_key: str | None = None, **params) -> Self: ... + def pay(self, idempotency_key: str | None = None, **params) -> Self: ... + def send_invoice(self, idempotency_key: str | None = None, **params) -> Self: ... + def void_invoice(self, idempotency_key: str | None = None, **params) -> Self: ... @classmethod def upcoming( cls, - api_key: Incomplete | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, **params, ) -> Invoice: ... diff --git a/stubs/stripe/stripe/api_resources/issuing/authorization.pyi b/stubs/stripe/stripe/api_resources/issuing/authorization.pyi index dd7580007900..7383177cd840 100644 --- a/stubs/stripe/stripe/api_resources/issuing/authorization.pyi +++ b/stubs/stripe/stripe/api_resources/issuing/authorization.pyi @@ -6,5 +6,5 @@ from stripe.api_resources.abstract import ( class Authorization(ListableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def approve(self, idempotency_key: str | None = ..., **params): ... - def decline(self, idempotency_key: str | None = ..., **params): ... + def approve(self, idempotency_key: str | None = None, **params): ... + def decline(self, idempotency_key: str | None = None, **params): ... diff --git a/stubs/stripe/stripe/api_resources/issuing/card.pyi b/stubs/stripe/stripe/api_resources/issuing/card.pyi index 0fdab4bb1030..1edc3d611a99 100644 --- a/stubs/stripe/stripe/api_resources/issuing/card.pyi +++ b/stubs/stripe/stripe/api_resources/issuing/card.pyi @@ -7,4 +7,4 @@ from stripe.api_resources.abstract import ( class Card(CreateableAPIResource, ListableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def details(self, idempotency_key: str | None = ..., **params): ... + def details(self, idempotency_key: str | None = None, **params): ... diff --git a/stubs/stripe/stripe/api_resources/issuing/dispute.pyi b/stubs/stripe/stripe/api_resources/issuing/dispute.pyi index ed3b6741d582..659dea54d80c 100644 --- a/stubs/stripe/stripe/api_resources/issuing/dispute.pyi +++ b/stubs/stripe/stripe/api_resources/issuing/dispute.pyi @@ -7,4 +7,4 @@ from stripe.api_resources.abstract import ( class Dispute(CreateableAPIResource, ListableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def submit(self, idempotency_key: str | None = ..., **params): ... + def submit(self, idempotency_key: str | None = None, **params): ... diff --git a/stubs/stripe/stripe/api_resources/list_object.pyi b/stubs/stripe/stripe/api_resources/list_object.pyi index be26574ecd3a..5a33d5f8b842 100644 --- a/stubs/stripe/stripe/api_resources/list_object.pyi +++ b/stubs/stripe/stripe/api_resources/list_object.pyi @@ -9,25 +9,25 @@ class ListObject(StripeObject): OBJECT_NAME: str def list( self, - api_key: Incomplete | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, **params, ) -> ListObject: ... def create( self, - api_key: Incomplete | None = ..., - idempotency_key: str | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + idempotency_key: str | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, **params, ): ... def retrieve( self, id, - api_key: Incomplete | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, **params, ): ... def __getitem__(self, k): ... @@ -37,21 +37,21 @@ class ListObject(StripeObject): def auto_paging_iter(self) -> Iterator[Any]: ... @classmethod def empty_list( - cls, api_key: Incomplete | None = ..., stripe_version: Incomplete | None = ..., stripe_account: Incomplete | None = ... + cls, api_key: Incomplete | None = None, stripe_version: Incomplete | None = None, stripe_account: Incomplete | None = None ) -> ListObject: ... @property def is_empty(self) -> bool: ... def next_page( self, - api_key: Incomplete | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, **params, ) -> ListObject: ... def previous_page( self, - api_key: Incomplete | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, **params, ) -> ListObject: ... diff --git a/stubs/stripe/stripe/api_resources/order.pyi b/stubs/stripe/stripe/api_resources/order.pyi index 1a9dfac21363..ba526698cebd 100644 --- a/stubs/stripe/stripe/api_resources/order.pyi +++ b/stubs/stripe/stripe/api_resources/order.pyi @@ -7,7 +7,7 @@ from stripe.api_resources.abstract import ( class Order(CreateableAPIResource, ListableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def cancel(self, idempotency_key: str | None = ..., **params): ... - def list_line_items(self, idempotency_key: str | None = ..., **params): ... - def reopen(self, idempotency_key: str | None = ..., **params): ... - def submit(self, idempotency_key: str | None = ..., **params): ... + def cancel(self, idempotency_key: str | None = None, **params): ... + def list_line_items(self, idempotency_key: str | None = None, **params): ... + def reopen(self, idempotency_key: str | None = None, **params): ... + def submit(self, idempotency_key: str | None = None, **params): ... diff --git a/stubs/stripe/stripe/api_resources/payment_intent.pyi b/stubs/stripe/stripe/api_resources/payment_intent.pyi index 203ce28f9308..011d672dc9ff 100644 --- a/stubs/stripe/stripe/api_resources/payment_intent.pyi +++ b/stubs/stripe/stripe/api_resources/payment_intent.pyi @@ -10,8 +10,8 @@ from stripe.api_resources.abstract import ( class PaymentIntent(CreateableAPIResource, ListableAPIResource, SearchableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def cancel(self, idempotency_key: str | None = ..., **params): ... - def capture(self, idempotency_key: str | None = ..., **params): ... + def cancel(self, idempotency_key: str | None = None, **params): ... + def capture(self, idempotency_key: str | None = None, **params): ... @overload @classmethod def confirm( @@ -19,4 +19,4 @@ class PaymentIntent(CreateableAPIResource, ListableAPIResource, SearchableAPIRes ): ... @overload @classmethod - def confirm(cls, idempotency_key: str | None = ..., **params): ... + def confirm(cls, idempotency_key: str | None = None, **params): ... diff --git a/stubs/stripe/stripe/api_resources/payment_method.pyi b/stubs/stripe/stripe/api_resources/payment_method.pyi index 47310ad782b6..e44c472e0082 100644 --- a/stubs/stripe/stripe/api_resources/payment_method.pyi +++ b/stubs/stripe/stripe/api_resources/payment_method.pyi @@ -9,5 +9,5 @@ from stripe.api_resources.abstract import ( class PaymentMethod(CreateableAPIResource, ListableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def attach(self, idempotency_key: str | None = ..., **params) -> Self: ... - def detach(self, idempotency_key: str | None = ..., **params) -> Self: ... + def attach(self, idempotency_key: str | None = None, **params) -> Self: ... + def detach(self, idempotency_key: str | None = None, **params) -> Self: ... diff --git a/stubs/stripe/stripe/api_resources/payout.pyi b/stubs/stripe/stripe/api_resources/payout.pyi index 95855d020741..fc10cc8f062a 100644 --- a/stubs/stripe/stripe/api_resources/payout.pyi +++ b/stubs/stripe/stripe/api_resources/payout.pyi @@ -7,5 +7,5 @@ from stripe.api_resources.abstract import ( class Payout(CreateableAPIResource, ListableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def cancel(self, idempotency_key: str | None = ..., **params): ... - def reverse(self, idempotency_key: str | None = ..., **params): ... + def cancel(self, idempotency_key: str | None = None, **params): ... + def reverse(self, idempotency_key: str | None = None, **params): ... diff --git a/stubs/stripe/stripe/api_resources/person.pyi b/stubs/stripe/stripe/api_resources/person.pyi index 487ae3472337..bc2069bc760b 100644 --- a/stubs/stripe/stripe/api_resources/person.pyi +++ b/stubs/stripe/stripe/api_resources/person.pyi @@ -10,4 +10,4 @@ class Person(UpdateableAPIResource): @classmethod def modify(cls, sid, **params) -> NoReturn: ... @classmethod - def retrieve(cls, id, api_key: Incomplete | None = ..., **params) -> NoReturn: ... + def retrieve(cls, id, api_key: Incomplete | None = None, **params) -> NoReturn: ... diff --git a/stubs/stripe/stripe/api_resources/quote.pyi b/stubs/stripe/stripe/api_resources/quote.pyi index fb5a68c5ad6c..9a70d6b02eb4 100644 --- a/stubs/stripe/stripe/api_resources/quote.pyi +++ b/stubs/stripe/stripe/api_resources/quote.pyi @@ -10,15 +10,15 @@ from stripe.api_resources.abstract import ( class Quote(CreateableAPIResource, ListableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def accept(self, idempotency_key: str | None = ..., **params): ... - def cancel(self, idempotency_key: str | None = ..., **params): ... - def finalize_quote(self, idempotency_key: str | None = ..., **params): ... - def list_line_items(self, idempotency_key: str | None = ..., **params): ... + def accept(self, idempotency_key: str | None = None, **params): ... + def cancel(self, idempotency_key: str | None = None, **params): ... + def finalize_quote(self, idempotency_key: str | None = None, **params): ... + def list_line_items(self, idempotency_key: str | None = None, **params): ... def pdf( self, - api_key: Incomplete | None = ..., - api_version: Incomplete | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + api_version: Incomplete | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, **params, ): ... diff --git a/stubs/stripe/stripe/api_resources/reversal.pyi b/stubs/stripe/stripe/api_resources/reversal.pyi index 80d393fe87b5..3213473c02be 100644 --- a/stubs/stripe/stripe/api_resources/reversal.pyi +++ b/stubs/stripe/stripe/api_resources/reversal.pyi @@ -10,4 +10,4 @@ class Reversal(UpdateableAPIResource): @classmethod def modify(cls, sid, **params) -> NoReturn: ... @classmethod - def retrieve(cls, id, api_key: Incomplete | None = ..., **params) -> NoReturn: ... + def retrieve(cls, id, api_key: Incomplete | None = None, **params) -> NoReturn: ... diff --git a/stubs/stripe/stripe/api_resources/review.pyi b/stubs/stripe/stripe/api_resources/review.pyi index cc04d6569091..ba4985de9b6a 100644 --- a/stubs/stripe/stripe/api_resources/review.pyi +++ b/stubs/stripe/stripe/api_resources/review.pyi @@ -2,4 +2,4 @@ from stripe.api_resources.abstract import ListableAPIResource as ListableAPIReso class Review(ListableAPIResource): OBJECT_NAME: str - def approve(self, idempotency_key: str | None = ..., **params): ... + def approve(self, idempotency_key: str | None = None, **params): ... diff --git a/stubs/stripe/stripe/api_resources/search_result_object.pyi b/stubs/stripe/stripe/api_resources/search_result_object.pyi index e447b5824575..896a4e73da9b 100644 --- a/stubs/stripe/stripe/api_resources/search_result_object.pyi +++ b/stubs/stripe/stripe/api_resources/search_result_object.pyi @@ -15,7 +15,7 @@ class SearchResultObject(StripeObject, Generic[_T]): total_count: int def search( - self, api_key: str | None = ..., stripe_version: str | None = ..., stripe_account: str | None = ..., **params + self, api_key: str | None = None, stripe_version: str | None = None, stripe_account: str | None = None, **params ) -> Self: ... def __getitem__(self, k: str) -> Any: ... def __iter__(self) -> Iterator[_T]: ... @@ -23,10 +23,10 @@ class SearchResultObject(StripeObject, Generic[_T]): def auto_paging_iter(self) -> Iterator[_T]: ... @classmethod def empty_search_result( - cls, api_key: str | None = ..., stripe_version: str | None = ..., stripe_account: str | None = ... + cls, api_key: str | None = None, stripe_version: str | None = None, stripe_account: str | None = None ) -> Self: ... @property def is_empty(self) -> bool: ... def next_search_result_page( - self, api_key: str | None = ..., stripe_version: str | None = ..., stripe_account: str | None = ..., **params + self, api_key: str | None = None, stripe_version: str | None = None, stripe_account: str | None = None, **params ) -> Self: ... diff --git a/stubs/stripe/stripe/api_resources/setup_intent.pyi b/stubs/stripe/stripe/api_resources/setup_intent.pyi index 8da11176f760..00ec98b1c259 100644 --- a/stubs/stripe/stripe/api_resources/setup_intent.pyi +++ b/stubs/stripe/stripe/api_resources/setup_intent.pyi @@ -7,5 +7,5 @@ from stripe.api_resources.abstract import ( class SetupIntent(CreateableAPIResource, ListableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def cancel(self, idempotency_key: str | None = ..., **params): ... - def confirm(self, idempotency_key: str | None = ..., **params): ... + def cancel(self, idempotency_key: str | None = None, **params): ... + def confirm(self, idempotency_key: str | None = None, **params): ... diff --git a/stubs/stripe/stripe/api_resources/source.pyi b/stubs/stripe/stripe/api_resources/source.pyi index 547e229a7c1f..dfed9c7fe5a9 100644 --- a/stubs/stripe/stripe/api_resources/source.pyi +++ b/stubs/stripe/stripe/api_resources/source.pyi @@ -9,5 +9,5 @@ from stripe.api_resources.abstract import ( class Source(CreateableAPIResource, UpdateableAPIResource, VerifyMixin): OBJECT_NAME: str - def detach(self, idempotency_key: str | None = ..., **params): ... + def detach(self, idempotency_key: str | None = None, **params): ... def source_transactions(self, **params): ... diff --git a/stubs/stripe/stripe/api_resources/subscription_item.pyi b/stubs/stripe/stripe/api_resources/subscription_item.pyi index df891e925e34..285249609a89 100644 --- a/stubs/stripe/stripe/api_resources/subscription_item.pyi +++ b/stubs/stripe/stripe/api_resources/subscription_item.pyi @@ -10,18 +10,18 @@ class SubscriptionItem(CreateableAPIResource, DeletableAPIResource, ListableAPIR OBJECT_NAME: str def usage_record_summaries(self, **params): ... @classmethod - def usage_records_url(cls, id, nested_id=...): ... + def usage_records_url(cls, id, nested_id=None): ... @classmethod def usage_records_request( - cls, method, url, api_key=..., idempotency_key=..., stripe_version=..., stripe_account=..., **params + cls, method, url, api_key=None, idempotency_key=None, stripe_version=None, stripe_account=None, **params ): ... @classmethod def create_usage_record(cls, id, **params): ... @classmethod - def usage_record_summarys_url(cls, id, nested_id=...): ... + def usage_record_summarys_url(cls, id, nested_id=None): ... @classmethod def usage_record_summarys_request( - cls, method, url, api_key=..., idempotency_key=..., stripe_version=..., stripe_account=..., **params + cls, method, url, api_key=None, idempotency_key=None, stripe_version=None, stripe_account=None, **params ): ... @classmethod def list_usage_record_summaries(cls, id, **params): ... diff --git a/stubs/stripe/stripe/api_resources/subscription_schedule.pyi b/stubs/stripe/stripe/api_resources/subscription_schedule.pyi index 315c15b6024a..53f0498a8392 100644 --- a/stubs/stripe/stripe/api_resources/subscription_schedule.pyi +++ b/stubs/stripe/stripe/api_resources/subscription_schedule.pyi @@ -7,5 +7,5 @@ from stripe.api_resources.abstract import ( class SubscriptionSchedule(CreateableAPIResource, ListableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def cancel(self, idempotency_key: str | None = ..., **params): ... - def release(self, idempotency_key: str | None = ..., **params): ... + def cancel(self, idempotency_key: str | None = None, **params): ... + def release(self, idempotency_key: str | None = None, **params): ... diff --git a/stubs/stripe/stripe/api_resources/tax_id.pyi b/stubs/stripe/stripe/api_resources/tax_id.pyi index 38432e3295a3..8b29f0972567 100644 --- a/stubs/stripe/stripe/api_resources/tax_id.pyi +++ b/stubs/stripe/stripe/api_resources/tax_id.pyi @@ -8,4 +8,4 @@ class TaxId(APIResource): OBJECT_NAME: str def instance_url(self) -> str: ... @classmethod - def retrieve(cls, id, api_key: Incomplete | None = ..., **params) -> NoReturn: ... + def retrieve(cls, id, api_key: Incomplete | None = None, **params) -> NoReturn: ... diff --git a/stubs/stripe/stripe/api_resources/test_helpers/test_clock.pyi b/stubs/stripe/stripe/api_resources/test_helpers/test_clock.pyi index 3caf15ecc1ac..4490704e74fa 100644 --- a/stubs/stripe/stripe/api_resources/test_helpers/test_clock.pyi +++ b/stubs/stripe/stripe/api_resources/test_helpers/test_clock.pyi @@ -7,4 +7,4 @@ class TestClock(CreateableAPIResource, DeletableAPIResource, ListableAPIResource OBJECT_NAME: Literal["test_helpers.test_clock"] @classmethod - def advance(cls, idempotency_key: str | None = ..., **params: Any) -> Self: ... + def advance(cls, idempotency_key: str | None = None, **params: Any) -> Self: ... diff --git a/stubs/stripe/stripe/api_resources/topup.pyi b/stubs/stripe/stripe/api_resources/topup.pyi index e6619c8c8b07..bd9a127dcfe8 100644 --- a/stubs/stripe/stripe/api_resources/topup.pyi +++ b/stubs/stripe/stripe/api_resources/topup.pyi @@ -7,4 +7,4 @@ from stripe.api_resources.abstract import ( class Topup(CreateableAPIResource, ListableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def cancel(self, idempotency_key: str | None = ..., **params): ... + def cancel(self, idempotency_key: str | None = None, **params): ... diff --git a/stubs/stripe/stripe/api_resources/transfer.pyi b/stubs/stripe/stripe/api_resources/transfer.pyi index aa4edd447663..1f0bbfa49588 100644 --- a/stubs/stripe/stripe/api_resources/transfer.pyi +++ b/stubs/stripe/stripe/api_resources/transfer.pyi @@ -8,4 +8,4 @@ from stripe.api_resources.abstract import ( class Transfer(CreateableAPIResource, ListableAPIResource, UpdateableAPIResource): OBJECT_NAME: str - def cancel(self, idempotency_key: str | None = ..., **params): ... + def cancel(self, idempotency_key: str | None = None, **params): ... diff --git a/stubs/stripe/stripe/api_resources/usage_record.pyi b/stubs/stripe/stripe/api_resources/usage_record.pyi index 61bd11ab0a5b..e0deccc3016e 100644 --- a/stubs/stripe/stripe/api_resources/usage_record.pyi +++ b/stubs/stripe/stripe/api_resources/usage_record.pyi @@ -8,9 +8,9 @@ class UsageRecord(APIResource): @classmethod def create( cls, - api_key: Incomplete | None = ..., - idempotency_key: str | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + idempotency_key: str | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, **params, ): ... diff --git a/stubs/stripe/stripe/error.pyi b/stubs/stripe/stripe/error.pyi index 98b8bc17e663..ff8d85e0caa9 100644 --- a/stubs/stripe/stripe/error.pyi +++ b/stubs/stripe/stripe/error.pyi @@ -11,12 +11,12 @@ class StripeError(Exception): error: Any def __init__( self, - message: Incomplete | None = ..., - http_body: Incomplete | None = ..., - http_status: Incomplete | None = ..., - json_body: Incomplete | None = ..., - headers: Incomplete | None = ..., - code: Incomplete | None = ..., + message: Incomplete | None = None, + http_body: Incomplete | None = None, + http_status: Incomplete | None = None, + json_body: Incomplete | None = None, + headers: Incomplete | None = None, + code: Incomplete | None = None, ) -> None: ... @property def user_message(self): ... @@ -29,12 +29,12 @@ class APIConnectionError(StripeError): def __init__( self, message, - http_body: Incomplete | None = ..., - http_status: Incomplete | None = ..., - json_body: Incomplete | None = ..., - headers: Incomplete | None = ..., - code: Incomplete | None = ..., - should_retry: bool = ..., + http_body: Incomplete | None = None, + http_status: Incomplete | None = None, + json_body: Incomplete | None = None, + headers: Incomplete | None = None, + code: Incomplete | None = None, + should_retry: bool = False, ) -> None: ... class StripeErrorWithParamCode(StripeError): ... @@ -46,10 +46,10 @@ class CardError(StripeErrorWithParamCode): message, param, code, - http_body: Incomplete | None = ..., - http_status: Incomplete | None = ..., - json_body: Incomplete | None = ..., - headers: Incomplete | None = ..., + http_body: Incomplete | None = None, + http_status: Incomplete | None = None, + json_body: Incomplete | None = None, + headers: Incomplete | None = None, ) -> None: ... class IdempotencyError(StripeError): ... @@ -60,11 +60,11 @@ class InvalidRequestError(StripeErrorWithParamCode): self, message, param, - code: Incomplete | None = ..., - http_body: Incomplete | None = ..., - http_status: Incomplete | None = ..., - json_body: Incomplete | None = ..., - headers: Incomplete | None = ..., + code: Incomplete | None = None, + http_body: Incomplete | None = None, + http_status: Incomplete | None = None, + json_body: Incomplete | None = None, + headers: Incomplete | None = None, ) -> None: ... class AuthenticationError(StripeError): ... @@ -73,4 +73,4 @@ class RateLimitError(StripeError): ... class SignatureVerificationError(StripeError): sig_header: Any - def __init__(self, message, sig_header, http_body: Incomplete | None = ...) -> None: ... + def __init__(self, message, sig_header, http_body: Incomplete | None = None) -> None: ... diff --git a/stubs/stripe/stripe/http_client.pyi b/stubs/stripe/stripe/http_client.pyi index 968e29ba701d..172c7ea8f07d 100644 --- a/stubs/stripe/stripe/http_client.pyi +++ b/stubs/stripe/stripe/http_client.pyi @@ -15,38 +15,38 @@ class HTTPClient: MAX_DELAY: int INITIAL_DELAY: float MAX_RETRY_AFTER: int - def __init__(self, verify_ssl_certs: bool = ..., proxy: Incomplete | None = ...) -> None: ... - def request_with_retries(self, method, url, headers, post_data: Incomplete | None = ...): ... - def request_stream_with_retries(self, method, url, headers, post_data: Incomplete | None = ...): ... - def request(self, method, url, headers, post_data: Incomplete | None = ...) -> None: ... - def request_stream(self, method, url, headers, post_data: Incomplete | None = ...) -> None: ... + def __init__(self, verify_ssl_certs: bool = True, proxy: Incomplete | None = None) -> None: ... + def request_with_retries(self, method, url, headers, post_data: Incomplete | None = None): ... + def request_stream_with_retries(self, method, url, headers, post_data: Incomplete | None = None): ... + def request(self, method, url, headers, post_data: Incomplete | None = None) -> None: ... + def request_stream(self, method, url, headers, post_data: Incomplete | None = None) -> None: ... def close(self) -> None: ... class RequestsClient(HTTPClient): name: str - def __init__(self, timeout: int = ..., session: Incomplete | None = ..., **kwargs) -> None: ... - def request(self, method, url, headers, post_data: Incomplete | None = ...): ... - def request_stream(self, method, url, headers, post_data: Incomplete | None = ...): ... + def __init__(self, timeout: int = 80, session: Incomplete | None = None, **kwargs) -> None: ... + def request(self, method, url, headers, post_data: Incomplete | None = None): ... + def request_stream(self, method, url, headers, post_data: Incomplete | None = None): ... def close(self) -> None: ... class UrlFetchClient(HTTPClient): name: str - def __init__(self, verify_ssl_certs: bool = ..., proxy: Incomplete | None = ..., deadline: int = ...) -> None: ... - def request(self, method, url, headers, post_data: Incomplete | None = ...): ... - def request_stream(self, method, url, headers, post_data: Incomplete | None = ...): ... + def __init__(self, verify_ssl_certs: bool = True, proxy: Incomplete | None = None, deadline: int = 55) -> None: ... + def request(self, method, url, headers, post_data: Incomplete | None = None): ... + def request_stream(self, method, url, headers, post_data: Incomplete | None = None): ... def close(self) -> None: ... class PycurlClient(HTTPClient): name: str - def __init__(self, verify_ssl_certs: bool = ..., proxy: Incomplete | None = ...) -> None: ... + def __init__(self, verify_ssl_certs: bool = True, proxy: Incomplete | None = None) -> None: ... def parse_headers(self, data): ... - def request(self, method, url, headers, post_data: Incomplete | None = ...): ... - def request_stream(self, method, url, headers, post_data: Incomplete | None = ...): ... + def request(self, method, url, headers, post_data: Incomplete | None = None): ... + def request_stream(self, method, url, headers, post_data: Incomplete | None = None): ... def close(self) -> None: ... class Urllib2Client(HTTPClient): name: str - def __init__(self, verify_ssl_certs: bool = ..., proxy: Incomplete | None = ...) -> None: ... - def request(self, method, url, headers, post_data: Incomplete | None = ...): ... - def request_stream(self, method, url, headers, post_data: Incomplete | None = ...): ... + def __init__(self, verify_ssl_certs: bool = True, proxy: Incomplete | None = None) -> None: ... + def request(self, method, url, headers, post_data: Incomplete | None = None): ... + def request_stream(self, method, url, headers, post_data: Incomplete | None = None): ... def close(self) -> None: ... diff --git a/stubs/stripe/stripe/multipart_data_generator.pyi b/stubs/stripe/stripe/multipart_data_generator.pyi index 7867aa9f238d..0d4e8883932f 100644 --- a/stubs/stripe/stripe/multipart_data_generator.pyi +++ b/stubs/stripe/stripe/multipart_data_generator.pyi @@ -5,7 +5,7 @@ class MultipartDataGenerator: line_break: str boundary: Any chunk_size: Any - def __init__(self, chunk_size: int = ...) -> None: ... + def __init__(self, chunk_size: int = 1028) -> None: ... def add_params(self, params) -> None: ... def param_header(self): ... def get_post_data(self): ... diff --git a/stubs/stripe/stripe/oauth.pyi b/stubs/stripe/stripe/oauth.pyi index ecec5d5326a8..cfe3458edd03 100644 --- a/stubs/stripe/stripe/oauth.pyi +++ b/stubs/stripe/stripe/oauth.pyi @@ -4,8 +4,8 @@ from stripe import api_requestor as api_requestor, connect_api_base as connect_a class OAuth: @staticmethod - def authorize_url(express: bool = ..., **params): ... + def authorize_url(express: bool = False, **params): ... @staticmethod - def token(api_key: Incomplete | None = ..., **params): ... + def token(api_key: Incomplete | None = None, **params): ... @staticmethod - def deauthorize(api_key: Incomplete | None = ..., **params): ... + def deauthorize(api_key: Incomplete | None = None, **params): ... diff --git a/stubs/stripe/stripe/oauth_error.pyi b/stubs/stripe/stripe/oauth_error.pyi index a639ed027b74..d022f89c871b 100644 --- a/stubs/stripe/stripe/oauth_error.pyi +++ b/stubs/stripe/stripe/oauth_error.pyi @@ -7,10 +7,10 @@ class OAuthError(StripeError): self, code, description, - http_body: Incomplete | None = ..., - http_status: Incomplete | None = ..., - json_body: Incomplete | None = ..., - headers: Incomplete | None = ..., + http_body: Incomplete | None = None, + http_status: Incomplete | None = None, + json_body: Incomplete | None = None, + headers: Incomplete | None = None, ) -> None: ... def construct_error_object(self): ... diff --git a/stubs/stripe/stripe/stripe_object.pyi b/stubs/stripe/stripe/stripe_object.pyi index cfb021b26aaa..e0e6d2b5d1b2 100644 --- a/stubs/stripe/stripe/stripe_object.pyi +++ b/stubs/stripe/stripe/stripe_object.pyi @@ -11,11 +11,11 @@ class StripeObject(dict[Any, Any]): def __init__( self, - id: Incomplete | None = ..., - api_key: Incomplete | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., - last_response: Incomplete | None = ..., + id: Incomplete | None = None, + api_key: Incomplete | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, + last_response: Incomplete | None = None, **params, ) -> None: ... @property @@ -33,9 +33,9 @@ class StripeObject(dict[Any, Any]): cls, values: Any, key: str | None, - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., - last_response: Incomplete | None = ..., + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, + last_response: Incomplete | None = None, ) -> Self: ... api_key: Any stripe_version: Any @@ -43,16 +43,16 @@ class StripeObject(dict[Any, Any]): def refresh_from( self, values: Any, - api_key: Incomplete | None = ..., - partial: bool = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., - last_response: Incomplete | None = ..., + api_key: Incomplete | None = None, + partial: bool = False, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, + last_response: Incomplete | None = None, ) -> None: ... @classmethod def api_base(cls) -> None: ... - def request(self, method, url, params: Incomplete | None = ..., headers: Incomplete | None = ...): ... - def request_stream(self, method, url, params: Incomplete | None = ..., headers: Incomplete | None = ...): ... + def request(self, method, url, params: Incomplete | None = None, headers: Incomplete | None = None): ... + def request_stream(self, method, url, params: Incomplete | None = None, headers: Incomplete | None = None): ... def to_dict(self): ... def to_dict_recursive(self): ... @property diff --git a/stubs/stripe/stripe/util.pyi b/stubs/stripe/stripe/util.pyi index af50ed9bcc29..64edd04977bb 100644 --- a/stubs/stripe/stripe/util.pyi +++ b/stubs/stripe/stripe/util.pyi @@ -16,7 +16,7 @@ class class_method_variant: def __init__(self, class_method_name) -> None: ... method: Any def __call__(self, method): ... - def __get__(self, obj, objtype: Incomplete | None = ...): ... + def __get__(self, obj, objtype: Incomplete | None = None): ... @overload def populate_headers(idempotency_key: None) -> None: ... @@ -29,14 +29,14 @@ _RespType: TypeAlias = dict[Any, Any] | StripeObject | StripeResponse @overload def convert_to_stripe_object( resp: list[Any], - api_key: Incomplete | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, ) -> list[Any]: ... @overload def convert_to_stripe_object( resp: _RespType, - api_key: Incomplete | None = ..., - stripe_version: Incomplete | None = ..., - stripe_account: Incomplete | None = ..., + api_key: Incomplete | None = None, + stripe_version: Incomplete | None = None, + stripe_account: Incomplete | None = None, ) -> StripeObject: ... diff --git a/stubs/stripe/stripe/webhook.pyi b/stubs/stripe/stripe/webhook.pyi index 12cfe57e0a3a..8374e9479d53 100644 --- a/stubs/stripe/stripe/webhook.pyi +++ b/stubs/stripe/stripe/webhook.pyi @@ -6,12 +6,12 @@ class Webhook: DEFAULT_TOLERANCE: int @staticmethod def construct_event( - payload: bytes | str, sig_header: str, secret: str, tolerance: int = ..., api_key: str | None = ... + payload: bytes | str, sig_header: str, secret: str, tolerance: int = 300, api_key: str | None = None ) -> Event: ... class WebhookSignature: EXPECTED_SCHEME: str @classmethod - def verify_header(cls, payload: bytes | str, header: str, secret: str, tolerance: int | None = ...) -> Literal[True]: ... + def verify_header(cls, payload: bytes | str, header: str, secret: str, tolerance: int | None = None) -> Literal[True]: ... @staticmethod def _compute_signature(payload: str, secret: str) -> str: ... diff --git a/stubs/tabulate/tabulate/__init__.pyi b/stubs/tabulate/tabulate/__init__.pyi index 31d625e76630..04089b683678 100644 --- a/stubs/tabulate/tabulate/__init__.pyi +++ b/stubs/tabulate/tabulate/__init__.pyi @@ -45,19 +45,19 @@ multiline_formats: dict[str, str] def simple_separated_format(separator: str) -> TableFormat: ... def tabulate( tabular_data: Mapping[str, Iterable[Any]] | Iterable[Iterable[Any]], - headers: str | dict[str, str] | Sequence[str] = ..., - tablefmt: str | TableFormat = ..., - floatfmt: str | Iterable[str] = ..., - intfmt: str | Iterable[str] = ..., - numalign: str | None = ..., - stralign: str | None = ..., - missingval: str | Iterable[str] = ..., - showindex: str | bool | Iterable[Any] = ..., - disable_numparse: bool | Iterable[int] = ..., - colalign: Iterable[str | None] | None = ..., - maxcolwidths: int | Iterable[int | None] | None = ..., - rowalign: str | Iterable[str] | None = ..., - maxheadercolwidths: int | Iterable[int] | None = ..., + headers: str | dict[str, str] | Sequence[str] = (), + tablefmt: str | TableFormat = "simple", + floatfmt: str | Iterable[str] = "g", + intfmt: str | Iterable[str] = "", + numalign: str | None = "default", + stralign: str | None = "default", + missingval: str | Iterable[str] = "", + showindex: str | bool | Iterable[Any] = "default", + disable_numparse: bool | Iterable[int] = False, + colalign: Iterable[str | None] | None = None, + maxcolwidths: int | Iterable[int | None] | None = None, + rowalign: str | Iterable[str] | None = None, + maxheadercolwidths: int | Iterable[int] | None = None, ) -> str: ... class JupyterHTMLStr(str): diff --git a/stubs/toml/toml/decoder.pyi b/stubs/toml/toml/decoder.pyi index a492ac9e06d5..131e164a34fe 100644 --- a/stubs/toml/toml/decoder.pyi +++ b/stubs/toml/toml/decoder.pyi @@ -31,18 +31,18 @@ class CommentValue: def load( f: _PathLike | list[Any] | SupportsRead[str], # list[_PathLike] is invariance _dict: type[_MutableMappingT], - decoder: TomlDecoder[_MutableMappingT] | None = ..., + decoder: TomlDecoder[_MutableMappingT] | None = None, ) -> _MutableMappingT: ... @overload def load( f: _PathLike | list[Any] | SupportsRead[str], # list[_PathLike] is invariance _dict: type[dict[str, Any]] = ..., - decoder: TomlDecoder[dict[str, Any]] | None = ..., + decoder: TomlDecoder[dict[str, Any]] | None = None, ) -> dict[str, Any]: ... @overload -def loads(s: str, _dict: type[_MutableMappingT], decoder: TomlDecoder[_MutableMappingT] | None = ...) -> _MutableMappingT: ... +def loads(s: str, _dict: type[_MutableMappingT], decoder: TomlDecoder[_MutableMappingT] | None = None) -> _MutableMappingT: ... @overload -def loads(s: str, _dict: type[dict[str, Any]] = ..., decoder: TomlDecoder[dict[str, Any]] | None = ...) -> dict[str, Any]: ... +def loads(s: str, _dict: type[dict[str, Any]] = ..., decoder: TomlDecoder[dict[str, Any]] | None = None) -> dict[str, Any]: ... class InlineTableDict: ... @@ -55,12 +55,12 @@ class TomlDecoder(Generic[_MutableMappingT]): def get_empty_table(self) -> _MutableMappingT: ... def get_empty_inline_table(self) -> InlineTableDict: ... # incomplete python/typing#213 def load_inline_object( - self, line: str, currentlevel: _MutableMappingT, multikey: bool = ..., multibackslash: bool = ... + self, line: str, currentlevel: _MutableMappingT, multikey: bool = False, multibackslash: bool = False ) -> None: ... def load_line( self, line: str, currentlevel: _MutableMappingT, multikey: bool | None, multibackslash: bool ) -> tuple[bool | None, str, bool] | None: ... - def load_value(self, v: str, strictly_valid: bool = ...) -> tuple[Any, str]: ... + def load_value(self, v: str, strictly_valid: bool = True) -> tuple[Any, str]: ... def bounded_string(self, s: str) -> bool: ... def load_array(self, a: str) -> list[Any]: ... def preserve_comment(self, line_no: int, key: str, comment: str, beginline: bool) -> None: ... diff --git a/stubs/toml/toml/encoder.pyi b/stubs/toml/toml/encoder.pyi index c8be27da7775..1f1f90b9e272 100644 --- a/stubs/toml/toml/encoder.pyi +++ b/stubs/toml/toml/encoder.pyi @@ -4,17 +4,17 @@ from typing import Any, Generic, TypeVar, overload _MappingT = TypeVar("_MappingT", bound=Mapping[str, Any]) -def dump(o: _MappingT, f: SupportsWrite[str], encoder: TomlEncoder[_MappingT] | None = ...) -> str: ... -def dumps(o: _MappingT, encoder: TomlEncoder[_MappingT] | None = ...) -> str: ... +def dump(o: _MappingT, f: SupportsWrite[str], encoder: TomlEncoder[_MappingT] | None = None) -> str: ... +def dumps(o: _MappingT, encoder: TomlEncoder[_MappingT] | None = None) -> str: ... class TomlEncoder(Generic[_MappingT]): _dict: type[_MappingT] preserve: bool dump_funcs: MutableMapping[type[Any], Callable[[Any], str]] @overload - def __init__(self, _dict: type[_MappingT], preserve: bool = ...) -> None: ... + def __init__(self, _dict: type[_MappingT], preserve: bool = False) -> None: ... @overload - def __init__(self: TomlEncoder[dict[str, Any]], _dict: type[dict[str, Any]] = ..., preserve: bool = ...) -> None: ... + def __init__(self: TomlEncoder[dict[str, Any]], _dict: type[dict[str, Any]] = ..., preserve: bool = False) -> None: ... def get_empty_table(self) -> _MappingT: ... def dump_list(self, v: Iterable[Any]) -> str: ... def dump_inline_table(self, section: dict[str, Any] | Any) -> str: ... @@ -30,13 +30,13 @@ class TomlPreserveInlineDictEncoder(TomlEncoder[_MappingT]): class TomlArraySeparatorEncoder(TomlEncoder[_MappingT]): separator: str @overload - def __init__(self, _dict: type[_MappingT], preserve: bool = ..., separator: str = ...) -> None: ... + def __init__(self, _dict: type[_MappingT], preserve: bool = False, separator: str = ",") -> None: ... @overload def __init__( self: TomlArraySeparatorEncoder[dict[str, Any]], _dict: type[dict[str, Any]] = ..., - preserve: bool = ..., - separator: str = ..., + preserve: bool = False, + separator: str = ",", ) -> None: ... def dump_list(self, v: Iterable[Any]) -> str: ... diff --git a/stubs/tqdm/tqdm/asyncio.pyi b/stubs/tqdm/tqdm/asyncio.pyi index 488fadbfe1a6..12bef569c418 100644 --- a/stubs/tqdm/tqdm/asyncio.pyi +++ b/stubs/tqdm/tqdm/asyncio.pyi @@ -22,9 +22,9 @@ class tqdm_asyncio(Generic[_T], std_tqdm[_T]): cls, fs: Iterable[Awaitable[_T]], *, - loop: bool | None = ..., - timeout: float | None = ..., - total: int | None = ..., + loop: bool | None = None, + timeout: float | None = None, + total: int | None = None, desc: str | None = ..., leave: bool | None = ..., file: SupportsWrite[str] | None = ..., @@ -53,9 +53,9 @@ class tqdm_asyncio(Generic[_T], std_tqdm[_T]): async def gather( cls, *fs: Awaitable[_T], - loop: bool | None = ..., - timeout: float | None = ..., - total: int | None = ..., + loop: bool | None = None, + timeout: float | None = None, + total: int | None = None, iterable: Iterable[_T] = ..., desc: str | None = ..., leave: bool | None = ..., @@ -115,7 +115,7 @@ class tqdm_asyncio(Generic[_T], std_tqdm[_T]): @overload def __init__( self: tqdm_asyncio[NoReturn], - iterable: None = ..., + iterable: None = None, desc: str | None = ..., total: float | None = ..., leave: bool | None = ..., diff --git a/stubs/tqdm/tqdm/cli.pyi b/stubs/tqdm/tqdm/cli.pyi index 742ea2947791..202660508915 100644 --- a/stubs/tqdm/tqdm/cli.pyi +++ b/stubs/tqdm/tqdm/cli.pyi @@ -2,4 +2,4 @@ from collections.abc import Sequence __all__ = ["main"] -def main(fp=..., argv: Sequence[str] | None = ...) -> None: ... +def main(fp=..., argv: Sequence[str] | None = None) -> None: ... diff --git a/stubs/tqdm/tqdm/contrib/__init__.pyi b/stubs/tqdm/tqdm/contrib/__init__.pyi index fd7f09637558..6a63b3b40969 100644 --- a/stubs/tqdm/tqdm/contrib/__init__.pyi +++ b/stubs/tqdm/tqdm/contrib/__init__.pyi @@ -7,9 +7,9 @@ __all__ = ["tenumerate", "tzip", "tmap"] class DummyTqdmFile(ObjectWrapper): def __init__(self, wrapped) -> None: ... - def write(self, x, nolock: bool = ...) -> None: ... + def write(self, x, nolock: bool = False) -> None: ... def __del__(self) -> None: ... -def tenumerate(iterable, start: int = ..., total: Incomplete | None = ..., tqdm_class: type[Incomplete] = ..., **tqdm_kwargs): ... +def tenumerate(iterable, start: int = 0, total: Incomplete | None = None, tqdm_class: type[Incomplete] = ..., **tqdm_kwargs): ... def tzip(iter1, *iter2plus, **tqdm_kwargs) -> Generator[Incomplete, None, None]: ... def tmap(function: Callable[..., Incomplete], *sequences, **tqdm_kwargs) -> Generator[Incomplete, None, None]: ... diff --git a/stubs/tqdm/tqdm/contrib/discord.pyi b/stubs/tqdm/tqdm/contrib/discord.pyi index 4f2702e357da..4c7d8b15fc36 100644 --- a/stubs/tqdm/tqdm/contrib/discord.pyi +++ b/stubs/tqdm/tqdm/contrib/discord.pyi @@ -51,7 +51,7 @@ class tqdm_discord(Generic[_T], tqdm_auto[_T]): @overload def __init__( self: tqdm_discord[NoReturn], - iterable: None = ..., + iterable: None = None, desc: str | None = ..., total: float | None = ..., leave: bool | None = ..., diff --git a/stubs/tqdm/tqdm/contrib/logging.pyi b/stubs/tqdm/tqdm/contrib/logging.pyi index 0bb9e0e4e8be..fe8889002235 100644 --- a/stubs/tqdm/tqdm/contrib/logging.pyi +++ b/stubs/tqdm/tqdm/contrib/logging.pyi @@ -9,7 +9,7 @@ from ..std import tqdm as std_tqdm _TqdmT = TypeVar("_TqdmT", bound=std_tqdm[Any]) def logging_redirect_tqdm( - loggers: Sequence[logging.Logger] | None = ..., tqdm_class: type[std_tqdm[Any]] = ... + loggers: Sequence[logging.Logger] | None = None, tqdm_class: type[std_tqdm[Any]] = ... ) -> _GeneratorContextManager[None]: ... # TODO type *args, **kwargs here more precisely diff --git a/stubs/tqdm/tqdm/contrib/slack.pyi b/stubs/tqdm/tqdm/contrib/slack.pyi index cf69b09e62fd..0f9eba6024c3 100644 --- a/stubs/tqdm/tqdm/contrib/slack.pyi +++ b/stubs/tqdm/tqdm/contrib/slack.pyi @@ -54,7 +54,7 @@ class tqdm_slack(Generic[_T], tqdm_auto[_T]): @overload def __init__( self: tqdm_slack[NoReturn], - iterable: None = ..., + iterable: None = None, desc: str | None = ..., total: float | None = ..., leave: bool | None = ..., diff --git a/stubs/tqdm/tqdm/contrib/telegram.pyi b/stubs/tqdm/tqdm/contrib/telegram.pyi index fa77d2db14d4..cd2beb7385c2 100644 --- a/stubs/tqdm/tqdm/contrib/telegram.pyi +++ b/stubs/tqdm/tqdm/contrib/telegram.pyi @@ -59,7 +59,7 @@ class tqdm_telegram(Generic[_T], tqdm_auto[_T]): @overload def __init__( self: tqdm_telegram[NoReturn], - iterable: None = ..., + iterable: None = None, desc: str | None = ..., total: float | None = ..., leave: bool | None = ..., diff --git a/stubs/tqdm/tqdm/gui.pyi b/stubs/tqdm/tqdm/gui.pyi index a77cc976032a..c0db2c03ac1a 100644 --- a/stubs/tqdm/tqdm/gui.pyi +++ b/stubs/tqdm/tqdm/gui.pyi @@ -57,7 +57,7 @@ class tqdm_gui(Generic[_T], std_tqdm[_T]): @overload def __init__( self: tqdm_gui[NoReturn], - iterable: None = ..., + iterable: None = None, desc: str | None = ..., total: float | None = ..., leave: bool | None = ..., diff --git a/stubs/tqdm/tqdm/keras.pyi b/stubs/tqdm/tqdm/keras.pyi index 75e86e92a4a4..f14d9be2a38b 100644 --- a/stubs/tqdm/tqdm/keras.pyi +++ b/stubs/tqdm/tqdm/keras.pyi @@ -29,7 +29,7 @@ class _Callback: class TqdmCallback(_Callback): @staticmethod - def bar2callback(bar, pop: Incomplete | None = ..., delta=...): ... + def bar2callback(bar, pop: Incomplete | None = None, delta=...): ... tqdm_class: Incomplete epoch_bar: Incomplete on_epoch_end: Incomplete @@ -39,10 +39,10 @@ class TqdmCallback(_Callback): on_batch_end: Incomplete def __init__( self, - epochs: Incomplete | None = ..., - data_size: Incomplete | None = ..., - batch_size: Incomplete | None = ..., - verbose: int = ..., + epochs: Incomplete | None = None, + data_size: Incomplete | None = None, + batch_size: Incomplete | None = None, + verbose: int = 1, tqdm_class=..., **tqdm_kwargs, ) -> None: ... diff --git a/stubs/tqdm/tqdm/notebook.pyi b/stubs/tqdm/tqdm/notebook.pyi index dbd7855b8dda..d2a118fb7344 100644 --- a/stubs/tqdm/tqdm/notebook.pyi +++ b/stubs/tqdm/tqdm/notebook.pyi @@ -11,16 +11,16 @@ _T = TypeVar("_T") class tqdm_notebook(Generic[_T], std_tqdm[_T]): @staticmethod def status_printer( - _: SupportsWrite[str] | None, total: float | None = ..., desc: str | None = ..., ncols: int | None = ... + _: SupportsWrite[str] | None, total: float | None = None, desc: str | None = None, ncols: int | None = None ): ... displayed: bool def display( self, - msg: str | None = ..., - pos: int | None = ..., - close: bool = ..., - bar_style: str | None = ..., - check_delay: bool = ..., + msg: str | None = None, + pos: int | None = None, + close: bool = False, + bar_style: str | None = None, + check_delay: bool = True, ) -> None: ... @property def colour(self): ... @@ -63,7 +63,7 @@ class tqdm_notebook(Generic[_T], std_tqdm[_T]): @overload def __init__( self: tqdm_notebook[NoReturn], - iterable: None = ..., + iterable: None = None, desc: str | None = ..., total: float | None = ..., leave: bool | None = ..., @@ -92,10 +92,10 @@ class tqdm_notebook(Generic[_T], std_tqdm[_T]): **kwargs, ) -> None: ... def __iter__(self) -> Iterator[_T]: ... - def update(self, n: int = ...): ... # type: ignore[override] + def update(self, n: int = 1): ... # type: ignore[override] def close(self) -> None: ... def clear(self, *_, **__) -> None: ... - def reset(self, total: float | None = ...): ... + def reset(self, total: float | None = None): ... tqdm = tqdm_notebook tnrange = trange diff --git a/stubs/tqdm/tqdm/rich.pyi b/stubs/tqdm/tqdm/rich.pyi index 2a81cc21fe1c..fad4f54d588a 100644 --- a/stubs/tqdm/tqdm/rich.pyi +++ b/stubs/tqdm/tqdm/rich.pyi @@ -72,7 +72,7 @@ class tqdm_rich(Generic[_T], std_tqdm[_T]): @overload def __init__( self: tqdm_rich[NoReturn], - iterable: None = ..., + iterable: None = None, desc: str | None = ..., total: float | None = ..., leave: bool | None = ..., diff --git a/stubs/tqdm/tqdm/std.pyi b/stubs/tqdm/tqdm/std.pyi index 65c550c9efe1..409f3747d7c8 100644 --- a/stubs/tqdm/tqdm/std.pyi +++ b/stubs/tqdm/tqdm/std.pyi @@ -23,7 +23,7 @@ class TqdmTypeError(TypeError): ... class TqdmKeyError(KeyError): ... class TqdmWarning(Warning): - def __init__(self, msg, fp_write: Incomplete | None = ..., *a, **k) -> None: ... + def __init__(self, msg, fp_write: Incomplete | None = None, *a, **k) -> None: ... class TqdmExperimentalWarning(TqdmWarning, FutureWarning): ... class TqdmDeprecationWarning(TqdmWarning, DeprecationWarning): ... @@ -36,7 +36,7 @@ class tqdm(Generic[_T], Iterable[_T], Comparable): monitor: ClassVar[TMonitor | None] @staticmethod - def format_sizeof(num: float, suffix: str = ..., divisor: float = ...) -> str: ... + def format_sizeof(num: float, suffix: str = "", divisor: float = 1000) -> str: ... @staticmethod def format_interval(t: float) -> str: ... @staticmethod @@ -48,86 +48,86 @@ class tqdm(Generic[_T], Iterable[_T], Comparable): n: float, total: float, elapsed: float, - ncols: int | None = ..., - prefix: str | None = ..., - ascii: bool | str | None = ..., - unit: str | None = ..., - unit_scale: bool | float | None = ..., - rate: float | None = ..., - bar_format: str | None = ..., - postfix: str | Mapping[str, object] | None = ..., - unit_divisor: float | None = ..., - initial: float | None = ..., - colour: str | None = ..., + ncols: int | None = None, + prefix: str | None = "", + ascii: bool | str | None = False, + unit: str | None = "it", + unit_scale: bool | float | None = False, + rate: float | None = None, + bar_format: str | None = None, + postfix: str | Mapping[str, object] | None = None, + unit_divisor: float | None = 1000, + initial: float | None = 0, + colour: str | None = None, ) -> str: ... @overload def __init__( self, iterable: Iterable[_T], - desc: str | None = ..., - total: float | None = ..., - leave: bool | None = ..., - file: SupportsWrite[str] | None = ..., - ncols: int | None = ..., - mininterval: float = ..., - maxinterval: float = ..., - miniters: float | None = ..., - ascii: bool | str | None = ..., - disable: bool | None = ..., - unit: str = ..., - unit_scale: bool | float = ..., - dynamic_ncols: bool = ..., - smoothing: float = ..., - bar_format: str | None = ..., - initial: float = ..., - position: int | None = ..., - postfix: Mapping[str, object] | str | None = ..., - unit_divisor: float = ..., + desc: str | None = None, + total: float | None = None, + leave: bool | None = True, + file: SupportsWrite[str] | None = None, + ncols: int | None = None, + mininterval: float = 0.1, + maxinterval: float = 10.0, + miniters: float | None = None, + ascii: bool | str | None = None, + disable: bool | None = False, + unit: str = "it", + unit_scale: bool | float = False, + dynamic_ncols: bool = False, + smoothing: float = 0.3, + bar_format: str | None = None, + initial: float = 0, + position: int | None = None, + postfix: Mapping[str, object] | str | None = None, + unit_divisor: float = 1000, write_bytes: bool = False, - lock_args: tuple[bool | None, float | None] | tuple[bool | None] | None = ..., - nrows: int | None = ..., - colour: str | None = ..., - delay: float | None = ..., - gui: bool = ..., + lock_args: tuple[bool | None, float | None] | tuple[bool | None] | None = None, + nrows: int | None = None, + colour: str | None = None, + delay: float | None = 0, + gui: bool = False, **kwargs, ) -> None: ... @overload def __init__( self: tqdm[NoReturn], - iterable: None = ..., - desc: str | None = ..., - total: float | None = ..., - leave: bool | None = ..., - file: SupportsWrite[str] | None = ..., - ncols: int | None = ..., - mininterval: float = ..., - maxinterval: float = ..., - miniters: float | None = ..., - ascii: bool | str | None = ..., - disable: bool | None = ..., - unit: str = ..., - unit_scale: bool | float = ..., - dynamic_ncols: bool = ..., - smoothing: float = ..., - bar_format: str | None = ..., - initial: float = ..., - position: int | None = ..., - postfix: Mapping[str, object] | str | None = ..., - unit_divisor: float = ..., - write_bytes: bool | None = ..., - lock_args: tuple[bool | None, float | None] | tuple[bool | None] | None = ..., - nrows: int | None = ..., - colour: str | None = ..., - delay: float | None = ..., - gui: bool = ..., + iterable: None = None, + desc: str | None = None, + total: float | None = None, + leave: bool | None = True, + file: SupportsWrite[str] | None = None, + ncols: int | None = None, + mininterval: float = 0.1, + maxinterval: float = 10.0, + miniters: float | None = None, + ascii: bool | str | None = None, + disable: bool | None = False, + unit: str = "it", + unit_scale: bool | float = False, + dynamic_ncols: bool = False, + smoothing: float = 0.3, + bar_format: str | None = None, + initial: float = 0, + position: int | None = None, + postfix: Mapping[str, object] | str | None = None, + unit_divisor: float = 1000, + write_bytes: bool | None = False, + lock_args: tuple[bool | None, float | None] | tuple[bool | None] | None = None, + nrows: int | None = None, + colour: str | None = None, + delay: float | None = 0, + gui: bool = False, **kwargs, ) -> None: ... def __new__(cls, *_, **__) -> Self: ... @classmethod - def write(cls, s: str, file: SupportsWrite[str] | None = ..., end: str = ..., nolock: bool = ...) -> None: ... + def write(cls, s: str, file: SupportsWrite[str] | None = None, end: str = "\n", nolock: bool = False) -> None: ... @classmethod def external_write_mode( - cls, file: SupportsWrite[str] | None = ..., nolock: bool = ... + cls, file: SupportsWrite[str] | None = None, nolock: bool = False ) -> contextlib._GeneratorContextManager[None]: ... @classmethod def set_lock(cls, lock) -> None: ... @@ -206,25 +206,25 @@ class tqdm(Generic[_T], Iterable[_T], Comparable): def __del__(self) -> None: ... def __hash__(self) -> int: ... def __iter__(self) -> Iterator[_T]: ... - def update(self, n: float | None = ...) -> bool | None: ... + def update(self, n: float | None = 1) -> bool | None: ... def close(self) -> None: ... - def clear(self, nolock: bool = ...) -> None: ... + def clear(self, nolock: bool = False) -> None: ... def refresh( - self, nolock: bool = ..., lock_args: tuple[bool | None, float | None] | tuple[bool | None] | None = ... + self, nolock: bool = False, lock_args: tuple[bool | None, float | None] | tuple[bool | None] | None = None ) -> None: ... def unpause(self) -> None: ... - def reset(self, total: float | None = ...) -> None: ... - def set_description(self, desc: str | None = ..., refresh: bool | None = ...) -> None: ... - def set_description_str(self, desc: str | None = ..., refresh: bool | None = ...) -> None: ... - def set_postfix(self, ordered_dict: Mapping[str, object] | None = ..., refresh: bool | None = ..., **kwargs) -> None: ... - def set_postfix_str(self, s: str = ..., refresh: bool = ...) -> None: ... + def reset(self, total: float | None = None) -> None: ... + def set_description(self, desc: str | None = None, refresh: bool | None = True) -> None: ... + def set_description_str(self, desc: str | None = None, refresh: bool | None = True) -> None: ... + def set_postfix(self, ordered_dict: Mapping[str, object] | None = None, refresh: bool | None = True, **kwargs) -> None: ... + def set_postfix_str(self, s: str = "", refresh: bool = True) -> None: ... def moveto(self, n) -> None: ... @property def format_dict(self) -> MutableMapping[str, Any]: ... - def display(self, msg: str | None = ..., pos: int | None = ...) -> None: ... + def display(self, msg: str | None = None, pos: int | None = None) -> None: ... @classmethod def wrapattr( - cls, stream, method: Literal["read", "write"], total: float | None = ..., bytes: bool | None = ..., **tqdm_kwargs + cls, stream, method: Literal["read", "write"], total: float | None = None, bytes: bool | None = True, **tqdm_kwargs ) -> contextlib._GeneratorContextManager[Incomplete]: ... @overload diff --git a/stubs/tqdm/tqdm/tk.pyi b/stubs/tqdm/tqdm/tk.pyi index a89732e01893..6d925e5d6597 100644 --- a/stubs/tqdm/tqdm/tk.pyi +++ b/stubs/tqdm/tqdm/tk.pyi @@ -46,7 +46,7 @@ class tqdm_tk(Generic[_T], std_tqdm[_T]): @overload def __init__( self: tqdm_tk[NoReturn], - iterable: None = ..., + iterable: None = None, desc: str | None = ..., total: float | None = ..., leave: bool | None = ..., @@ -81,11 +81,11 @@ class tqdm_tk(Generic[_T], std_tqdm[_T]): def close(self) -> None: ... def clear(self, *_, **__) -> None: ... def display(self, *_, **__) -> None: ... - def set_description(self, desc: str | None = ..., refresh: bool | None = ...) -> None: ... + def set_description(self, desc: str | None = None, refresh: bool | None = True) -> None: ... desc: Incomplete - def set_description_str(self, desc: str | None = ..., refresh: bool | None = ...) -> None: ... + def set_description_str(self, desc: str | None = None, refresh: bool | None = True) -> None: ... def cancel(self) -> None: ... - def reset(self, total: Incomplete | None = ...) -> None: ... + def reset(self, total: Incomplete | None = None) -> None: ... def ttkrange(*args, **kwargs) -> tqdm_tk[int]: ... diff --git a/stubs/tqdm/tqdm/utils.pyi b/stubs/tqdm/tqdm/utils.pyi index 3055987cd92a..4ddc65781443 100644 --- a/stubs/tqdm/tqdm/utils.pyi +++ b/stubs/tqdm/tqdm/utils.pyi @@ -12,7 +12,7 @@ RE_ANSI: Pattern[str] class FormatReplace: replace: str format_called: int - def __init__(self, replace: str = ...) -> None: ... + def __init__(self, replace: str = "") -> None: ... def __format__(self, _) -> str: ... class _Has__Comparable(Protocol): @@ -49,7 +49,7 @@ class DisableOnWriteError(ObjectWrapper): def __eq__(self, other: object) -> bool: ... class CallbackIOWrapper(ObjectWrapper): - def __init__(self, callback: Callable[[int], object], stream, method: str = ...) -> None: ... + def __init__(self, callback: Callable[[int], object], stream, method: str = "read") -> None: ... def disp_len(data: str) -> int: ... def disp_trim(data: str, length: int) -> str: ... diff --git a/stubs/tree-sitter/tree_sitter/binding.pyi b/stubs/tree-sitter/tree_sitter/binding.pyi index f8d4d32d530a..f1c713e98be3 100644 --- a/stubs/tree-sitter/tree_sitter/binding.pyi +++ b/stubs/tree-sitter/tree_sitter/binding.pyi @@ -66,7 +66,7 @@ class Node: class Parser: # At runtime, Parser(1, 2, 3) ignores the arguments, but that's most likely buggy code def __init__(self) -> None: ... - def parse(self, source: bytes, old_tree: Tree | None = ..., keep_text: bool = ...) -> Tree: ... + def parse(self, source: bytes, old_tree: Tree | None = None, keep_text: bool = True) -> Tree: ... def set_language(self, __language: Language) -> None: ... @final diff --git a/stubs/ttkthemes/ttkthemes/_utils.pyi b/stubs/ttkthemes/ttkthemes/_utils.pyi index b60a742f072b..20fc39fae22e 100644 --- a/stubs/ttkthemes/ttkthemes/_utils.pyi +++ b/stubs/ttkthemes/ttkthemes/_utils.pyi @@ -3,5 +3,5 @@ from _typeshed import Incomplete def temporary_chdir(new_dir) -> None: ... def get_file_directory(): ... def get_temp_directory(): ... -def get_themes_directory(theme_name: Incomplete | None = ..., png: bool = ...): ... +def get_themes_directory(theme_name: Incomplete | None = None, png: bool = False): ... def create_directory(directory): ... diff --git a/stubs/ttkthemes/ttkthemes/_widget.pyi b/stubs/ttkthemes/ttkthemes/_widget.pyi index 96900d6cf6ad..891e7b747aeb 100644 --- a/stubs/ttkthemes/ttkthemes/_widget.pyi +++ b/stubs/ttkthemes/ttkthemes/_widget.pyi @@ -7,7 +7,7 @@ class ThemedWidget: PACKAGES: ClassVar[dict[str, str]] tk: _tkinter.TkappType png_support: bool - def __init__(self, tk_interpreter, gif_override: bool = ...) -> None: ... + def __init__(self, tk_interpreter, gif_override: bool = False) -> None: ... def set_theme(self, theme_name: str) -> None: ... def get_themes(self) -> list[str]: ... @property @@ -17,10 +17,10 @@ class ThemedWidget: def set_theme_advanced( self, theme_name: str, - brightness: float = ..., - saturation: float = ..., - hue: float = ..., - preserve_transparency: bool = ..., - output_dir: StrPath | None = ..., - advanced_name: str = ..., + brightness: float = 1.0, + saturation: float = 1.0, + hue: float = 1.0, + preserve_transparency: bool = True, + output_dir: StrPath | None = None, + advanced_name: str = "advanced", ) -> None: ... diff --git a/stubs/ttkthemes/ttkthemes/themed_style.pyi b/stubs/ttkthemes/ttkthemes/themed_style.pyi index e70eb8a481a5..e880f0718dc2 100644 --- a/stubs/ttkthemes/ttkthemes/themed_style.pyi +++ b/stubs/ttkthemes/ttkthemes/themed_style.pyi @@ -8,5 +8,5 @@ class ThemedStyle(ttk.Style, ThemedWidget): self, master: tkinter.Misc | None = ..., *, theme: str | None = ..., gif_override: bool | None = ..., **kwargs ) -> None: ... # theme_use() can't return None (differs from ttk.Style) - def theme_use(self, theme_name: str | None = ...) -> str: ... # type: ignore[override] + def theme_use(self, theme_name: str | None = None) -> str: ... # type: ignore[override] def theme_names(self) -> list[str]: ... # type: ignore[override] diff --git a/stubs/ttkthemes/ttkthemes/themed_tk.pyi b/stubs/ttkthemes/ttkthemes/themed_tk.pyi index b39ea3c6e34b..8bf6ac4c6e5f 100644 --- a/stubs/ttkthemes/ttkthemes/themed_tk.pyi +++ b/stubs/ttkthemes/ttkthemes/themed_tk.pyi @@ -21,10 +21,10 @@ class ThemedTk(tkinter.Tk, ThemedWidget): background: bool | None = ..., # old alias for themebg gif_override: bool = ..., ) -> None: ... - def set_theme(self, theme_name, toplevel: bool | None = ..., themebg: bool | None = ...) -> None: ... + def set_theme(self, theme_name, toplevel: bool | None = None, themebg: bool | None = None) -> None: ... # TODO: currently no good way to say "use the same big list of kwargs as parent class but also add these" - def config(self, kw: Incomplete | None = ..., **kwargs): ... # type: ignore[override] + def config(self, kw: Incomplete | None = None, **kwargs): ... # type: ignore[override] def cget(self, k): ... - def configure(self, kw: Incomplete | None = ..., **kwargs): ... # type: ignore[override] + def configure(self, kw: Incomplete | None = None, **kwargs): ... # type: ignore[override] def __getitem__(self, k): ... def __setitem__(self, k, v) -> None: ... diff --git a/stubs/typed-ast/typed_ast/ast27.pyi b/stubs/typed-ast/typed_ast/ast27.pyi index 3a4d19938483..4d6fec1a69a1 100644 --- a/stubs/typed-ast/typed_ast/ast27.pyi +++ b/stubs/typed-ast/typed_ast/ast27.pyi @@ -10,12 +10,12 @@ class NodeVisitor: class NodeTransformer(NodeVisitor): def generic_visit(self, node: AST) -> None: ... -def parse(source: str | ReadableBuffer, filename: str | ReadableBuffer = ..., mode: str = ...) -> AST: ... +def parse(source: str | ReadableBuffer, filename: str | ReadableBuffer = "", mode: str = "exec") -> AST: ... def copy_location(new_node: AST, old_node: AST) -> AST: ... -def dump(node: AST, annotate_fields: bool = ..., include_attributes: bool = ...) -> str: ... +def dump(node: AST, annotate_fields: bool = True, include_attributes: bool = False) -> str: ... def fix_missing_locations(node: AST) -> AST: ... -def get_docstring(node: AST, clean: bool = ...) -> str | bytes | None: ... -def increment_lineno(node: AST, n: int = ...) -> AST: ... +def get_docstring(node: AST, clean: bool = True) -> str | bytes | None: ... +def increment_lineno(node: AST, n: int = 1) -> AST: ... def iter_child_nodes(node: AST) -> Iterator[AST]: ... def iter_fields(node: AST) -> Iterator[tuple[str, Any]]: ... def literal_eval(node_or_string: str | AST) -> Any: ... diff --git a/stubs/typed-ast/typed_ast/ast3.pyi b/stubs/typed-ast/typed_ast/ast3.pyi index 154eae07a5aa..5898482ca99d 100644 --- a/stubs/typed-ast/typed_ast/ast3.pyi +++ b/stubs/typed-ast/typed_ast/ast3.pyi @@ -13,13 +13,13 @@ class NodeTransformer(NodeVisitor): def generic_visit(self, node: AST) -> None: ... def parse( - source: str | ReadableBuffer, filename: str | ReadableBuffer = ..., mode: str = ..., feature_version: int = ... + source: str | ReadableBuffer, filename: str | ReadableBuffer = "", mode: str = "exec", feature_version: int = 7 ) -> AST: ... def copy_location(new_node: AST, old_node: AST) -> AST: ... -def dump(node: AST, annotate_fields: bool = ..., include_attributes: bool = ...) -> str: ... +def dump(node: AST, annotate_fields: bool = True, include_attributes: bool = False) -> str: ... def fix_missing_locations(node: AST) -> AST: ... -def get_docstring(node: AST, clean: bool = ...) -> str | None: ... -def increment_lineno(node: AST, n: int = ...) -> AST: ... +def get_docstring(node: AST, clean: bool = True) -> str | None: ... +def increment_lineno(node: AST, n: int = 1) -> AST: ... def iter_child_nodes(node: AST) -> Iterator[AST]: ... def iter_fields(node: AST) -> Iterator[tuple[str, Any]]: ... def literal_eval(node_or_string: str | AST) -> Any: ...