|
1 | 1 | from _typeshed import BytesPath, Incomplete, StrOrBytesPath, StrPath, Unused
|
2 | 2 | from abc import abstractmethod
|
3 | 3 | from collections.abc import Callable, Iterable
|
| 4 | +from distutils.command.bdist import bdist |
| 5 | +from distutils.command.bdist_dumb import bdist_dumb |
| 6 | +from distutils.command.bdist_rpm import bdist_rpm |
| 7 | +from distutils.command.build import build |
| 8 | +from distutils.command.build_clib import build_clib |
| 9 | +from distutils.command.build_ext import build_ext |
| 10 | +from distutils.command.build_py import build_py |
| 11 | +from distutils.command.build_scripts import build_scripts |
| 12 | +from distutils.command.check import check |
| 13 | +from distutils.command.clean import clean |
| 14 | +from distutils.command.config import config |
| 15 | +from distutils.command.install import install |
| 16 | +from distutils.command.install_data import install_data |
| 17 | +from distutils.command.install_egg_info import install_egg_info |
| 18 | +from distutils.command.install_headers import install_headers |
| 19 | +from distutils.command.install_lib import install_lib |
| 20 | +from distutils.command.install_scripts import install_scripts |
| 21 | +from distutils.command.register import register |
| 22 | +from distutils.command.sdist import sdist |
| 23 | +from distutils.command.upload import upload |
4 | 24 | from distutils.dist import Distribution
|
5 | 25 | from distutils.file_util import _BytesPathT, _StrPathT
|
6 | 26 | from typing import Any, ClassVar, Literal, TypeVar, overload
|
@@ -28,8 +48,108 @@ class Command:
|
28 | 48 | def ensure_dirname(self, option: str) -> None: ...
|
29 | 49 | def get_command_name(self) -> str: ...
|
30 | 50 | def set_undefined_options(self, src_cmd: str, *option_pairs: tuple[str, str]) -> None: ...
|
| 51 | + # NOTE: This list comes directly from the distutils/command folder. Minus bdist_msi and bdist_wininst. |
| 52 | + @overload |
| 53 | + def get_finalized_command(self, command: Literal["bdist"], create: bool | Literal[0, 1] = 1) -> bdist: ... |
| 54 | + @overload |
| 55 | + def get_finalized_command(self, command: Literal["bdist_dumb"], create: bool | Literal[0, 1] = 1) -> bdist_dumb: ... |
| 56 | + @overload |
| 57 | + def get_finalized_command(self, command: Literal["bdist_rpm"], create: bool | Literal[0, 1] = 1) -> bdist_rpm: ... |
| 58 | + @overload |
| 59 | + def get_finalized_command(self, command: Literal["build"], create: bool | Literal[0, 1] = 1) -> build: ... |
| 60 | + @overload |
| 61 | + def get_finalized_command(self, command: Literal["build_clib"], create: bool | Literal[0, 1] = 1) -> build_clib: ... |
| 62 | + @overload |
| 63 | + def get_finalized_command(self, command: Literal["build_ext"], create: bool | Literal[0, 1] = 1) -> build_ext: ... |
| 64 | + @overload |
| 65 | + def get_finalized_command(self, command: Literal["build_py"], create: bool | Literal[0, 1] = 1) -> build_py: ... |
| 66 | + @overload |
| 67 | + def get_finalized_command(self, command: Literal["build_scripts"], create: bool | Literal[0, 1] = 1) -> build_scripts: ... |
| 68 | + @overload |
| 69 | + def get_finalized_command(self, command: Literal["check"], create: bool | Literal[0, 1] = 1) -> check: ... |
| 70 | + @overload |
| 71 | + def get_finalized_command(self, command: Literal["clean"], create: bool | Literal[0, 1] = 1) -> clean: ... |
| 72 | + @overload |
| 73 | + def get_finalized_command(self, command: Literal["config"], create: bool | Literal[0, 1] = 1) -> config: ... |
| 74 | + @overload |
| 75 | + def get_finalized_command(self, command: Literal["install"], create: bool | Literal[0, 1] = 1) -> install: ... |
| 76 | + @overload |
| 77 | + def get_finalized_command(self, command: Literal["install_data"], create: bool | Literal[0, 1] = 1) -> install_data: ... |
| 78 | + @overload |
| 79 | + def get_finalized_command( |
| 80 | + self, command: Literal["install_egg_info"], create: bool | Literal[0, 1] = 1 |
| 81 | + ) -> install_egg_info: ... |
| 82 | + @overload |
| 83 | + def get_finalized_command(self, command: Literal["install_headers"], create: bool | Literal[0, 1] = 1) -> install_headers: ... |
| 84 | + @overload |
| 85 | + def get_finalized_command(self, command: Literal["install_lib"], create: bool | Literal[0, 1] = 1) -> install_lib: ... |
| 86 | + @overload |
| 87 | + def get_finalized_command(self, command: Literal["install_scripts"], create: bool | Literal[0, 1] = 1) -> install_scripts: ... |
| 88 | + @overload |
| 89 | + def get_finalized_command(self, command: Literal["register"], create: bool | Literal[0, 1] = 1) -> register: ... |
| 90 | + @overload |
| 91 | + def get_finalized_command(self, command: Literal["sdist"], create: bool | Literal[0, 1] = 1) -> sdist: ... |
| 92 | + @overload |
| 93 | + def get_finalized_command(self, command: Literal["upload"], create: bool | Literal[0, 1] = 1) -> upload: ... |
| 94 | + @overload |
31 | 95 | def get_finalized_command(self, command: str, create: bool | Literal[0, 1] = 1) -> Command: ...
|
32 | 96 | @overload
|
| 97 | + def reinitialize_command(self, command: Literal["bdist"], reinit_subcommands: bool | Literal[0, 1] = 0) -> bdist: ... |
| 98 | + @overload |
| 99 | + def reinitialize_command( |
| 100 | + self, command: Literal["bdist_dumb"], reinit_subcommands: bool | Literal[0, 1] = 0 |
| 101 | + ) -> bdist_dumb: ... |
| 102 | + @overload |
| 103 | + def reinitialize_command(self, command: Literal["bdist_rpm"], reinit_subcommands: bool | Literal[0, 1] = 0) -> bdist_rpm: ... |
| 104 | + @overload |
| 105 | + def reinitialize_command(self, command: Literal["build"], reinit_subcommands: bool | Literal[0, 1] = 0) -> build: ... |
| 106 | + @overload |
| 107 | + def reinitialize_command( |
| 108 | + self, command: Literal["build_clib"], reinit_subcommands: bool | Literal[0, 1] = 0 |
| 109 | + ) -> build_clib: ... |
| 110 | + @overload |
| 111 | + def reinitialize_command(self, command: Literal["build_ext"], reinit_subcommands: bool | Literal[0, 1] = 0) -> build_ext: ... |
| 112 | + @overload |
| 113 | + def reinitialize_command(self, command: Literal["build_py"], reinit_subcommands: bool | Literal[0, 1] = 0) -> build_py: ... |
| 114 | + @overload |
| 115 | + def reinitialize_command( |
| 116 | + self, command: Literal["build_scripts"], reinit_subcommands: bool | Literal[0, 1] = 0 |
| 117 | + ) -> build_scripts: ... |
| 118 | + @overload |
| 119 | + def reinitialize_command(self, command: Literal["check"], reinit_subcommands: bool | Literal[0, 1] = 0) -> check: ... |
| 120 | + @overload |
| 121 | + def reinitialize_command(self, command: Literal["clean"], reinit_subcommands: bool | Literal[0, 1] = 0) -> clean: ... |
| 122 | + @overload |
| 123 | + def reinitialize_command(self, command: Literal["config"], reinit_subcommands: bool | Literal[0, 1] = 0) -> config: ... |
| 124 | + @overload |
| 125 | + def reinitialize_command(self, command: Literal["install"], reinit_subcommands: bool | Literal[0, 1] = 0) -> install: ... |
| 126 | + @overload |
| 127 | + def reinitialize_command( |
| 128 | + self, command: Literal["install_data"], reinit_subcommands: bool | Literal[0, 1] = 0 |
| 129 | + ) -> install_data: ... |
| 130 | + @overload |
| 131 | + def reinitialize_command( |
| 132 | + self, command: Literal["install_egg_info"], reinit_subcommands: bool | Literal[0, 1] = 0 |
| 133 | + ) -> install_egg_info: ... |
| 134 | + @overload |
| 135 | + def reinitialize_command( |
| 136 | + self, command: Literal["install_headers"], reinit_subcommands: bool | Literal[0, 1] = 0 |
| 137 | + ) -> install_headers: ... |
| 138 | + @overload |
| 139 | + def reinitialize_command( |
| 140 | + self, command: Literal["install_lib"], reinit_subcommands: bool | Literal[0, 1] = 0 |
| 141 | + ) -> install_lib: ... |
| 142 | + @overload |
| 143 | + def reinitialize_command( |
| 144 | + self, command: Literal["install_scripts"], reinit_subcommands: bool | Literal[0, 1] = 0 |
| 145 | + ) -> install_scripts: ... |
| 146 | + @overload |
| 147 | + def reinitialize_command(self, command: Literal["register"], reinit_subcommands: bool | Literal[0, 1] = 0) -> register: ... |
| 148 | + @overload |
| 149 | + def reinitialize_command(self, command: Literal["sdist"], reinit_subcommands: bool | Literal[0, 1] = 0) -> sdist: ... |
| 150 | + @overload |
| 151 | + def reinitialize_command(self, command: Literal["upload"], reinit_subcommands: bool | Literal[0, 1] = 0) -> upload: ... |
| 152 | + @overload |
33 | 153 | def reinitialize_command(self, command: str, reinit_subcommands: bool | Literal[0, 1] = 0) -> Command: ...
|
34 | 154 | @overload
|
35 | 155 | def reinitialize_command(self, command: _CommandT, reinit_subcommands: bool | Literal[0, 1] = 0) -> _CommandT: ...
|
|
0 commit comments