Skip to content

Commit 8eadd7a

Browse files
committed
Fix build_py.__getattr__ return type on Python 3.12+
1 parent c9eaa26 commit 8eadd7a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: setuptools/command/build_py.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ def run(self) -> None:
8282
# output files are.
8383
self.byte_compile(orig.build_py.get_outputs(self, include_bytecode=False))
8484

85-
def __getattr__(self, attr: str) -> list[tuple[str, str, str, list[str]]] | Any:
85+
# Should return "list[tuple[str, str, str, list[str]]] | Any" but can't do without typed distutils on Python 3.12+
86+
def __getattr__(self, attr: str) -> Any:
8687
"lazily compute data files"
8788
if attr == 'data_files':
8889
self.data_files = self._get_data_files()

0 commit comments

Comments
 (0)