Skip to content

Commit a4f08bd

Browse files
authored
setuptools: add various missing objects and annotations (#10639)
1 parent 4ae6d38 commit a4f08bd

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

stubs/setuptools/setuptools/_distutils/ccompiler.pyi

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from collections.abc import Callable
2-
from typing import Any
2+
from typing import Any, ClassVar
33
from typing_extensions import TypeAlias
44

55
_Macro: TypeAlias = tuple[str] | tuple[str, str | None]
@@ -15,6 +15,15 @@ def new_compiler(
1515
def show_compilers() -> None: ...
1616

1717
class CCompiler:
18+
src_extensions: ClassVar[list[str] | None]
19+
obj_extensions: ClassVar[str | None]
20+
static_lib_extension: ClassVar[str | None]
21+
shared_lib_extension: ClassVar[str | None]
22+
static_lib_format: ClassVar[str | None]
23+
shared_lib_format: ClassVar[str | None]
24+
exe_extension: ClassVar[str | None]
25+
language_map: ClassVar[dict[str, str]]
26+
language_order: ClassVar[list[str]]
1827
dry_run: bool
1928
force: bool
2029
verbose: bool

stubs/setuptools/setuptools/_distutils/cmd.pyi

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class Command:
1010
distribution: Distribution
1111
sub_commands: ClassVar[list[tuple[str, Callable[[Self], bool] | None]]]
1212
def __init__(self, dist: Distribution) -> None: ...
13+
def ensure_finalized(self) -> None: ...
1314
@abstractmethod
1415
def initialize_options(self) -> None: ...
1516
@abstractmethod

stubs/setuptools/setuptools/_distutils/command/build_ext.pyi

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from _typeshed import Incomplete
22

33
from ..cmd import Command
4+
from ..extension import Extension
45

56
class build_ext(Command):
67
description: str
@@ -42,5 +43,5 @@ class build_ext(Command):
4243
def get_ext_fullpath(self, ext_name: str) -> str: ...
4344
def get_ext_fullname(self, ext_name: str) -> str: ...
4445
def get_ext_filename(self, ext_name: str) -> str: ...
45-
def get_export_symbols(self, ext): ...
46-
def get_libraries(self, ext): ...
46+
def get_export_symbols(self, ext: Extension) -> list[str]: ...
47+
def get_libraries(self, ext: Extension) -> list[str]: ...
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
def configure() -> None: ...
2-
def set_threshold(level): ...
2+
def set_threshold(level: int) -> int: ...

0 commit comments

Comments
 (0)