Skip to content

Commit e1832c6

Browse files
committed
Type setuptools compiler attributes
1 parent 516eed0 commit e1832c6

File tree

7 files changed

+13
-8
lines changed

7 files changed

+13
-8
lines changed

stdlib/distutils/command/build.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class build(Command):
1717
build_lib: Incomplete
1818
build_temp: Incomplete
1919
build_scripts: Incomplete
20-
compiler: Incomplete
20+
compiler: str | None
2121
plat_name: Incomplete
2222
debug: Incomplete
2323
force: int

stdlib/distutils/command/build_clib.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ from _typeshed import Incomplete, Unused
22
from collections.abc import Callable
33
from typing import ClassVar
44

5+
from ..ccompiler import CCompiler
56
from ..cmd import Command
67

78
def show_compilers() -> None: ...
@@ -19,7 +20,7 @@ class build_clib(Command):
1920
undef: Incomplete
2021
debug: Incomplete
2122
force: int
22-
compiler: Incomplete
23+
compiler: CCompiler | str | None # Is only set to `Compiler` after `run`
2324
def initialize_options(self) -> None: ...
2425
def finalize_options(self) -> None: ...
2526
def run(self) -> None: ...

stdlib/distutils/command/build_ext.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ from _typeshed import Incomplete, Unused
22
from collections.abc import Callable
33
from typing import ClassVar
44

5+
from ..ccompiler import CCompiler
56
from ..cmd import Command
67

78
extension_name_re: Incomplete
@@ -29,7 +30,7 @@ class build_ext(Command):
2930
link_objects: Incomplete
3031
debug: Incomplete
3132
force: Incomplete
32-
compiler: Incomplete
33+
compiler: CCompiler | str | None # Is only set to `Compiler` after `run`
3334
swig: Incomplete
3435
swig_cpp: Incomplete
3536
swig_opts: Incomplete

stubs/setuptools/setuptools/_distutils/command/build.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class build(Command):
1515
build_lib: Incomplete
1616
build_temp: Incomplete
1717
build_scripts: Incomplete
18-
compiler: Incomplete
18+
compiler: str | None
1919
plat_name: Incomplete
2020
debug: Incomplete
2121
force: bool

stubs/setuptools/setuptools/_distutils/command/build_clib.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ from _typeshed import Incomplete, Unused
22
from collections.abc import Callable
33
from typing import ClassVar
44

5+
from ..ccompiler import CCompiler
56
from ..cmd import Command
67

78
class build_clib(Command):
@@ -17,7 +18,7 @@ class build_clib(Command):
1718
undef: Incomplete
1819
debug: Incomplete
1920
force: bool
20-
compiler: Incomplete
21+
compiler: CCompiler | str | None # Is only set to `Compiler` after `run`
2122
def initialize_options(self) -> None: ...
2223
def finalize_options(self) -> None: ...
2324
def run(self) -> None: ...

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ from _typeshed import Incomplete, Unused
22
from collections.abc import Callable
33
from typing import ClassVar
44

5+
from ..ccompiler import CCompiler
56
from ..cmd import Command
67
from ..extension import Extension
78

@@ -26,7 +27,7 @@ class build_ext(Command):
2627
link_objects: Incomplete
2728
debug: Incomplete
2829
force: Incomplete
29-
compiler: Incomplete
30+
compiler: CCompiler | str | None # Is only set to `Compiler` after `run`
3031
swig: Incomplete
3132
swig_cpp: Incomplete
3233
swig_opts: Incomplete

stubs/setuptools/setuptools/command/build_ext.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ from typing import ClassVar
33

44
from setuptools.dist import Distribution
55

6+
from .._distutils.ccompiler import CCompiler
67
from .._distutils.command.build_ext import build_ext as _build_ext
78

89
have_rtld: bool
@@ -18,15 +19,15 @@ class build_ext(_build_ext):
1819
def run(self) -> None: ...
1920
def copy_extensions_to_source(self) -> None: ...
2021
def get_ext_filename(self, fullname): ...
21-
shlib_compiler: Incomplete
22+
shlib_compiler: CCompiler | None
2223
shlibs: list[Incomplete]
2324
ext_map: dict[Incomplete, Incomplete]
2425
def initialize_options(self) -> None: ...
2526
extensions: list[Incomplete]
2627
def finalize_options(self) -> None: ...
2728
def setup_shlib_compiler(self) -> None: ...
2829
def get_export_symbols(self, ext): ...
29-
compiler: Incomplete
30+
compiler: CCompiler | str | None # Is only set to `Compiler` after `run`
3031
def build_extension(self, ext) -> None: ...
3132
def links_to_dynamic(self, ext): ...
3233
def get_source_files(self) -> list[str]: ...

0 commit comments

Comments
 (0)