From 94ffa6e3f512b491252a1d0674fef8a3f283534d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Fern=C3=A1ndez=20Iglesias?= Date: Wed, 26 Nov 2025 14:21:53 +0100 Subject: [PATCH] [docker-py] Fix the type of `Model` and `Collection` `client` attribute (#15083) --- stubs/docker/docker/models/resource.pyi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stubs/docker/docker/models/resource.pyi b/stubs/docker/docker/models/resource.pyi index 9356ef88f..8f81f5230 100644 --- a/stubs/docker/docker/models/resource.pyi +++ b/stubs/docker/docker/models/resource.pyi @@ -1,17 +1,17 @@ from typing import Any, Generic, NoReturn, TypeVar from typing_extensions import Self -from docker import APIClient +from docker import DockerClient _T = TypeVar("_T", bound=Model) class Model: id_attribute: str - client: APIClient | None + client: DockerClient | None collection: Collection[Self] | None attrs: dict[str, Any] def __init__( - self, attrs: dict[str, Any] | None = None, client: APIClient | None = None, collection: Collection[Self] | None = None + self, attrs: dict[str, Any] | None = None, client: DockerClient | None = None, collection: Collection[Self] | None = None ) -> None: ... def __eq__(self, other) -> bool: ... def __hash__(self) -> int: ... @@ -23,8 +23,8 @@ class Model: class Collection(Generic[_T]): model: type[_T] - client: APIClient - def __init__(self, client: APIClient | None = None) -> None: ... + client: DockerClient + def __init__(self, client: DockerClient | None = None) -> None: ... def __call__(self, *args, **kwargs) -> NoReturn: ... def list(self) -> list[_T]: ... def get(self, key: str) -> _T: ...