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

Conversation

dklimpel
Copy link
Contributor

IMO this was an oversight at:

The PR (#434) changed the return type from Generator[Image, None, None] to Generator[bytes, None, None]

The generator was created with the return value from get. get returns an Image

def _generator(body: dict) -> Generator[bytes, None, None]:
# Iterate and yield images from response body
for item in body["Names"]:
yield self.get(item)
# Pass the response body to the generator
return _generator(response.json())

def get(self, name: str) -> Image: # pylint: disable=arguments-differ,arguments-renamed

Signed-off-by: dklimpel <5740567+dklimpel@users.noreply.github.com>
@dklimpel
Copy link
Contributor Author

/assign mwhahaha

@dklimpel dklimpel marked this pull request as ready for review February 24, 2025 07:26
@inknos inknos self-requested a review February 24, 2025 08:54
@inknos
Copy link
Contributor

inknos commented Feb 24, 2025

Thanks @dklimpel

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Feb 24, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dklimpel, inknos

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 12ef0a8 into containers:main Feb 24, 2025
25 checks passed
@dklimpel dklimpel deleted the fix_type_load branch February 24, 2025 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants