Skip to content

Commit 61f2be3

Browse files
authored
[docker-py] Add fallback exec_start overload (#15098)
1 parent ef2b90c commit 61f2be3

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

stubs/docker/docker/api/exec_api.pyi

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class ExecApiMixin:
7272
stream: Literal[True],
7373
socket: Literal[False],
7474
demux: Literal[False],
75-
) -> CancellableStream[str]: ...
75+
) -> CancellableStream[bytes]: ...
7676
@overload
7777
def exec_start(
7878
self,
@@ -83,7 +83,7 @@ class ExecApiMixin:
8383
stream: Literal[True],
8484
socket: Literal[False] = False,
8585
demux: Literal[False] = False,
86-
) -> CancellableStream[str]: ...
86+
) -> CancellableStream[bytes]: ...
8787
@overload
8888
def exec_start(
8989
self,
@@ -114,4 +114,23 @@ class ExecApiMixin:
114114
stream: Literal[False] = False,
115115
socket: Literal[False] = False,
116116
demux: Literal[False] = False,
117-
) -> str: ...
117+
) -> bytes: ...
118+
@overload
119+
def exec_start(
120+
self,
121+
exec_id: str,
122+
detach: bool = False,
123+
tty: bool = False,
124+
stream: bool = False,
125+
socket: bool = False,
126+
demux: bool = False,
127+
) -> (
128+
str
129+
| SocketIO
130+
| _BufferedReaderStream
131+
| SSHSocket
132+
| CancellableStream[bytes]
133+
| CancellableStream[tuple[str | None, str | None]]
134+
| tuple[str | None, str | None]
135+
| bytes
136+
): ...

0 commit comments

Comments
 (0)