Skip to content

Commit 8113832

Browse files
authored
distutils: Add some return types for setuptools to pass ANN201 (#12841)
1 parent c6affbb commit 8113832

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

stdlib/distutils/command/bdist_msi.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ from typing import Any, ClassVar, Literal
44
from ..cmd import Command
55

66
if sys.platform == "win32":
7-
from msilib import Dialog
7+
from msilib import Control, Dialog
88

99
class PyDialog(Dialog):
1010
def __init__(self, *args, **kw) -> None: ...
1111
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): ...
12+
def back(self, title, next, name: str = "Back", active: bool | Literal[0, 1] = 1) -> Control: ...
13+
def cancel(self, title, next, name: str = "Cancel", active: bool | Literal[0, 1] = 1) -> Control: ...
14+
def next(self, title, next, name: str = "Next", active: bool | Literal[0, 1] = 1) -> Control: ...
15+
def xbutton(self, name, title, next, xpos) -> Control: ...
1616

1717
class bdist_msi(Command):
1818
description: str

stdlib/distutils/command/build_py.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class build_py(Command):
3232
def find_all_modules(self): ...
3333
def get_source_files(self): ...
3434
def get_module_outfile(self, build_dir, package, module): ...
35-
def get_outputs(self, include_bytecode: bool | Literal[0, 1] = 1): ...
35+
def get_outputs(self, include_bytecode: bool | Literal[0, 1] = 1) -> list[str]: ...
3636
def build_module(self, module, module_file, package): ...
3737
def build_modules(self) -> None: ...
3838
def build_packages(self) -> None: ...

stubs/setuptools/setuptools/_distutils/command/build_py.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class build_py(Command):
3232
def find_all_modules(self): ...
3333
def get_source_files(self): ...
3434
def get_module_outfile(self, build_dir, package, module): ...
35-
def get_outputs(self, include_bytecode: bool = True): ...
35+
def get_outputs(self, include_bytecode: bool = True) -> list[str]: ...
3636
def build_module(self, module, module_file, package): ...
3737
def build_modules(self) -> None: ...
3838
def build_packages(self) -> None: ...

0 commit comments

Comments
 (0)