Skip to content

fix: Starred tuple unpacking everywhere in GCS artifact service #1669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/google/adk/artifacts/gcs_artifact_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,6 @@ async def list_versions(
blobs = self.storage_client.list_blobs(self.bucket, prefix=prefix)
versions = []
for blob in blobs:
_, _, _, _, version = blob.name.split("/")
*_, version = blob.name.split("/")
versions.append(int(version))
return versions
2 changes: 1 addition & 1 deletion tests/unittests/artifacts/test_artifact_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ async def test_list_versions(service_type):
app_name = "app0"
user_id = "user0"
session_id = "123"
filename = "filename"
filename = "with/slash/filename"
versions = [
types.Part.from_bytes(
data=i.to_bytes(2, byteorder="big"), mime_type="text/plain"
Expand Down
Loading