chore: ruff

This commit is contained in:
psychedelicious 2024-02-24 17:43:50 +11:00
parent 4420392241
commit e22c4987bf
2 changed files with 6 additions and 22 deletions

View File

@ -357,7 +357,7 @@ class EventServiceBase:
bytes: int, bytes: int,
total_bytes: int, total_bytes: int,
parts: List[Dict[str, Union[str, int]]], parts: List[Dict[str, Union[str, int]]],
id: int id: int,
) -> None: ) -> None:
""" """
Emit at intervals while the install job is in progress (remote models only). Emit at intervals while the install job is in progress (remote models only).
@ -377,7 +377,7 @@ class EventServiceBase:
"bytes": bytes, "bytes": bytes,
"total_bytes": total_bytes, "total_bytes": total_bytes,
"parts": parts, "parts": parts,
"id": id "id": id,
}, },
) )
@ -402,12 +402,7 @@ class EventServiceBase:
""" """
self.__emit_model_event( self.__emit_model_event(
event_name="model_install_completed", event_name="model_install_completed",
payload={ payload={"source": source, "total_bytes": total_bytes, "key": key, "id": id},
"source": source,
"total_bytes": total_bytes,
"key": key,
"id": id
},
) )
def emit_model_install_cancelled(self, source: str) -> None: def emit_model_install_cancelled(self, source: str) -> None:
@ -421,13 +416,7 @@ class EventServiceBase:
payload={"source": source}, payload={"source": source},
) )
def emit_model_install_error( def emit_model_install_error(self, source: str, error_type: str, error: str, id: int) -> None:
self,
source: str,
error_type: str,
error: str,
id: int
) -> None:
""" """
Emit when an install job encounters an exception. Emit when an install job encounters an exception.
@ -437,12 +426,7 @@ class EventServiceBase:
""" """
self.__emit_model_event( self.__emit_model_event(
event_name="model_install_error", event_name="model_install_error",
payload={ payload={"source": source, "error_type": error_type, "error": error, "id": id},
"source": source,
"error_type": error_type,
"error": error,
"id": id
},
) )
def emit_bulk_download_started( def emit_bulk_download_started(

View File

@ -822,7 +822,7 @@ class ModelInstallService(ModelInstallServiceBase):
parts=parts, parts=parts,
bytes=job.bytes, bytes=job.bytes,
total_bytes=job.total_bytes, total_bytes=job.total_bytes,
id=job.id id=job.id,
) )
def _signal_job_completed(self, job: ModelInstallJob) -> None: def _signal_job_completed(self, job: ModelInstallJob) -> None: