Skip to content

Commit ee78941

Browse files
[docker] Improve type annotations in api.swarm
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
1 parent 3319ac9 commit ee78941

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

stubs/docker/docker/api/swarm.pyi

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import logging
22
from typing import Any, Literal, TypedDict, type_check_only
33
from typing_extensions import TypeAlias
44

5+
from docker.types.services import DriverConfig
56
from docker.types.swarm import SwarmExternalCA, SwarmSpec
67

78
log: logging.Logger
@@ -30,9 +31,23 @@ class _UnlockKeyResponse(TypedDict):
3031
class SwarmApiMixin:
3132
def create_swarm_spec(
3233
self,
33-
*args: Any, # Any: forwarded to SwarmSpec.__init__
34+
task_history_retention_limit: int | None = None,
35+
snapshot_interval: int | None = None,
36+
keep_old_snapshots: int | None = None,
37+
log_entries_for_slow_followers: int | None = None,
38+
heartbeat_tick: int | None = None,
39+
election_tick: int | None = None,
40+
dispatcher_heartbeat_period: int | None = None,
41+
node_cert_expiry: int | None = None,
3442
external_ca: SwarmExternalCA | None = None,
35-
**kwargs: Any, # Any: forwarded to SwarmSpec.__init__
43+
external_cas: list[SwarmExternalCA] | None = None,
44+
name: str | None = None,
45+
labels: dict[str, str] | None = None,
46+
signing_ca_cert: str | None = None,
47+
signing_ca_key: str | None = None,
48+
ca_force_rotate: int | None = None,
49+
autolock_managers: bool | None = None,
50+
log_driver: DriverConfig | None = None,
3651
) -> SwarmSpec: ...
3752
def get_unlock_key(self) -> _UnlockKeyResponse: ...
3853
def init_swarm(

0 commit comments

Comments
 (0)