From 9174db0d7daea7201fd510467611ba4b11df2d1c Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 10 May 2024 09:08:47 +0100 Subject: [PATCH] Add some types to Docker ContainerCollection parameters (#11857) --- stubs/docker/docker/models/containers.pyi | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stubs/docker/docker/models/containers.pyi b/stubs/docker/docker/models/containers.pyi index 572ec21c2..524920e94 100644 --- a/stubs/docker/docker/models/containers.pyi +++ b/stubs/docker/docker/models/containers.pyi @@ -57,10 +57,16 @@ class Container(Model): class ContainerCollection(Collection[Container]): model: type[Container] def run( - self, image, command: Incomplete | None = None, stdout: bool = True, stderr: bool = False, remove: bool = False, **kwargs + self, + image: str, + command: str | list[str] | None = None, + stdout: bool = True, + stderr: bool = False, + remove: bool = False, + **kwargs, ): ... - def create(self, image, command: Incomplete | None = None, **kwargs): ... # type:ignore[override] - def get(self, container_id): ... + def create(self, image: str, command: str | list[str] | None = None, **kwargs): ... # type:ignore[override] + def get(self, container_id: str): ... def list( self, all: bool = False,