clearml/clearml/errors.py
clearml 90d3578aeb Add function annotations
Remove support for PY2.x and PY3.5
2025-04-17 22:26:06 +03:00

21 lines
666 B
Python

from typing import List, Any
class UsageError(RuntimeError):
"""An exception raised for illegal usage of clearml objects"""
pass
class ArtifactUriDeleteError(ValueError):
def __init__(self, artifact: str, uri: str, remaining_uris: List[str]) -> None:
super(ArtifactUriDeleteError, self).__init__("Failed deleting artifact {}: file {}".format(artifact, uri))
self.artifact = artifact
self.uri = uri
self._remaining_uris = remaining_uris
@property
def remaining_uris(self) -> Any:
"""Remaining URIs to delete. Deletion of these URIs was aborted due to the error."""
return self._remaining_uris