1+ from _typeshed import Incomplete
12from abc import abstractmethod
23from collections .abc import Callable , Iterable
3- from distutils .dist import Distribution
4- from typing import Any
4+ from typing import ClassVar
5+ from typing_extensions import Self
6+
7+ from .dist import Distribution
58
69class Command :
7- sub_commands : list [tuple [str , Callable [[Command ], bool ] | None ]]
10+ sub_commands : ClassVar [ list [tuple [str , Callable [[Self ], bool ] | None ] ]]
811 def __init__ (self , dist : Distribution ) -> None : ...
912 @abstractmethod
1013 def initialize_options (self ) -> None : ...
@@ -25,7 +28,9 @@ class Command:
2528 def run_command (self , command : str ) -> None : ...
2629 def get_sub_commands (self ) -> list [str ]: ...
2730 def warn (self , msg : str ) -> None : ...
28- def execute (self , func : Callable [..., object ], args : Iterable [Any ], msg : str | None = ..., level : int = ...) -> None : ...
31+ def execute (
32+ self , func : Callable [..., object ], args : Iterable [Incomplete ], msg : str | None = ..., level : int = ...
33+ ) -> None : ...
2934 def mkpath (self , name : str , mode : int = ...) -> None : ...
3035 def copy_file (
3136 self ,
@@ -34,7 +39,7 @@ class Command:
3439 preserve_mode : int = ...,
3540 preserve_times : int = ...,
3641 link : str | None = ...,
37- level : Any = ...,
42+ level : int = ...,
3843 ) -> tuple [str , bool ]: ... # level is not used
3944 def copy_tree (
4045 self ,
@@ -43,10 +48,10 @@ class Command:
4348 preserve_mode : int = ...,
4449 preserve_times : int = ...,
4550 preserve_symlinks : int = ...,
46- level : Any = ...,
51+ level : int = ...,
4752 ) -> list [str ]: ... # level is not used
48- def move_file (self , src : str , dst : str , level : Any = ...) -> str : ... # level is not used
49- def spawn (self , cmd : Iterable [str ], search_path : int = ..., level : Any = ...) -> None : ... # level is not used
53+ def move_file (self , src : str , dst : str , level : int = ...) -> str : ... # level is not used
54+ def spawn (self , cmd : Iterable [str ], search_path : int = ..., level : int = ...) -> None : ... # level is not used
5055 def make_archive (
5156 self ,
5257 base_name : str ,
@@ -61,8 +66,8 @@ class Command:
6166 infiles : str | list [str ] | tuple [str , ...],
6267 outfile : str ,
6368 func : Callable [..., object ],
64- args : list [Any ],
69+ args : list [Incomplete ],
6570 exec_msg : str | None = ...,
6671 skip_msg : str | None = ...,
67- level : Any = ...,
72+ level : int = ...,
6873 ) -> None : ... # level is not used
0 commit comments