1- from _typeshed import Incomplete
21from collections .abc import Iterable , Mapping
32from typing import Any , Final , Literal
43
@@ -18,63 +17,80 @@ class LogConfigTypesEnum:
1817 FLUENTD : Final = "fluentd"
1918 NONE : Final = "none"
2019
21- class LogConfig (DictType ):
20+ class LogConfig (DictType [ Any ] ):
2221 types : type [LogConfigTypesEnum ]
23- def __init__ (self , ** kwargs ) -> None : ...
22+ def __init__ (
23+ self , * , type : str = ..., Type : str = ..., config : dict [str , str ] = ..., Config : dict [str , str ] = ...
24+ ) -> None : ...
2425 @property
25- def type (self ): ...
26+ def type (self ) -> str : ...
2627 @type .setter
27- def type (self , value ) -> None : ...
28+ def type (self , value : str ) -> None : ...
2829 @property
29- def config (self ): ...
30- def set_config_value (self , key , value ) -> None : ...
31- def unset_config (self , key ) -> None : ...
30+ def config (self ) -> dict [ str , str ] : ...
31+ def set_config_value (self , key : str , value : str ) -> None : ...
32+ def unset_config (self , key : str ) -> None : ...
3233
33- class Ulimit (DictType ):
34- def __init__ (self , ** kwargs ) -> None : ...
34+ class Ulimit (DictType [Any ]):
35+ def __init__ (
36+ self , * , name : str = ..., Name : str = ..., soft : int = ..., Soft : int = ..., hard : int = ..., Hard : int = ...
37+ ) -> None : ...
3538 @property
36- def name (self ): ...
39+ def name (self ) -> str : ...
3740 @name .setter
38- def name (self , value ) -> None : ...
41+ def name (self , value : str ) -> None : ...
3942 @property
40- def soft (self ): ...
43+ def soft (self ) -> int | None : ...
4144 @soft .setter
42- def soft (self , value ) -> None : ...
45+ def soft (self , value : int | None ) -> None : ...
4346 @property
44- def hard (self ): ...
47+ def hard (self ) -> int | None : ...
4548 @hard .setter
46- def hard (self , value ) -> None : ...
49+ def hard (self , value : int | None ) -> None : ...
4750
48- class DeviceRequest (DictType ):
49- def __init__ (self , ** kwargs ) -> None : ...
51+ class DeviceRequest (DictType [Any ]):
52+ def __init__ (
53+ self ,
54+ * ,
55+ driver : str = ...,
56+ Driver : str = ...,
57+ count : int = ...,
58+ Count : int = ...,
59+ device_ids : list [str ] = ...,
60+ DeviceIDs : list [str ] = ...,
61+ capabilities : list [list [str ]] = ...,
62+ Capabilities : list [list [str ]] = ...,
63+ options : dict [str , str ] = ...,
64+ Options : dict [str , str ] = ...,
65+ ) -> None : ...
5066 @property
51- def driver (self ): ...
67+ def driver (self ) -> str : ...
5268 @driver .setter
53- def driver (self , value ) -> None : ...
69+ def driver (self , value : str ) -> None : ...
5470 @property
55- def count (self ): ...
71+ def count (self ) -> int : ...
5672 @count .setter
57- def count (self , value ) -> None : ...
73+ def count (self , value : int ) -> None : ...
5874 @property
59- def device_ids (self ): ...
75+ def device_ids (self ) -> list [ str ] : ...
6076 @device_ids .setter
61- def device_ids (self , value ) -> None : ...
77+ def device_ids (self , value : list [ str ] ) -> None : ...
6278 @property
63- def capabilities (self ): ...
79+ def capabilities (self ) -> list [ list [ str ]] : ...
6480 @capabilities .setter
65- def capabilities (self , value ) -> None : ...
81+ def capabilities (self , value : list [ list [ str ]] ) -> None : ...
6682 @property
67- def options (self ): ...
83+ def options (self ) -> dict [ str , str ] : ...
6884 @options .setter
69- def options (self , value ) -> None : ...
85+ def options (self , value : dict [ str , str ] ) -> None : ...
7086
71- class HostConfig (dict [str , Incomplete ]):
87+ class HostConfig (dict [str , Any ]):
7288 def __init__ (
7389 self ,
7490 version : str ,
7591 binds : dict [str , Mapping [str , str ]] | list [str ] | None = None ,
76- port_bindings : Mapping [int | str , Incomplete ] | None = None ,
77- lxc_conf : dict [str , Incomplete ] | list [dict [str , Incomplete ]] | None = None ,
92+ port_bindings : Mapping [int | str , Any ] | None = None , # Any: int, str, tuple, dict, or list
93+ lxc_conf : dict [str , str ] | list [dict [str , str ]] | None = None ,
7894 publish_all_ports : bool = False ,
7995 links : dict [str , str ] | dict [str , None ] | dict [str , str | None ] | Iterable [tuple [str , str | None ]] | None = None ,
8096 privileged : bool = False ,
@@ -86,7 +102,7 @@ class HostConfig(dict[str, Incomplete]):
86102 cap_add : list [str ] | None = None ,
87103 cap_drop : list [str ] | None = None ,
88104 devices : list [str ] | None = None ,
89- extra_hosts : dict [str , Incomplete ] | list [Incomplete ] | None = None ,
105+ extra_hosts : dict [str , str ] | list [str ] | None = None ,
90106 read_only : bool | None = None ,
91107 pid_mode : str | None = None ,
92108 ipc_mode : str | None = None ,
@@ -113,15 +129,15 @@ class HostConfig(dict[str, Incomplete]):
113129 sysctls : dict [str , str ] | None = None ,
114130 tmpfs : dict [str , str ] | None = None ,
115131 oom_score_adj : int | None = None ,
116- dns_opt : list [Incomplete ] | None = None ,
132+ dns_opt : list [str ] | None = None ,
117133 cpu_shares : int | None = None ,
118134 cpuset_cpus : str | None = None ,
119135 userns_mode : str | None = None ,
120136 uts_mode : str | None = None ,
121137 pids_limit : int | None = None ,
122138 isolation : str | None = None ,
123139 auto_remove : bool = False ,
124- storage_opt : dict [Incomplete , Incomplete ] | None = None ,
140+ storage_opt : dict [str , str ] | None = None ,
125141 init : bool | None = None ,
126142 init_path : str | None = None ,
127143 volume_driver : str | None = None ,
@@ -133,7 +149,7 @@ class HostConfig(dict[str, Incomplete]):
133149 mounts : list [Mount ] | None = None ,
134150 cpu_rt_period : int | None = None ,
135151 cpu_rt_runtime : int | None = None ,
136- device_cgroup_rules : list [Incomplete ] | None = None ,
152+ device_cgroup_rules : list [str ] | None = None ,
137153 device_requests : list [DeviceRequest ] | None = None ,
138154 cgroupns : Literal ["private" , "host" ] | None = None ,
139155 ) -> None : ...
@@ -143,7 +159,7 @@ def host_config_version_error(param: str, version: str, less_than: bool = True)
143159def host_config_value_error (param : str , param_value : object ) -> ValueError : ...
144160def host_config_incompatible_error (param : str , param_value : str , incompatible_param : str ) -> errors .InvalidArgument : ...
145161
146- class ContainerConfig (dict [str , Incomplete ]):
162+ class ContainerConfig (dict [str , Any ]):
147163 def __init__ (
148164 self ,
149165 version : str ,
@@ -156,7 +172,7 @@ class ContainerConfig(dict[str, Incomplete]):
156172 tty : bool = False ,
157173 # list is invariant, enumerating all possible union combination would be too complex for:
158174 # list[str | int | tuple[int | str, str] | tuple[int | str, ...]]
159- ports : dict [str , dict [Incomplete , Incomplete ]] | list [Any ] | None = None ,
175+ ports : dict [str , dict [str , str ]] | list [Any ] | None = None ,
160176 environment : dict [str , str ] | list [str ] | None = None ,
161177 volumes : str | list [str ] | None = None ,
162178 network_disabled : bool = False ,
0 commit comments