From e22c4987bfaabcae8cd809c4b41506fd797ed144 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 24 Feb 2024 17:43:50 +1100 Subject: [PATCH] chore: ruff --- invokeai/app/services/events/events_base.py | 26 ++++--------------- .../model_install/model_install_default.py | 2 +- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/invokeai/app/services/events/events_base.py b/invokeai/app/services/events/events_base.py index b3ee70b359..b52b919edd 100644 --- a/invokeai/app/services/events/events_base.py +++ b/invokeai/app/services/events/events_base.py @@ -357,7 +357,7 @@ class EventServiceBase: bytes: int, total_bytes: int, parts: List[Dict[str, Union[str, int]]], - id: int + id: int, ) -> None: """ Emit at intervals while the install job is in progress (remote models only). @@ -377,7 +377,7 @@ class EventServiceBase: "bytes": bytes, "total_bytes": total_bytes, "parts": parts, - "id": id + "id": id, }, ) @@ -402,12 +402,7 @@ class EventServiceBase: """ self.__emit_model_event( event_name="model_install_completed", - payload={ - "source": source, - "total_bytes": total_bytes, - "key": key, - "id": id - }, + payload={"source": source, "total_bytes": total_bytes, "key": key, "id": id}, ) def emit_model_install_cancelled(self, source: str) -> None: @@ -421,13 +416,7 @@ class EventServiceBase: payload={"source": source}, ) - def emit_model_install_error( - self, - source: str, - error_type: str, - error: str, - id: int - ) -> None: + def emit_model_install_error(self, source: str, error_type: str, error: str, id: int) -> None: """ Emit when an install job encounters an exception. @@ -437,12 +426,7 @@ class EventServiceBase: """ self.__emit_model_event( event_name="model_install_error", - payload={ - "source": source, - "error_type": error_type, - "error": error, - "id": id - }, + payload={"source": source, "error_type": error_type, "error": error, "id": id}, ) def emit_bulk_download_started( diff --git a/invokeai/app/services/model_install/model_install_default.py b/invokeai/app/services/model_install/model_install_default.py index ec330913c2..089acf442f 100644 --- a/invokeai/app/services/model_install/model_install_default.py +++ b/invokeai/app/services/model_install/model_install_default.py @@ -822,7 +822,7 @@ class ModelInstallService(ModelInstallServiceBase): parts=parts, bytes=job.bytes, total_bytes=job.total_bytes, - id=job.id + id=job.id, ) def _signal_job_completed(self, job: ModelInstallJob) -> None: