From d0dceb8915275e4a99c04e4e9a1169aed511fce6 Mon Sep 17 00:00:00 2001 From: Antonio Bulgheroni Date: Wed, 11 Dec 2024 11:57:28 +0100 Subject: [PATCH 1/2] Update peewee.pyi add get_tables return type list[str] --- stubs/peewee/peewee.pyi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stubs/peewee/peewee.pyi b/stubs/peewee/peewee.pyi index 511b205e8845..907da86a8fba 100644 --- a/stubs/peewee/peewee.pyi +++ b/stubs/peewee/peewee.pyi @@ -838,7 +838,7 @@ class Database(_callable_context_manager): def rollback(self): ... def batch_commit(self, it, n) -> Generator[Incomplete, None, None]: ... def table_exists(self, table_name, schema: str | None = None): ... - def get_tables(self, schema: str | None = None) -> None: ... + def get_tables(self, schema: str | None = None) -> list[str]: ... def get_indexes(self, table, schema: str | None = None) -> list[IndexMetadata]: ... def get_columns(self, table, schema: str | None = None) -> list[ColumnMetadata]: ... def get_primary_keys(self, table, schema: str | None = None) -> None: ... @@ -909,7 +909,7 @@ class SqliteDatabase(Database): def last_insert_id(self, cursor, query_type: Incomplete | None = ...): ... def rows_affected(self, cursor): ... def begin(self, lock_type: Incomplete | None = ...) -> None: ... - def get_tables(self, schema: str | None = None): ... + def get_tables(self, schema: str | None = None) -> list[str]: ... def get_views(self, schema: str | None = None) -> list[ViewMetadata]: ... def get_indexes(self, table, schema: str | None = None) -> list[IndexMetadata]: ... def get_columns(self, table, schema: str | None = None) -> list[ColumnMetadata]: ... @@ -946,7 +946,7 @@ class PostgresqlDatabase(Database): def last_insert_id(self, cursor, query_type: Incomplete | None = ...): ... def rows_affected(self, cursor): ... def begin(self, isolation_level: str | None = None) -> None: ... - def get_tables(self, schema: str | None = None): ... + def get_tables(self, schema: str | None = None) -> list[str]: ... def get_views(self, schema: str | None = None) -> list[ViewMetadata]: ... def get_indexes(self, table, schema: str | None = None) -> list[IndexMetadata]: ... def get_columns(self, table, schema: str | None = None) -> list[ColumnMetadata]: ... @@ -980,7 +980,7 @@ class MySQLDatabase(Database): def is_connection_usable(self) -> bool: ... def default_values_insert(self, ctx): ... def begin(self, isolation_level: str | None = None) -> None: ... - def get_tables(self, schema: str | None = None): ... + def get_tables(self, schema: str | None = None) -> list[str] : ... def get_views(self, schema: str | None = None) -> list[ViewMetadata]: ... def get_indexes(self, table, schema: str | None = None) -> list[IndexMetadata]: ... def get_columns(self, table, schema: str | None = None) -> list[ColumnMetadata]: ... From f8138a18e964b2bf33cb0d96a25dd88dddbf51e1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 11:02:53 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stubs/peewee/peewee.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/peewee/peewee.pyi b/stubs/peewee/peewee.pyi index 907da86a8fba..f9066c393709 100644 --- a/stubs/peewee/peewee.pyi +++ b/stubs/peewee/peewee.pyi @@ -980,7 +980,7 @@ class MySQLDatabase(Database): def is_connection_usable(self) -> bool: ... def default_values_insert(self, ctx): ... def begin(self, isolation_level: str | None = None) -> None: ... - def get_tables(self, schema: str | None = None) -> list[str] : ... + def get_tables(self, schema: str | None = None) -> list[str]: ... def get_views(self, schema: str | None = None) -> list[ViewMetadata]: ... def get_indexes(self, table, schema: str | None = None) -> list[IndexMetadata]: ... def get_columns(self, table, schema: str | None = None) -> list[ColumnMetadata]: ...