Skip to content

Commit 0b1d358

Browse files
authored
setuptools & distutils: ClassVar mutables (and tuples) (#12403)
1 parent ef42f3b commit 0b1d358

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+190
-159
lines changed

stdlib/distutils/command/bdist.pyi

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
from typing import Any
1+
from _typeshed import Unused
2+
from collections.abc import Callable
3+
from typing import Any, ClassVar
24

35
from ..cmd import Command
46

57
def show_formats() -> None: ...
68

79
class bdist(Command):
810
description: str
9-
user_options: Any
10-
boolean_options: Any
11-
help_options: Any
12-
no_format_option: Any
13-
default_format: Any
14-
format_commands: Any
15-
format_command: Any
11+
user_options: ClassVar[list[tuple[str, str | None, str]]]
12+
boolean_options: ClassVar[list[str]]
13+
help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]]
14+
no_format_option: ClassVar[tuple[str, ...]]
15+
default_format: ClassVar[dict[str, str]]
16+
format_commands: ClassVar[list[str]]
17+
format_command: ClassVar[dict[str, tuple[str, str]]]
1618
bdist_base: Any
1719
plat_name: Any
1820
formats: Any

stdlib/distutils/command/bdist_dumb.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
from typing import Any
1+
from typing import Any, ClassVar
22

33
from ..cmd import Command
44

55
class bdist_dumb(Command):
66
description: str
7-
user_options: Any
8-
boolean_options: Any
9-
default_format: Any
7+
user_options: ClassVar[list[tuple[str, str | None, str]]]
8+
boolean_options: ClassVar[list[str]]
9+
default_format: ClassVar[dict[str, str]]
1010
bdist_dir: Any
1111
plat_name: Any
1212
format: Any

stdlib/distutils/command/bdist_msi.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sys
2-
from typing import Any, Literal
2+
from typing import Any, ClassVar, Literal
33

44
from ..cmd import Command
55

@@ -16,8 +16,8 @@ if sys.platform == "win32":
1616

1717
class bdist_msi(Command):
1818
description: str
19-
user_options: Any
20-
boolean_options: Any
19+
user_options: ClassVar[list[tuple[str, str | None, str]]]
20+
boolean_options: ClassVar[list[str]]
2121
all_versions: Any
2222
other_version: str
2323
if sys.version_info >= (3, 9):

stdlib/distutils/command/bdist_rpm.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
from typing import Any
1+
from typing import Any, ClassVar
22

33
from ..cmd import Command
44

55
class bdist_rpm(Command):
66
description: str
7-
user_options: Any
8-
boolean_options: Any
9-
negative_opt: Any
7+
user_options: ClassVar[list[tuple[str, str | None, str]]]
8+
boolean_options: ClassVar[list[str]]
9+
negative_opt: ClassVar[dict[str, str]]
1010
bdist_base: Any
1111
rpm_base: Any
1212
dist_dir: Any

stdlib/distutils/command/bdist_wininst.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from _typeshed import StrOrBytesPath
22
from distutils.cmd import Command
3-
from typing import Any, ClassVar
3+
from typing import ClassVar
44

55
class bdist_wininst(Command):
66
description: ClassVar[str]
7-
user_options: ClassVar[list[tuple[Any, ...]]]
7+
user_options: ClassVar[list[tuple[str, str | None, str]]]
88
boolean_options: ClassVar[list[str]]
99

1010
def initialize_options(self) -> None: ...

stdlib/distutils/command/build.pyi

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from _typeshed import Unused
12
from collections.abc import Callable
23
from typing import Any, ClassVar
34

@@ -7,9 +8,9 @@ def show_compilers() -> None: ...
78

89
class build(Command):
910
description: str
10-
user_options: Any
11-
boolean_options: Any
12-
help_options: Any
11+
user_options: ClassVar[list[tuple[str, str | None, str]]]
12+
boolean_options: ClassVar[list[str]]
13+
help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]]
1314
build_base: str
1415
build_purelib: Any
1516
build_platlib: Any

stdlib/distutils/command/build_clib.pyi

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
from typing import Any
1+
from _typeshed import Unused
2+
from collections.abc import Callable
3+
from typing import Any, ClassVar
24

35
from ..cmd import Command
46

57
def show_compilers() -> None: ...
68

79
class build_clib(Command):
810
description: str
9-
user_options: Any
10-
boolean_options: Any
11-
help_options: Any
11+
user_options: ClassVar[list[tuple[str, str, str]]]
12+
boolean_options: ClassVar[list[str]]
13+
help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]]
1214
build_clib: Any
1315
build_temp: Any
1416
libraries: Any

stdlib/distutils/command/build_ext.pyi

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

35
from ..cmd import Command
46

@@ -9,9 +11,9 @@ def show_compilers() -> None: ...
911
class build_ext(Command):
1012
description: str
1113
sep_by: Any
12-
user_options: Any
13-
boolean_options: Any
14-
help_options: Any
14+
user_options: ClassVar[list[tuple[str, str | None, str]]]
15+
boolean_options: ClassVar[list[str]]
16+
help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]]
1517
extensions: Any
1618
build_lib: Any
1719
plat_name: Any

stdlib/distutils/command/build_py.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
from typing import Any, Literal
1+
from typing import Any, ClassVar, Literal
22

33
from ..cmd import Command
44
from ..util import Mixin2to3 as Mixin2to3
55

66
class build_py(Command):
77
description: str
8-
user_options: Any
9-
boolean_options: Any
10-
negative_opt: Any
8+
user_options: ClassVar[list[tuple[str, str | None, str]]]
9+
boolean_options: ClassVar[list[str]]
10+
negative_opt: ClassVar[dict[str, str]]
1111
build_lib: Any
1212
py_modules: Any
1313
package: Any

stdlib/distutils/command/build_scripts.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any
1+
from typing import Any, ClassVar
22

33
from ..cmd import Command
44
from ..util import Mixin2to3 as Mixin2to3
@@ -7,8 +7,8 @@ first_line_re: Any
77

88
class build_scripts(Command):
99
description: str
10-
user_options: Any
11-
boolean_options: Any
10+
user_options: ClassVar[list[tuple[str, str, str]]]
11+
boolean_options: ClassVar[list[str]]
1212
build_dir: Any
1313
scripts: Any
1414
force: Any

0 commit comments

Comments
 (0)