Skip to content

Commit 20bda1b

Browse files
committed
Reformatted distutils-stubs
1 parent b5f8ed4 commit 20bda1b

25 files changed

+337
-119
lines changed

_distutils_hack/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
import sys
44

55
report_url = (
6-
"https://github.com/pypa/setuptools/issues/new?"
7-
"template=distutils-deprecation.yml"
6+
"https://github.com/pypa/setuptools/issues/new?template=distutils-deprecation.yml"
87
)
98

109

typings/distutils-stubs/_modified.pyi

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
from _typeshed import StrOrBytesPath
21
from collections.abc import Callable, Iterable
32
from typing import Literal, TypeVar
43

4+
from _typeshed import StrOrBytesPath
5+
56
_SourcesT = TypeVar("_SourcesT", bound=StrOrBytesPath)
67
_TargetsT = TypeVar("_TargetsT", bound=StrOrBytesPath)
78

89
def newer(source: StrOrBytesPath, target: StrOrBytesPath) -> bool: ...
910
def newer_pairwise(
10-
sources: Iterable[_SourcesT], targets: Iterable[_TargetsT], newer: Callable[[_SourcesT, _TargetsT], bool] = newer
11+
sources: Iterable[_SourcesT],
12+
targets: Iterable[_TargetsT],
13+
newer: Callable[[_SourcesT, _TargetsT], bool] = newer,
1114
) -> tuple[list[_SourcesT], list[_TargetsT]]: ...
1215
def newer_group(
13-
sources: Iterable[StrOrBytesPath], target: StrOrBytesPath, missing: Literal["error", "ignore", "newer"] = "error"
16+
sources: Iterable[StrOrBytesPath],
17+
target: StrOrBytesPath,
18+
missing: Literal["error", "ignore", "newer"] = "error",
1419
) -> bool: ...
1520
def newer_pairwise_group(
16-
sources: Iterable[_SourcesT], targets: Iterable[_TargetsT], *, newer: Callable[[_SourcesT, _TargetsT], bool] = newer
21+
sources: Iterable[_SourcesT],
22+
targets: Iterable[_TargetsT],
23+
*,
24+
newer: Callable[[_SourcesT, _TargetsT], bool] = newer,
1725
) -> tuple[list[_SourcesT], list[_TargetsT]]: ...

typings/distutils-stubs/archive_util.pyi

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from _typeshed import StrOrBytesPath, StrPath
21
from typing import Literal, overload
32

3+
from _typeshed import StrOrBytesPath, StrPath
4+
45
@overload
56
def make_archive(
67
base_name: str,
@@ -32,4 +33,6 @@ def make_tarball(
3233
owner: str | None = None,
3334
group: str | None = None,
3435
) -> str: ...
35-
def make_zipfile(base_name: str, base_dir: str, verbose: bool = False, dry_run: bool = False) -> str: ...
36+
def make_zipfile(
37+
base_name: str, base_dir: str, verbose: bool = False, dry_run: bool = False
38+
) -> str: ...

typings/distutils-stubs/cmd.pyi

+118-39
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
from _typeshed import BytesPath, StrOrBytesPath, StrPath, Unused
21
from abc import abstractmethod
32
from collections.abc import Callable, Iterable
43
from typing import Any, ClassVar, Literal, TypeVar, overload
4+
5+
from _typeshed import BytesPath, StrOrBytesPath, StrPath, Unused
56
from typing_extensions import TypeVarTuple, Unpack
67

78
from .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,

typings/distutils-stubs/command/bdist.pyi

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from _typeshed import Unused
21
from collections.abc import Callable
32
from typing import ClassVar
3+
4+
from _typeshed import Unused
45
from typing_extensions import deprecated
56

67
from ..cmd import Command

typings/distutils-stubs/command/bdist_dumb.pyi

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from _typeshed import Incomplete
21
from typing import ClassVar
32

3+
from _typeshed import Incomplete
4+
45
from ..cmd import Command
56

67
class bdist_dumb(Command):

typings/distutils-stubs/command/bdist_rpm.pyi

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from _typeshed import Incomplete
21
from typing import ClassVar
32

3+
from _typeshed import Incomplete
4+
45
from ..cmd import Command
56

67
class bdist_rpm(Command):

typings/distutils-stubs/command/build.pyi

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
from _typeshed import Incomplete, Unused
21
from collections.abc import Callable
32
from typing import ClassVar
43

4+
from _typeshed import Incomplete, Unused
5+
56
from ..cmd import Command
67

78
def show_compilers() -> None: ...

typings/distutils-stubs/command/build_clib.pyi

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
from _typeshed import Incomplete, Unused
21
from collections.abc import Callable
32
from typing import ClassVar
43

4+
from _typeshed import Incomplete, Unused
5+
56
from ..cmd import Command
67

78
class build_clib(Command):

typings/distutils-stubs/command/build_ext.pyi

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
from _typeshed import Incomplete, Unused
21
from collections.abc import Callable
32
from typing import ClassVar
43

4+
from _typeshed import Incomplete, Unused
5+
56
from ..cmd import Command
67
from ..extension import Extension
78

typings/distutils-stubs/command/build_py.pyi

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from _typeshed import Incomplete
21
from typing import ClassVar
32

3+
from _typeshed import Incomplete
4+
45
from ..cmd import Command
56

67
class build_py(Command):

typings/distutils-stubs/command/build_scripts.pyi

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from _typeshed import Incomplete
21
from typing import ClassVar
32

3+
from _typeshed import Incomplete
4+
45
from ..cmd import Command
56

67
first_line_re: Incomplete

typings/distutils-stubs/command/clean.pyi

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from _typeshed import Incomplete
21
from typing import ClassVar
32

3+
from _typeshed import Incomplete
4+
45
from ..cmd import Command
56

67
class clean(Command):

typings/distutils-stubs/command/install.pyi

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from _typeshed import Incomplete
21
from typing import ClassVar
32

3+
from _typeshed import Incomplete
4+
45
from ..cmd import Command
56

67
class install(Command):

typings/distutils-stubs/command/install_data.pyi

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from _typeshed import Incomplete
21
from typing import ClassVar
32

3+
from _typeshed import Incomplete
4+
45
from ..cmd import Command
56

67
class install_data(Command):

0 commit comments

Comments
 (0)