1- from _typeshed import BytesPath , StrOrBytesPath , StrPath , Unused
21from abc import abstractmethod
32from collections .abc import Callable , Iterable
43from typing import Any , ClassVar , Literal , TypeVar , overload
4+
5+ from _typeshed import BytesPath , StrOrBytesPath , StrPath , Unused
56from typing_extensions import TypeVarTuple , Unpack
67
78from .command .bdist import bdist
@@ -51,82 +52,140 @@ class Command:
5152 def ensure_filename (self , option : str ) -> None : ...
5253 def ensure_dirname (self , option : str ) -> None : ...
5354 def get_command_name (self ) -> str : ...
54- def set_undefined_options (self , src_cmd : str , * option_pairs : tuple [str , str ]) -> None : ...
55+ def set_undefined_options (
56+ self , src_cmd : str , * option_pairs : tuple [str , str ]
57+ ) -> None : ...
5558 # NOTE: This list comes directly from the distutils/command folder. Minus bdist_msi and bdist_wininst.
5659 @overload
57- def get_finalized_command (self , command : Literal ["bdist" ], create : bool = True ) -> bdist : ...
60+ def get_finalized_command (
61+ self , command : Literal ["bdist" ], create : bool = True
62+ ) -> bdist : ...
5863 @overload
59- def get_finalized_command (self , command : Literal ["bdist_dumb" ], create : bool = True ) -> bdist_dumb : ...
64+ def get_finalized_command (
65+ self , command : Literal ["bdist_dumb" ], create : bool = True
66+ ) -> bdist_dumb : ...
6067 @overload
61- def get_finalized_command (self , command : Literal ["bdist_rpm" ], create : bool = True ) -> bdist_rpm : ...
68+ def get_finalized_command (
69+ self , command : Literal ["bdist_rpm" ], create : bool = True
70+ ) -> bdist_rpm : ...
6271 @overload
63- def get_finalized_command (self , command : Literal ["build" ], create : bool = True ) -> build : ...
72+ def get_finalized_command (
73+ self , command : Literal ["build" ], create : bool = True
74+ ) -> build : ...
6475 @overload
65- def get_finalized_command (self , command : Literal ["build_clib" ], create : bool = True ) -> build_clib : ...
76+ def get_finalized_command (
77+ self , command : Literal ["build_clib" ], create : bool = True
78+ ) -> build_clib : ...
6679 @overload
67- def get_finalized_command (self , command : Literal ["build_ext" ], create : bool = True ) -> build_ext : ...
80+ def get_finalized_command (
81+ self , command : Literal ["build_ext" ], create : bool = True
82+ ) -> build_ext : ...
6883 @overload
69- def get_finalized_command (self , command : Literal ["build_py" ], create : bool = True ) -> build_py : ...
84+ def get_finalized_command (
85+ self , command : Literal ["build_py" ], create : bool = True
86+ ) -> build_py : ...
7087 @overload
71- def get_finalized_command (self , command : Literal ["build_scripts" ], create : bool = True ) -> build_scripts : ...
88+ def get_finalized_command (
89+ self , command : Literal ["build_scripts" ], create : bool = True
90+ ) -> build_scripts : ...
7291 @overload
73- def get_finalized_command (self , command : Literal ["check" ], create : bool = True ) -> check : ...
92+ def get_finalized_command (
93+ self , command : Literal ["check" ], create : bool = True
94+ ) -> check : ...
7495 @overload
75- def get_finalized_command (self , command : Literal ["clean" ], create : bool = True ) -> clean : ...
96+ def get_finalized_command (
97+ self , command : Literal ["clean" ], create : bool = True
98+ ) -> clean : ...
7699 @overload
77- def get_finalized_command (self , command : Literal ["config" ], create : bool = True ) -> config : ...
100+ def get_finalized_command (
101+ self , command : Literal ["config" ], create : bool = True
102+ ) -> config : ...
78103 @overload
79- def get_finalized_command (self , command : Literal ["install" ], create : bool = True ) -> install : ...
104+ def get_finalized_command (
105+ self , command : Literal ["install" ], create : bool = True
106+ ) -> install : ...
80107 @overload
81- def get_finalized_command (self , command : Literal ["install_data" ], create : bool = True ) -> install_data : ...
108+ def get_finalized_command (
109+ self , command : Literal ["install_data" ], create : bool = True
110+ ) -> install_data : ...
82111 @overload
83112 def get_finalized_command (
84113 self , command : Literal ["install_egg_info" ], create : bool = True
85114 ) -> install_egg_info : ...
86115 @overload
87- def get_finalized_command (self , command : Literal ["install_headers" ], create : bool = True ) -> install_headers : ...
116+ def get_finalized_command (
117+ self , command : Literal ["install_headers" ], create : bool = True
118+ ) -> install_headers : ...
88119 @overload
89- def get_finalized_command (self , command : Literal ["install_lib" ], create : bool = True ) -> install_lib : ...
120+ def get_finalized_command (
121+ self , command : Literal ["install_lib" ], create : bool = True
122+ ) -> install_lib : ...
90123 @overload
91- def get_finalized_command (self , command : Literal ["install_scripts" ], create : bool = True ) -> install_scripts : ...
124+ def get_finalized_command (
125+ self , command : Literal ["install_scripts" ], create : bool = True
126+ ) -> install_scripts : ...
92127 @overload
93- def get_finalized_command (self , command : Literal ["register" ], create : bool = True ) -> register : ...
128+ def get_finalized_command (
129+ self , command : Literal ["register" ], create : bool = True
130+ ) -> register : ...
94131 @overload
95- def get_finalized_command (self , command : Literal ["sdist" ], create : bool = True ) -> sdist : ...
132+ def get_finalized_command (
133+ self , command : Literal ["sdist" ], create : bool = True
134+ ) -> sdist : ...
96135 @overload
97- def get_finalized_command (self , command : Literal ["upload" ], create : bool = True ) -> upload : ...
136+ def get_finalized_command (
137+ self , command : Literal ["upload" ], create : bool = True
138+ ) -> upload : ...
98139 @overload
99140 def get_finalized_command (self , command : str , create : bool = True ) -> Command : ...
100141 @overload
101- def reinitialize_command (self , command : Literal ["bdist" ], reinit_subcommands : bool = False ) -> bdist : ...
142+ def reinitialize_command (
143+ self , command : Literal ["bdist" ], reinit_subcommands : bool = False
144+ ) -> bdist : ...
102145 @overload
103146 def reinitialize_command (
104147 self , command : Literal ["bdist_dumb" ], reinit_subcommands : bool = False
105148 ) -> bdist_dumb : ...
106149 @overload
107- def reinitialize_command (self , command : Literal ["bdist_rpm" ], reinit_subcommands : bool = False ) -> bdist_rpm : ...
150+ def reinitialize_command (
151+ self , command : Literal ["bdist_rpm" ], reinit_subcommands : bool = False
152+ ) -> bdist_rpm : ...
108153 @overload
109- def reinitialize_command (self , command : Literal ["build" ], reinit_subcommands : bool = False ) -> build : ...
154+ def reinitialize_command (
155+ self , command : Literal ["build" ], reinit_subcommands : bool = False
156+ ) -> build : ...
110157 @overload
111158 def reinitialize_command (
112159 self , command : Literal ["build_clib" ], reinit_subcommands : bool = False
113160 ) -> build_clib : ...
114161 @overload
115- def reinitialize_command (self , command : Literal ["build_ext" ], reinit_subcommands : bool = False ) -> build_ext : ...
162+ def reinitialize_command (
163+ self , command : Literal ["build_ext" ], reinit_subcommands : bool = False
164+ ) -> build_ext : ...
116165 @overload
117- def reinitialize_command (self , command : Literal ["build_py" ], reinit_subcommands : bool = False ) -> build_py : ...
166+ def reinitialize_command (
167+ self , command : Literal ["build_py" ], reinit_subcommands : bool = False
168+ ) -> build_py : ...
118169 @overload
119170 def reinitialize_command (
120171 self , command : Literal ["build_scripts" ], reinit_subcommands : bool = False
121172 ) -> build_scripts : ...
122173 @overload
123- def reinitialize_command (self , command : Literal ["check" ], reinit_subcommands : bool = False ) -> check : ...
174+ def reinitialize_command (
175+ self , command : Literal ["check" ], reinit_subcommands : bool = False
176+ ) -> check : ...
124177 @overload
125- def reinitialize_command (self , command : Literal ["clean" ], reinit_subcommands : bool = False ) -> clean : ...
178+ def reinitialize_command (
179+ self , command : Literal ["clean" ], reinit_subcommands : bool = False
180+ ) -> clean : ...
126181 @overload
127- def reinitialize_command (self , command : Literal ["config" ], reinit_subcommands : bool = False ) -> config : ...
182+ def reinitialize_command (
183+ self , command : Literal ["config" ], reinit_subcommands : bool = False
184+ ) -> config : ...
128185 @overload
129- def reinitialize_command (self , command : Literal ["install" ], reinit_subcommands : bool = False ) -> install : ...
186+ def reinitialize_command (
187+ self , command : Literal ["install" ], reinit_subcommands : bool = False
188+ ) -> install : ...
130189 @overload
131190 def reinitialize_command (
132191 self , command : Literal ["install_data" ], reinit_subcommands : bool = False
@@ -148,20 +207,34 @@ class Command:
148207 self , command : Literal ["install_scripts" ], reinit_subcommands : bool = False
149208 ) -> install_scripts : ...
150209 @overload
151- def reinitialize_command (self , command : Literal ["register" ], reinit_subcommands : bool = False ) -> register : ...
210+ def reinitialize_command (
211+ self , command : Literal ["register" ], reinit_subcommands : bool = False
212+ ) -> register : ...
152213 @overload
153- def reinitialize_command (self , command : Literal ["sdist" ], reinit_subcommands : bool = False ) -> sdist : ...
214+ def reinitialize_command (
215+ self , command : Literal ["sdist" ], reinit_subcommands : bool = False
216+ ) -> sdist : ...
154217 @overload
155- def reinitialize_command (self , command : Literal ["upload" ], reinit_subcommands : bool = False ) -> upload : ...
218+ def reinitialize_command (
219+ self , command : Literal ["upload" ], reinit_subcommands : bool = False
220+ ) -> upload : ...
156221 @overload
157- def reinitialize_command (self , command : str , reinit_subcommands : bool = False ) -> Command : ...
222+ def reinitialize_command (
223+ self , command : str , reinit_subcommands : bool = False
224+ ) -> Command : ...
158225 @overload
159- def reinitialize_command (self , command : _CommandT , reinit_subcommands : bool = False ) -> _CommandT : ...
226+ def reinitialize_command (
227+ self , command : _CommandT , reinit_subcommands : bool = False
228+ ) -> _CommandT : ...
160229 def run_command (self , command : str ) -> None : ...
161230 def get_sub_commands (self ) -> list [str ]: ...
162231 def warn (self , msg : str ) -> None : ...
163232 def execute (
164- self , func : Callable [[Unpack [_Ts ]], Unused ], args : tuple [Unpack [_Ts ]], msg : str | None = None , level : int = 1
233+ self ,
234+ func : Callable [[Unpack [_Ts ]], Unused ],
235+ args : tuple [Unpack [_Ts ]],
236+ msg : str | None = None ,
237+ level : int = 1 ,
165238 ) -> None : ...
166239 def mkpath (self , name : str , mode : int = 0o777 ) -> None : ...
167240 @overload
@@ -194,10 +267,16 @@ class Command:
194267 level : Unused = 1 ,
195268 ) -> list [str ]: ...
196269 @overload
197- def move_file (self , src : StrPath , dst : _StrPathT , level : Unused = 1 ) -> _StrPathT | str : ...
270+ def move_file (
271+ self , src : StrPath , dst : _StrPathT , level : Unused = 1
272+ ) -> _StrPathT | str : ...
198273 @overload
199- def move_file (self , src : BytesPath , dst : _BytesPathT , level : Unused = 1 ) -> _BytesPathT | bytes : ...
200- def spawn (self , cmd : Iterable [str ], search_path : bool = True , level : Unused = 1 ) -> None : ...
274+ def move_file (
275+ self , src : BytesPath , dst : _BytesPathT , level : Unused = 1
276+ ) -> _BytesPathT | bytes : ...
277+ def spawn (
278+ self , cmd : Iterable [str ], search_path : bool = True , level : Unused = 1
279+ ) -> None : ...
201280 @overload
202281 def make_archive (
203282 self ,
0 commit comments