Add more keyword argument types for Docker pull (#12210)

This commit is contained in:
Adam Dangoor
2024-06-25 14:23:03 +01:00
committed by GitHub
parent 49b1777037
commit 60443ca258
2 changed files with 30 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
from _typeshed import Incomplete
from typing import Any
log: Incomplete
@@ -39,9 +40,9 @@ class ImageApiMixin:
repository: str,
tag: str | None = None,
stream: bool = False,
auth_config: Incomplete | None = None,
auth_config: dict[str, Any] | None = None,
decode: bool = False,
platform: Incomplete | None = None,
platform: str | None = None,
all_tags: bool = False,
): ...
def push(

View File

@@ -75,11 +75,35 @@ class ImageCollection(Collection[Image]):
def list(self, name: str | None = None, all: bool = False, filters: dict[str, Any] | None = None) -> _ImageList: ...
def load(self, data: bytes) -> _ImageList: ...
@overload
def pull(self, repository: str, tag: str | None = None, all_tags: Literal[False] = False, **kwargs) -> Image: ...
def pull(
self,
repository: str,
tag: str | None = None,
all_tags: Literal[False] = False,
*,
platform: str | None = None,
auth_config: dict[str, Any] | None = None,
) -> Image: ...
@overload
def pull(self, repository: str, tag: str | None = None, *, all_tags: Literal[True], **kwargs) -> _ImageList: ...
def pull(
self,
repository: str,
tag: str | None = None,
*,
all_tags: Literal[True],
auth_config: dict[str, Any] | None = None,
platform: str | None = None,
) -> _ImageList: ...
@overload
def pull(self, repository: str, tag: str | None, all_tags: Literal[True], **kwargs) -> _ImageList: ...
def pull(
self,
repository: str,
tag: str | None,
all_tags: Literal[True],
*,
auth_config: dict[str, Any] | None = None,
platform: str | None = None,
) -> _ImageList: ...
def push(self, repository: str, tag: str | None = None, **kwargs): ...
def remove(self, *args, **kwargs) -> None: ...
def search(self, *args, **kwargs): ...