Add more specific types to Docker network inspect/get equivalent methods (#12188)

This commit is contained in:
Adam Dangoor
2024-06-24 11:38:32 +01:00
committed by GitHub
parent f66d687b08
commit da443145bc
2 changed files with 6 additions and 2 deletions

View File

@@ -33,7 +33,9 @@ class NetworkApiMixin:
) -> dict[str, str]: ...
def prune_networks(self, filters: Incomplete | None = None): ...
def remove_network(self, net_id: _Network) -> None: ...
def inspect_network(self, net_id: _Network, verbose: Incomplete | None = None, scope: Incomplete | None = None): ...
def inspect_network(
self, net_id: _Network, verbose: bool | None = None, scope: Literal["local", "global", "swarm"] | None = None
): ...
def connect_container_to_network(
self,
container: _Container,

View File

@@ -30,6 +30,8 @@ class NetworkCollection(Collection[Network]):
scope: Literal["local", "global", "swarm"] | None = None,
ingress: bool | None = None,
) -> Network: ...
def get(self, network_id: str, *args, **kwargs) -> Network: ... # type:ignore[override]
def get(
self, network_id: str, verbose: bool | None = None, scope: Literal["local", "global", "swarm"] | None = None
) -> Network: ... # type:ignore[override]
def list(self, *args, **kwargs) -> list[Network]: ...
def prune(self, filters: dict[str, Any] | None = None) -> dict[str, Any]: ...