Skip to content

Commit b16c192

Browse files
Sync typeshed (#17994)
Source commit: python/typeshed@7fb8466
1 parent e3dbce4 commit b16c192

24 files changed

+239
-222
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from _typeshed import Unused
1+
from _typeshed import Incomplete, Unused
22
from collections.abc import Callable
3-
from typing import Any, ClassVar
3+
from typing import ClassVar
44

55
from ..cmd import Command
66

@@ -15,13 +15,13 @@ class bdist(Command):
1515
default_format: ClassVar[dict[str, str]]
1616
format_commands: ClassVar[list[str]]
1717
format_command: ClassVar[dict[str, tuple[str, str]]]
18-
bdist_base: Any
19-
plat_name: Any
20-
formats: Any
21-
dist_dir: Any
18+
bdist_base: Incomplete
19+
plat_name: Incomplete
20+
formats: Incomplete
21+
dist_dir: Incomplete
2222
skip_build: int
23-
group: Any
24-
owner: Any
23+
group: Incomplete
24+
owner: Incomplete
2525
def initialize_options(self) -> None: ...
2626
def finalize_options(self) -> None: ...
2727
def run(self) -> None: ...
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Any, ClassVar
1+
from _typeshed import Incomplete
2+
from typing import ClassVar
23

34
from ..cmd import Command
45

@@ -7,15 +8,15 @@ class bdist_dumb(Command):
78
user_options: ClassVar[list[tuple[str, str | None, str]]]
89
boolean_options: ClassVar[list[str]]
910
default_format: ClassVar[dict[str, str]]
10-
bdist_dir: Any
11-
plat_name: Any
12-
format: Any
11+
bdist_dir: Incomplete
12+
plat_name: Incomplete
13+
format: Incomplete
1314
keep_temp: int
14-
dist_dir: Any
15-
skip_build: Any
15+
dist_dir: Incomplete
16+
skip_build: Incomplete
1617
relative: int
17-
owner: Any
18-
group: Any
18+
owner: Incomplete
19+
group: Incomplete
1920
def initialize_options(self) -> None: ...
2021
def finalize_options(self) -> None: ...
2122
def run(self) -> None: ...

mypy/typeshed/stdlib/distutils/command/bdist_msi.pyi

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,43 @@
11
import sys
2-
from typing import Any, ClassVar, Literal
2+
from _typeshed import Incomplete
3+
from typing import ClassVar, Literal
34

45
from ..cmd import Command
56

67
if sys.platform == "win32":
7-
from msilib import Dialog
8+
from msilib import Control, Dialog
89

910
class PyDialog(Dialog):
1011
def __init__(self, *args, **kw) -> None: ...
1112
def title(self, title) -> None: ...
12-
def back(self, title, next, name: str = "Back", active: bool | Literal[0, 1] = 1): ...
13-
def cancel(self, title, next, name: str = "Cancel", active: bool | Literal[0, 1] = 1): ...
14-
def next(self, title, next, name: str = "Next", active: bool | Literal[0, 1] = 1): ...
15-
def xbutton(self, name, title, next, xpos): ...
13+
def back(self, title, next, name: str = "Back", active: bool | Literal[0, 1] = 1) -> Control: ...
14+
def cancel(self, title, next, name: str = "Cancel", active: bool | Literal[0, 1] = 1) -> Control: ...
15+
def next(self, title, next, name: str = "Next", active: bool | Literal[0, 1] = 1) -> Control: ...
16+
def xbutton(self, name, title, next, xpos) -> Control: ...
1617

1718
class bdist_msi(Command):
1819
description: str
1920
user_options: ClassVar[list[tuple[str, str | None, str]]]
2021
boolean_options: ClassVar[list[str]]
21-
all_versions: Any
22+
all_versions: Incomplete
2223
other_version: str
2324
if sys.version_info >= (3, 9):
2425
def __init__(self, *args, **kw) -> None: ...
25-
bdist_dir: Any
26-
plat_name: Any
26+
bdist_dir: Incomplete
27+
plat_name: Incomplete
2728
keep_temp: int
2829
no_target_compile: int
2930
no_target_optimize: int
30-
target_version: Any
31-
dist_dir: Any
32-
skip_build: Any
33-
install_script: Any
34-
pre_install_script: Any
35-
versions: Any
31+
target_version: Incomplete
32+
dist_dir: Incomplete
33+
skip_build: Incomplete
34+
install_script: Incomplete
35+
pre_install_script: Incomplete
36+
versions: Incomplete
3637
def initialize_options(self) -> None: ...
37-
install_script_key: Any
38+
install_script_key: Incomplete
3839
def finalize_options(self) -> None: ...
39-
db: Any
40+
db: Incomplete
4041
def run(self) -> None: ...
4142
def add_files(self) -> None: ...
4243
def add_find_python(self) -> None: ...

mypy/typeshed/stdlib/distutils/command/bdist_rpm.pyi

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Any, ClassVar
1+
from _typeshed import Incomplete
2+
from typing import ClassVar
23

34
from ..cmd import Command
45

@@ -7,44 +8,44 @@ class bdist_rpm(Command):
78
user_options: ClassVar[list[tuple[str, str | None, str]]]
89
boolean_options: ClassVar[list[str]]
910
negative_opt: ClassVar[dict[str, str]]
10-
bdist_base: Any
11-
rpm_base: Any
12-
dist_dir: Any
13-
python: Any
14-
fix_python: Any
15-
spec_only: Any
16-
binary_only: Any
17-
source_only: Any
18-
use_bzip2: Any
19-
distribution_name: Any
20-
group: Any
21-
release: Any
22-
serial: Any
23-
vendor: Any
24-
packager: Any
25-
doc_files: Any
26-
changelog: Any
27-
icon: Any
28-
prep_script: Any
29-
build_script: Any
30-
install_script: Any
31-
clean_script: Any
32-
verify_script: Any
33-
pre_install: Any
34-
post_install: Any
35-
pre_uninstall: Any
36-
post_uninstall: Any
37-
prep: Any
38-
provides: Any
39-
requires: Any
40-
conflicts: Any
41-
build_requires: Any
42-
obsoletes: Any
11+
bdist_base: Incomplete
12+
rpm_base: Incomplete
13+
dist_dir: Incomplete
14+
python: Incomplete
15+
fix_python: Incomplete
16+
spec_only: Incomplete
17+
binary_only: Incomplete
18+
source_only: Incomplete
19+
use_bzip2: Incomplete
20+
distribution_name: Incomplete
21+
group: Incomplete
22+
release: Incomplete
23+
serial: Incomplete
24+
vendor: Incomplete
25+
packager: Incomplete
26+
doc_files: Incomplete
27+
changelog: Incomplete
28+
icon: Incomplete
29+
prep_script: Incomplete
30+
build_script: Incomplete
31+
install_script: Incomplete
32+
clean_script: Incomplete
33+
verify_script: Incomplete
34+
pre_install: Incomplete
35+
post_install: Incomplete
36+
pre_uninstall: Incomplete
37+
post_uninstall: Incomplete
38+
prep: Incomplete
39+
provides: Incomplete
40+
requires: Incomplete
41+
conflicts: Incomplete
42+
build_requires: Incomplete
43+
obsoletes: Incomplete
4344
keep_temp: int
4445
use_rpm_opt_flags: int
4546
rpm3_mode: int
4647
no_autoreq: int
47-
force_arch: Any
48+
force_arch: Incomplete
4849
quiet: int
4950
def initialize_options(self) -> None: ...
5051
def finalize_options(self) -> None: ...

mypy/typeshed/stdlib/distutils/command/build.pyi

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _typeshed import Unused
1+
from _typeshed import Incomplete, Unused
22
from collections.abc import Callable
33
from typing import Any, ClassVar
44

@@ -12,17 +12,17 @@ class build(Command):
1212
boolean_options: ClassVar[list[str]]
1313
help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]]
1414
build_base: str
15-
build_purelib: Any
16-
build_platlib: Any
17-
build_lib: Any
18-
build_temp: Any
19-
build_scripts: Any
20-
compiler: Any
21-
plat_name: Any
22-
debug: Any
15+
build_purelib: Incomplete
16+
build_platlib: Incomplete
17+
build_lib: Incomplete
18+
build_temp: Incomplete
19+
build_scripts: Incomplete
20+
compiler: Incomplete
21+
plat_name: Incomplete
22+
debug: Incomplete
2323
force: int
24-
executable: Any
25-
parallel: Any
24+
executable: Incomplete
25+
parallel: Incomplete
2626
def initialize_options(self) -> None: ...
2727
def finalize_options(self) -> None: ...
2828
def run(self) -> None: ...

