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,
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(

View File

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