Run python black

This commit is contained in:
Brandon Rising 2023-08-15 21:51:45 -04:00
parent abf09fc8fa
commit 2d3094f988
3 changed files with 5 additions and 14 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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