Skip to content
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

fix: set return type for ImagesManager.load() to Image #519

Merged
merged 1 commit into from
Feb 24, 2025
Merged
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
4 changes: 2 additions & 2 deletions podman/domain/images_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def get_registry_data(

def load(
self, data: Optional[bytes] = None, file_path: Optional[os.PathLike] = None
) -> Generator[bytes, None, None]:
) -> Generator[Image, None, None]:
"""Restore an image previously saved.

Args:
Expand Down Expand Up @@ -159,7 +159,7 @@ def load(
)
response.raise_for_status() # Catch any errors before proceeding

def _generator(body: dict) -> Generator[bytes, None, None]:
def _generator(body: dict) -> Generator[Image, None, None]:
# Iterate and yield images from response body
for item in body["Names"]:
yield self.get(item)
Expand Down