mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Add a number of types to docker.models.containers (#11912)
This commit is contained in:
@@ -8,17 +8,17 @@ from .resource import Collection, Model
|
||||
|
||||
class Container(Model):
|
||||
@property
|
||||
def name(self): ...
|
||||
def name(self) -> str | None: ...
|
||||
@property
|
||||
def image(self): ...
|
||||
def image(self) -> Image | None: ...
|
||||
@property
|
||||
def labels(self): ...
|
||||
@property
|
||||
def status(self): ...
|
||||
def status(self) -> str: ...
|
||||
@property
|
||||
def health(self): ...
|
||||
def health(self) -> str: ...
|
||||
@property
|
||||
def ports(self): ...
|
||||
def ports(self) -> dict[Incomplete, Incomplete]: ...
|
||||
def attach(self, **kwargs): ...
|
||||
def attach_socket(self, **kwargs): ...
|
||||
def commit(self, repository: str | None = None, tag: str | None = None, **kwargs): ...
|
||||
@@ -38,16 +38,18 @@ class Container(Model):
|
||||
environment: Incomplete | None = None,
|
||||
workdir: Incomplete | None = None,
|
||||
demux: bool = False,
|
||||
): ...
|
||||
def export(self, chunk_size=2097152): ...
|
||||
def get_archive(self, path, chunk_size=2097152, encode_stream: bool = False): ...
|
||||
) -> ExecResult: ...
|
||||
def export(self, chunk_size: int | None = 2097152) -> str: ...
|
||||
def get_archive(
|
||||
self, path, chunk_size: int | None = 2097152, encode_stream: bool = False
|
||||
) -> tuple[Incomplete, Incomplete]: ...
|
||||
def kill(self, signal: Incomplete | None = None): ...
|
||||
def logs(self, **kwargs) -> CancellableStream | bytes: ...
|
||||
def pause(self): ...
|
||||
def put_archive(self, path, data): ...
|
||||
def put_archive(self, path: str, data) -> bool: ...
|
||||
def remove(self, **kwargs) -> None: ...
|
||||
def rename(self, name): ...
|
||||
def resize(self, height, width): ...
|
||||
def rename(self, name: str): ...
|
||||
def resize(self, height: int, width: int): ...
|
||||
def restart(self, **kwargs): ...
|
||||
def start(self, **kwargs) -> None: ...
|
||||
def stats(self, **kwargs): ...
|
||||
@@ -68,22 +70,22 @@ class ContainerCollection(Collection[Container]):
|
||||
remove: bool = False,
|
||||
**kwargs,
|
||||
): ...
|
||||
def create(self, image: str, command: str | list[str] | None = None, **kwargs): ... # type:ignore[override]
|
||||
def get(self, container_id: str): ...
|
||||
def create(self, image: str, command: str | list[str] | None = None, **kwargs) -> Container: ... # type:ignore[override]
|
||||
def get(self, container_id: str) -> Container: ...
|
||||
def list(
|
||||
self,
|
||||
all: bool = False,
|
||||
before: Incomplete | None = None,
|
||||
before: str | None = None,
|
||||
filters: Incomplete | None = None,
|
||||
limit: int = -1,
|
||||
since: Incomplete | None = None,
|
||||
since: str | None = None,
|
||||
sparse: bool = False,
|
||||
ignore_removed: bool = False,
|
||||
): ...
|
||||
def prune(self, filters: Incomplete | None = None): ...
|
||||
|
||||
RUN_CREATE_KWARGS: Incomplete
|
||||
RUN_HOST_CONFIG_KWARGS: Incomplete
|
||||
RUN_CREATE_KWARGS: list[str]
|
||||
RUN_HOST_CONFIG_KWARGS: list[str]
|
||||
|
||||
class ExecResult(NamedTuple):
|
||||
exit_code: Incomplete
|
||||
|
||||
Reference in New Issue
Block a user