Skip to content

Commit a04913a

Browse files
committed
Add type declaration for runtime_library_dir_option, making explicit the different return types one might expect.
1 parent 678e38a commit a04913a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

distutils/unixccompiler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* link shared library handled by 'cc -shared'
1414
"""
1515

16+
from __future__ import annotations
17+
1618
import itertools
1719
import os
1820
import re
@@ -281,7 +283,7 @@ def _is_gcc(self):
281283
compiler = os.path.basename(shlex.split(cc_var)[0])
282284
return "gcc" in compiler or "g++" in compiler
283285

284-
def runtime_library_dir_option(self, dir):
286+
def runtime_library_dir_option(self, dir: str) -> str | list[str]:
285287
# XXX Hackish, at the very least. See Python bug #445902:
286288
# https://bugs.python.org/issue445902
287289
# Linkers on different platforms need different options to

0 commit comments

Comments
 (0)