Skip to content

Commit 94ffa6e

Browse files
authored
[docker-py] Fix the type of Model and Collection client attribute (#15083)
1 parent 55cc868 commit 94ffa6e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stubs/docker/docker/models/resource.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
from typing import Any, Generic, NoReturn, TypeVar
22
from typing_extensions import Self
33

4-
from docker import APIClient
4+
from docker import DockerClient
55

66
_T = TypeVar("_T", bound=Model)
77

88
class Model:
99
id_attribute: str
10-
client: APIClient | None
10+
client: DockerClient | None
1111
collection: Collection[Self] | None
1212
attrs: dict[str, Any]
1313
def __init__(
14-
self, attrs: dict[str, Any] | None = None, client: APIClient | None = None, collection: Collection[Self] | None = None
14+
self, attrs: dict[str, Any] | None = None, client: DockerClient | None = None, collection: Collection[Self] | None = None
1515
) -> None: ...
1616
def __eq__(self, other) -> bool: ...
1717
def __hash__(self) -> int: ...
@@ -23,8 +23,8 @@ class Model:
2323

2424
class Collection(Generic[_T]):
2525
model: type[_T]
26-
client: APIClient
27-
def __init__(self, client: APIClient | None = None) -> None: ...
26+
client: DockerClient
27+
def __init__(self, client: DockerClient | None = None) -> None: ...
2828
def __call__(self, *args, **kwargs) -> NoReturn: ...
2929
def list(self) -> list[_T]: ...
3030
def get(self, key: str) -> _T: ...

0 commit comments

Comments
 (0)