From 2d3094f9889d4993169a0997a75bef70fe218f3f Mon Sep 17 00:00:00 2001 From: Brandon Rising Date: Tue, 15 Aug 2023 21:51:45 -0400 Subject: [PATCH] Run python black --- invokeai/app/api/dependencies.py | 8 ++------ invokeai/app/cli_app.py | 9 ++------- invokeai/app/services/sqlite.py | 2 +- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/invokeai/app/api/dependencies.py b/invokeai/app/api/dependencies.py index 87c6f7eb66..d129dde19c 100644 --- a/invokeai/app/api/dependencies.py +++ b/invokeai/app/api/dependencies.py @@ -75,13 +75,9 @@ class ApiDependencies: db_path.parent.mkdir(parents=True, exist_ok=True) db_location = str(db_path) - db_conn = sqlite3.connect( - db_location, check_same_thread=False - ) # TODO: figure out a better threading solution + db_conn = sqlite3.connect(db_location, check_same_thread=False) # TODO: figure out a better threading solution - graph_execution_manager = SqliteItemStorage[GraphExecutionState]( - conn=db_conn, table_name="graph_executions" - ) + graph_execution_manager = SqliteItemStorage[GraphExecutionState](conn=db_conn, table_name="graph_executions") urls = LocalUrlService() image_record_storage = SqliteImageRecordStorage(conn=db_conn) diff --git a/invokeai/app/cli_app.py b/invokeai/app/cli_app.py index 63404b0b74..c70106566b 100644 --- a/invokeai/app/cli_app.py +++ b/invokeai/app/cli_app.py @@ -258,15 +258,10 @@ def invoke_cli(): db_location = config.db_path db_location.parent.mkdir(parents=True, exist_ok=True) - - db_conn = sqlite3.connect( - db_location, check_same_thread=False - ) # TODO: figure out a better threading solution + db_conn = sqlite3.connect(db_location, check_same_thread=False) # TODO: figure out a better threading solution logger.info(f'InvokeAI database location is "{db_location}"') - graph_execution_manager = SqliteItemStorage[GraphExecutionState]( - conn=db_conn, table_name="graph_executions" - ) + graph_execution_manager = SqliteItemStorage[GraphExecutionState](conn=db_conn, table_name="graph_executions") urls = LocalUrlService() image_record_storage = SqliteImageRecordStorage(conn=db_conn) diff --git a/invokeai/app/services/sqlite.py b/invokeai/app/services/sqlite.py index 76439b20c9..251964dafd 100644 --- a/invokeai/app/services/sqlite.py +++ b/invokeai/app/services/sqlite.py @@ -18,7 +18,7 @@ class SqliteItemStorage(ItemStorageABC, Generic[T]): _id_field: str _lock: Lock - def __init__(self, conn: sqlite3.Connection, table_name: str, id_field: str = "id"): + def __init__(self, conn: sqlite3.Connection, table_name: str, id_field: str = "id"): super().__init__() self._table_name = table_name