Skip to content

Add storage admin client helpers#1

Merged
jwfing merged 1 commit intomainfrom
storage-admin-sdks
Mar 29, 2026
Merged

Add storage admin client helpers#1
jwfing merged 1 commit intomainfrom
storage-admin-sdks

Conversation

@jwfing
Copy link
Copy Markdown
Member

@jwfing jwfing commented Mar 29, 2026

Summary

  • add bucket management endpoints, listing, and strategy helpers to the storage client
  • extend storage models and tests to cover download metadata and admin operations
  • add .gitignore for caches/build artifacts

Testing

  • pytest tests/storage

Note

Add bucket admin and object management helpers to StorageClient

  • Adds create_bucket, update_bucket, and delete_bucket methods for bucket administration.
  • Adds list_objects with pagination and search support, upload_object_auto for multipart form uploads, confirm_upload, get_upload_strategy, and get_download_strategy.
  • Adds new response models in models.py: StorageBucketResponse, StorageBucketUpdateResponse, StoredFileList, UploadStrategy, DownloadStrategy, StorageDeleteBucketResponse, and StorageDownloadResult.
  • Behavioral Change: download_object now returns a StorageDownloadResult dataclass (with content, content_type, and content_length) instead of raw bytes.
📊 Macroscope summarized ea26659. 4 files reviewed, 1 issue evaluated, 0 issues filtered, 1 comment posted

🗂️ Filtered Issues


from collections.abc import Mapping
from typing import Any
from typing import Iterable
Comment on lines +329 to +330
def test_upload_auto_and_strategy_endpoints() -> None:
async def scenario() -> tuple[list[dict[str, object]], object, object, object]:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Low storage/test_storage_client.py:329

The return type annotation tuple[list[dict[str, object]], object, object, object] declares 4 elements, but the function returns 5 elements: calls, auto, confirm, upload_strategy, download_strategy. This causes type checkers to flag the return statement as invalid. Consider updating the annotation to tuple[list[dict[str, object]], object, object, object, object].

Suggested change
def test_upload_auto_and_strategy_endpoints() -> None:
async def scenario() -> tuple[list[dict[str, object]], object, object, object]:
def test_upload_auto_and_strategy_endpoints() -> None:
async def scenario() -> tuple[list[dict[str, object]], object, object, object, object]:
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file tests/storage/test_storage_client.py around lines 329-330:

The return type annotation `tuple[list[dict[str, object]], object, object, object]` declares 4 elements, but the function returns 5 elements: `calls, auto, confirm, upload_strategy, download_strategy`. This causes type checkers to flag the return statement as invalid. Consider updating the annotation to `tuple[list[dict[str, object]], object, object, object, object]`.

Evidence trail:
tests/storage/test_storage_client.py lines 329-385 at REVIEWED_COMMIT: Line 329 shows `async def scenario() -> tuple[list[dict[str, object]], object, object, object]:` (4 tuple elements). Line 385 shows `return calls, auto, confirm, upload_strategy, download_strategy` (5 return values).

@jwfing jwfing merged commit c43b98d into main Mar 29, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant