Skip to content

Commit d5e4988

Browse files
committed
types
1 parent 1adfe12 commit d5e4988

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

podman/api/parse_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from typing import Any, Optional, Union
99
from collections.abc import Iterator
1010

11-
from requests import Response
11+
from podman.api.client import APIResponse
1212
from .output_utils import demux_output
1313

1414

@@ -67,7 +67,7 @@ def prepare_cidr(value: Union[ipaddress.IPv4Network, ipaddress.IPv6Network]) ->
6767
return str(value.network_address), base64.b64encode(value.netmask.packed).decode("utf-8")
6868

6969

70-
def frames(response: Response) -> Iterator[bytes]:
70+
def frames(response: APIResponse) -> Iterator[bytes]:
7171
"""Returns each frame from multiplexed payload, all results are expected in the payload.
7272
7373
The stdout and stderr frames are undifferentiated as they are returned.
@@ -84,7 +84,7 @@ def frames(response: Response) -> Iterator[bytes]:
8484

8585

8686
def stream_frames(
87-
response: Response, demux: bool = False
87+
response: APIResponse, demux: bool = False
8888
) -> Iterator[Union[bytes, tuple[bytes, bytes]]]:
8989
"""Returns each frame from multiplexed streamed payload.
9090
@@ -111,7 +111,7 @@ def stream_frames(
111111

112112

113113
def stream_helper(
114-
response: Response, decode_to_json: bool = False
114+
response: APIResponse, decode_to_json: bool = False
115115
) -> Union[Iterator[bytes], Iterator[dict[str, Any]]]:
116116
"""Helper to stream results and optionally decode to json"""
117117
for value in response.iter_lines():

0 commit comments

Comments
 (0)