mypy/typeshed/stdlib/distutils/command/build_clib.pyi

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from _typeshed import Unused
1+
from _typeshed import Incomplete, Unused
22
from collections.abc import Callable
3-
from typing import Any, ClassVar
3+
from typing import ClassVar
44

55
from ..cmd import Command
66

@@ -11,15 +11,15 @@ class build_clib(Command):
1111
user_options: ClassVar[list[tuple[str, str, str]]]
1212
boolean_options: ClassVar[list[str]]
1313
help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]]
14-
build_clib: Any
15-
build_temp: Any
16-
libraries: Any
17-
include_dirs: Any
18-
define: Any
19-
undef: Any
20-
debug: Any
14+
build_clib: Incomplete
15+
build_temp: Incomplete
16+
libraries: Incomplete
17+
include_dirs: Incomplete
18+
define: Incomplete
19+
undef: Incomplete
20+
debug: Incomplete
2121
force: int
22-
compiler: Any
22+
compiler: Incomplete
2323
def initialize_options(self) -> None: ...
2424
def finalize_options(self) -> None: ...
2525
def run(self) -> None: ...

mypy/typeshed/stdlib/distutils/command/build_ext.pyi

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
from _typeshed import Unused
1+
from _typeshed import Incomplete, Unused
22
from collections.abc import Callable
3-
from typing import Any, ClassVar
3+
from typing import ClassVar
44

