diff --git a/stubs/docker/docker/api/container.pyi b/stubs/docker/docker/api/container.pyi index 3c7bd83fa..b220daaaf 100644 --- a/stubs/docker/docker/api/container.pyi +++ b/stubs/docker/docker/api/container.pyi @@ -17,12 +17,18 @@ _Container: TypeAlias = _HasId | _HasID | str class ContainerApiMixin: def attach( - self, container, stdout: bool = True, stderr: bool = True, stream: bool = False, logs: bool = False, demux: bool = False + self, + container: _Container, + stdout: bool = True, + stderr: bool = True, + stream: bool = False, + logs: bool = False, + demux: bool = False, ): ... - def attach_socket(self, container, params: Incomplete | None = None, ws: bool = False): ... + def attach_socket(self, container: _Container, params: Incomplete | None = None, ws: bool = False): ... def commit( self, - container, + container: _Container, repository: str | None = None, tag: str | None = None, message: Incomplete | None = None, @@ -76,11 +82,11 @@ class ContainerApiMixin: def create_host_config(self, *args, **kwargs): ... def create_networking_config(self, *args, **kwargs): ... def create_endpoint_config(self, *args, **kwargs): ... - def diff(self, container): ... - def export(self, container, chunk_size=2097152): ... - def get_archive(self, container, path, chunk_size=2097152, encode_stream: bool = False): ... - def inspect_container(self, container): ... - def kill(self, container, signal: Incomplete | None = None) -> None: ... + def diff(self, container: _Container): ... + def export(self, container: _Container, chunk_size=2097152): ... + def get_archive(self, container: _Container, path, chunk_size=2097152, encode_stream: bool = False): ... + def inspect_container(self, container: _Container): ... + def kill(self, container: _Container, signal: Incomplete | None = None) -> None: ... @overload def logs( self, @@ -121,22 +127,24 @@ class ContainerApiMixin: follow: bool | None = None, until: datetime.datetime | float | None = None, ) -> bytes: ... - def pause(self, container) -> None: ... - def port(self, container, private_port): ... - def put_archive(self, container, path, data): ... + def pause(self, container: _Container) -> None: ... + def port(self, container: _Container, private_port): ... + def put_archive(self, container: _Container, path, data): ... def prune_containers(self, filters: Incomplete | None = None): ... - def remove_container(self, container, v: bool = False, link: bool = False, force: bool = False) -> None: ... - def rename(self, container, name) -> None: ... - def resize(self, container, height, width) -> None: ... - def restart(self, container, timeout: int = 10) -> None: ... - def start(self, container, *args, **kwargs) -> None: ... - def stats(self, container, decode: Incomplete | None = None, stream: bool = True, one_shot: Incomplete | None = None): ... - def stop(self, container, timeout: Incomplete | None = None) -> None: ... - def top(self, container, ps_args: Incomplete | None = None): ... - def unpause(self, container) -> None: ... + def remove_container(self, container: _Container, v: bool = False, link: bool = False, force: bool = False) -> None: ... + def rename(self, container: _Container, name) -> None: ... + def resize(self, container: _Container, height, width) -> None: ... + def restart(self, container: _Container, timeout: int = 10) -> None: ... + def start(self, container: _Container, *args, **kwargs) -> None: ... + def stats( + self, container: _Container, decode: Incomplete | None = None, stream: bool = True, one_shot: Incomplete | None = None + ): ... + def stop(self, container: _Container, timeout: Incomplete | None = None) -> None: ... + def top(self, container: _Container, ps_args: Incomplete | None = None): ... + def unpause(self, container: _Container) -> None: ... def update_container( self, - container, + container: _Container, blkio_weight: Incomplete | None = None, cpu_period: Incomplete | None = None, cpu_quota: Incomplete | None = None, @@ -149,4 +157,4 @@ class ContainerApiMixin: kernel_memory: Incomplete | None = None, restart_policy: Incomplete | None = None, ): ... - def wait(self, container, timeout: Incomplete | None = None, condition: Incomplete | None = None): ... + def wait(self, container: _Container, timeout: Incomplete | None = None, condition: Incomplete | None = None): ...