@@ 73,7 73,7 @@ class AbstractRepository:
def cancel_upload(self, uuid: str):
raise NotImplementedError()
- async def finalize_upload(self, uuid: str, digest: str) -> Path:
+ async def finalize_upload(self, uuid: str, digest: str):
raise NotImplementedError()
def link_blob(self, digest: str, target: Path):
@@ 265,10 265,8 @@ class ArtifactRepository(AbstractRepository):
def cancel_upload(self, uuid: str):
self.upload_path(uuid).unlink()
- async def finalize_upload(self, uuid: str, digest: str) -> Path:
- return await _check_and_move(
- self.upload_path(uuid), self.blob_path(digest), digest
- )
+ async def finalize_upload(self, uuid: str, digest: str):
+ await _check_and_move(self.upload_path(uuid), self.blob_path(digest), digest)
def link_blob(self, digest: str, target: Path):
_copy_or_link(self.blob_path(digest), target)
@@ 371,8 369,8 @@ class UserRepository(AbstractRepository):
) -> int:
return await self.base.update_upload(uuid, stream)
- async def finalize_upload(self, uuid: str, digest: str) -> Path:
- return await self.base.finalize_upload(uuid, digest)
+ async def finalize_upload(self, uuid: str, digest: str):
+ await self.base.finalize_upload(uuid, digest)
def blob_path(self, digest: str, parent: Optional[Path] = None) -> Path:
return self.base.blob_path(digest, parent=parent)
@@ 444,4 442,3 @@ async def _check_and_move(src: Path, dst: Path, digest: str):
dst.parent.mkdir(mode=0o755, parents=True, exist_ok=True)
src.rename(dst)
dst.chmod(0o644)
- return dst