Skip to content

Commit

Permalink
Fix BaseStash.update typing
Browse files Browse the repository at this point in the history
  • Loading branch information
kiendang committed Jan 16, 2024
1 parent d4bc2a4 commit 2b2823c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/syft/src/syft/service/worker/worker_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from typing import List
from typing import Tuple
from typing import Union
from typing import cast

# third party
import docker
Expand Down Expand Up @@ -156,5 +155,5 @@ def _check_and_update_status_for_worker(
message=f"Failed to update status for worker: {worker.id}. Error: {result.err()}"
)
if result.is_err()
else cast(SyftWorker, result.ok())
else result.ok()
)
2 changes: 1 addition & 1 deletion packages/syft/src/syft/store/document_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ def update(
credentials: SyftVerifyKey,
obj: BaseStash.object_type,
has_permission=False,
) -> Optional[Result[BaseStash.object_type, str]]:
) -> Result[BaseStash.object_type, str]:
qk = self.partition.store_query_key(obj)
return self.partition.update(
credentials=credentials, qk=qk, obj=obj, has_permission=has_permission
Expand Down

0 comments on commit 2b2823c

Please sign in to comment.