Skip to content

Commit

Permalink
Add type declaration for runtime_library_dir_option, making explicit …
Browse files Browse the repository at this point in the history
…the different return types one might expect.
  • Loading branch information
jaraco committed Apr 13, 2024
1 parent 678e38a commit a04913a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion distutils/unixccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* link shared library handled by 'cc -shared'
"""

from __future__ import annotations

import itertools
import os
import re
Expand Down Expand Up @@ -281,7 +283,7 @@ def _is_gcc(self):
compiler = os.path.basename(shlex.split(cc_var)[0])
return "gcc" in compiler or "g++" in compiler

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

0 comments on commit a04913a

Please sign in to comment.