Skip to content

Commit defa72a

Browse files
committed
update snippets
1 parent b6cd481 commit defa72a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

sdk/containerregistry/azure-containerregistry/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,17 @@ with ContainerRegistryClient(self.endpoint, self.credential) as client:
136136
# Keep the three most recent images, delete everything else
137137
manifest_count = 0
138138
for manifest in client.list_manifest_properties(
139-
repository, order_by=ArtifactManifestOrder.LAST_UPDATED_ON_DESCENDING
139+
repository,
140+
order_by=ArtifactManifestOrder.LAST_UPDATED_ON_DESCENDING,
140141
):
141142
manifest_count += 1
142143
if manifest_count > 3:
143144
# Make sure will have the permission to delete the manifest later
144-
client.update_manifest_properties(repository, manifest.digest, can_write=True, can_delete=True) # type: ignore[arg-type]
145+
client.update_manifest_properties(
146+
repository, manifest.digest, can_write=True, can_delete=True
147+
)
145148
print(f"Deleting {repository}:{manifest.digest}")
146-
client.delete_manifest(repository, manifest.digest) # type: ignore[arg-type]
149+
client.delete_manifest(repository, manifest.digest)
147150
```
148151

149152
<!-- END SNIPPET -->

sdk/containerregistry/azure-containerregistry/samples/sample_set_get_image_async.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ async def set_get_oci_image(self):
7575
# Set the image
7676
manifest_digest = await client.set_manifest(repository_name, oci_manifest, tag="latest")
7777
print(f"Uploaded manifest: digest - {manifest_digest}")
78-
# [END upload_blob_and_manifest_async]
7978

80-
# [START download_blob_and_manifest_async]
8179
# Get the image
8280
get_manifest_result = await client.get_manifest(repository_name, "latest")
8381
received_manifest = get_manifest_result.manifest

0 commit comments

Comments
 (0)