1
1
# Stubs for distutils.cmd
2
2
3
- from typing import Callable , List , Tuple , Union
3
+ from typing import Callable , List , Tuple , Union , Optional , Iterable , Any , Text
4
4
from abc import abstractmethod
5
5
from distutils .dist import Distribution
6
6
@@ -13,3 +13,28 @@ class Command:
13
13
def finalize_options (self ) -> None : ...
14
14
@abstractmethod
15
15
def run (self ) -> None : ...
16
+
17
+ def announce (self , msg : Text , level : int = ...) -> None : ...
18
+ def debug_print (self , msg : Text ) -> None : ...
19
+
20
+ def ensure_string (self , option : str , default : Optional [str ] = ...) -> None : ...
21
+ def ensure_string_list (self , option : Union [str , List [str ]]) -> None : ...
22
+ def ensure_filename (self , option : str ) -> None : ...
23
+ def ensure_dirname (self , option : str ) -> None : ...
24
+
25
+ def get_command_name (self ) -> str : ...
26
+ def set_undefined_options (self , src_cmd : Text , * option_pairs : Tuple [str , str ]) -> None : ...
27
+ def get_finalized_command (self , command : Text , create : int = ...) -> Command : ...
28
+ def reinitialize_command (self , command : Union [Command , Text ], reinit_subcommands : int = ...) -> Command : ...
29
+ def run_command (self , command : Text ) -> None : ...
30
+ def get_sub_commands (self ) -> List [str ]: ...
31
+
32
+ def warn (self , msg : Text ) -> None : ...
33
+ def execute (self , func : Callable [..., Any ], args : Iterable [Any ], msg : Optional [Text ] = ..., level : int = ...) -> None : ...
34
+ def mkpath (self , name : str , mode : int = ...) -> None : ...
35
+ def copy_file (self , infile : str , outfile : str , preserve_mode : int = ..., preserve_times : int = ..., link : Optional [str ] = ..., level : Any = ...) -> Tuple [str , bool ]: ... # level is not used
36
+ def copy_tree (self , infile : str , outfile : str , preserve_mode : int = ..., preserve_times : int = ..., preserve_symlinks : int = ..., level : Any = ...) -> List [str ]: ... # level is not used
37
+ def move_file (self , src : str , dest : str , level : Any = ...) -> str : ... # level is not used
38
+ def spawn (self , cmd : Iterable [str ], search_path : int = ..., level : Any = ...) -> None : ... # level is not used
39
+ def make_archive (self , base_name : str , format : str , root_dir : Optional [str ] = ..., base_dir : Optional [str ] = ..., owner : Optional [str ] = ..., group : Optional [str ] = ...) -> str : ...
40
+ def make_file (self , infiles : Union [str , List [str ], Tuple [str ]], outfile : str , func : Callable [..., Any ], args : List [Any ], exec_msg : Optional [str ] = ..., skip_msg : Optional [str ] = ..., level : Any = ...) -> None : ... # level is not used
0 commit comments