@@ -8,17 +8,17 @@ from .resource import Collection, Model
8
8
9
9
class Container (Model ):
10
10
@property
11
- def name (self ): ...
11
+ def name (self ) -> str | None : ...
12
12
@property
13
- def image (self ): ...
13
+ def image (self ) -> Image | None : ...
14
14
@property
15
15
def labels (self ): ...
16
16
@property
17
- def status (self ): ...
17
+ def status (self ) -> str : ...
18
18
@property
19
- def health (self ): ...
19
+ def health (self ) -> str : ...
20
20
@property
21
- def ports (self ): ...
21
+ def ports (self ) -> dict [ Incomplete , Incomplete ] : ...
22
22
def attach (self , ** kwargs ): ...
23
23
def attach_socket (self , ** kwargs ): ...
24
24
def commit (self , repository : str | None = None , tag : str | None = None , ** kwargs ): ...
@@ -38,16 +38,18 @@ class Container(Model):
38
38
environment : Incomplete | None = None ,
39
39
workdir : Incomplete | None = None ,
40
40
demux : bool = False ,
41
- ): ...
42
- def export (self , chunk_size = 2097152 ): ...
43
- def get_archive (self , path , chunk_size = 2097152 , encode_stream : bool = False ): ...
41
+ ) -> ExecResult : ...
42
+ def export (self , chunk_size : int | None = 2097152 ) -> str : ...
43
+ def get_archive (
44
+ self , path , chunk_size : int | None = 2097152 , encode_stream : bool = False
45
+ ) -> tuple [Incomplete , Incomplete ]: ...
44
46
def kill (self , signal : Incomplete | None = None ): ...
45
47
def logs (self , ** kwargs ) -> CancellableStream | bytes : ...
46
48
def pause (self ): ...
47
- def put_archive (self , path , data ): ...
49
+ def put_archive (self , path : str , data ) -> bool : ...
48
50
def remove (self , ** kwargs ) -> None : ...
49
- def rename (self , name ): ...
50
- def resize (self , height , width ): ...
51
+ def rename (self , name : str ): ...
52
+ def resize (self , height : int , width : int ): ...
51
53
def restart (self , ** kwargs ): ...
52
54
def start (self , ** kwargs ) -> None : ...
53
55
def stats (self , ** kwargs ): ...
@@ -68,22 +70,22 @@ class ContainerCollection(Collection[Container]):
68
70
remove : bool = False ,
69
71
** kwargs ,
70
72
): ...
71
- def create (self , image : str , command : str | list [str ] | None = None , ** kwargs ): ... # type:ignore[override]
72
- def get (self , container_id : str ): ...
73
+ def create (self , image : str , command : str | list [str ] | None = None , ** kwargs ) -> Container : ... # type:ignore[override]
74
+ def get (self , container_id : str ) -> Container : ...
73
75
def list (
74
76
self ,
75
77
all : bool = False ,
76
- before : Incomplete | None = None ,
78
+ before : str | None = None ,
77
79
filters : Incomplete | None = None ,
78
80
limit : int = - 1 ,
79
- since : Incomplete | None = None ,
81
+ since : str | None = None ,
80
82
sparse : bool = False ,
81
83
ignore_removed : bool = False ,
82
84
): ...
83
85
def prune (self , filters : Incomplete | None = None ): ...
84
86
85
- RUN_CREATE_KWARGS : Incomplete
86
- RUN_HOST_CONFIG_KWARGS : Incomplete
87
+ RUN_CREATE_KWARGS : list [ str ]
88
+ RUN_HOST_CONFIG_KWARGS : list [ str ]
87
89
88
90
class ExecResult (NamedTuple ):
89
91
exit_code : Incomplete
0 commit comments