Skip to content

Commit 12ef0a8

Browse files
Merge pull request #519 from dklimpel/fix_type_load
fix: set return type for `ImagesManager.load()` to `Image`
2 parents d406f55 + 672397c commit 12ef0a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

podman/domain/images_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def get_registry_data(
123123

124124
def load(
125125
self, data: Optional[bytes] = None, file_path: Optional[os.PathLike] = None
126-
) -> Generator[bytes, None, None]:
126+
) -> Generator[Image, None, None]:
127127
"""Restore an image previously saved.
128128
129129
Args:
@@ -159,7 +159,7 @@ def load(
159159
)
160160
response.raise_for_status() # Catch any errors before proceeding
161161

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

0 commit comments

Comments
 (0)