55
from ..cmd import Command
66

7-
extension_name_re: Any
7+
extension_name_re: Incomplete
88

99
def show_compilers() -> None: ...
1010

1111
class build_ext(Command):
1212
description: str
13-
sep_by: Any
13+
sep_by: Incomplete
1414
user_options: ClassVar[list[tuple[str, str | None, str]]]
1515
boolean_options: ClassVar[list[str]]
1616
help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]]
17-
extensions: Any
18-
build_lib: Any
19-
plat_name: Any
20-
build_temp: Any
17+
extensions: Incomplete
18+
build_lib: Incomplete
19+
plat_name: Incomplete
20+
build_temp: Incomplete
2121
inplace: int
22-
package: Any
23-
include_dirs: Any
24-
define: Any
25-
undef: Any
26-
libraries: Any
27-
library_dirs: Any
28-
rpath: Any
29-
link_objects: Any
30-
debug: Any
31-
force: Any
32-
compiler: Any
33-
swig: Any
34-
swig_cpp: Any
35-
swig_opts: Any
36-
user: Any
37-
parallel: Any
22+
package: Incomplete
23+
include_dirs: Incomplete
24+
define: Incomplete
25+
undef: Incomplete
26+
libraries: Incomplete
27+
library_dirs: Incomplete
28+
rpath: Incomplete
29+
link_objects: Incomplete
30+
debug: Incomplete
31+
force: Incomplete
32+
compiler: Incomplete
33+
swig: Incomplete
34+
swig_cpp: Incomplete
35+
swig_opts: Incomplete
36+
user: Incomplete
37+
parallel: Incomplete
3838
def initialize_options(self) -> None: ...
3939
def finalize_options(self) -> None: ...
4040
def run(self) -> None: ...
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Any, ClassVar, Literal
1+
from _typeshed import Incomplete
2+
from typing import ClassVar, Literal
23

34
from ..cmd import Command
45
from ..util import Mixin2to3 as Mixin2to3
@@ -8,17 +9,17 @@ class build_py(Command):
89
user_options: ClassVar[list[tuple[str, str | None, str]]]
910
boolean_options: ClassVar[list[str]]
1011
negative_opt: ClassVar[dict[str, str]]
11-
build_lib: Any
12-
py_modules: Any
13-
package: Any
14-
package_data: Any
15-
package_dir: Any
12+
build_lib: Incomplete
13+
py_modules: Incomplete
14+
package: Incomplete
15+
package_data: Incomplete
16+
package_dir: Incomplete
1617
compile: int
1718
optimize: int
18-
force: Any
19+
force: Incomplete
1920
def initialize_options(self) -> None: ...
20-
packages: Any
21-
data_files: Any
21+
packages: Incomplete
22+
data_files: Incomplete
2223
def finalize_options(self) -> None: ...
2324
def run(self) -> None: ...
2425
def get_data_files(self): ...
@@ -32,13 +33,13 @@ class build_py(Command):
3233
def find_all_modules(self): ...
3334
def get_source_files(self): ...
3435
def get_module_outfile(self, build_dir, package, module): ...
35-
def get_outputs(self, include_bytecode: bool | Literal[0, 1] = 1): ...
36+
def get_outputs(self, include_bytecode: bool | Literal[0, 1] = 1) -> list[str]: ...
3637
def build_module(self, module, module_file, package): ...
3738
def build_modules(self) -> None: ...
3839
def build_packages(self) -> None: ...
3940
def byte_compile(self, files) -> None: ...
4041

4142
class build_py_2to3(build_py, Mixin2to3):
42-
updated_files: Any
43+
updated_files: Incomplete
4344
def run(self) -> None: ...
4445
def build_module(self, module, module_file, package): ...

0 commit comments

Comments
 (0)