diff --git a/pybind11/__main__.py b/pybind11/__main__.py index 2279b08aa0..645facd8fe 100644 --- a/pybind11/__main__.py +++ b/pybind11/__main__.py @@ -17,7 +17,7 @@ else: # minimal attempt, handling only the most common case (spaces in path) def quote(s: str) -> str: - return '"' + s + '"' if " " in s else s + return f'"{s}"' if " " in s else s def print_includes() -> None: @@ -33,7 +33,7 @@ def print_includes() -> None: if d and d not in unique_dirs: unique_dirs.append(d) - print(" ".join(quote("-I" + d) for d in unique_dirs)) + print(" ".join(quote(f"-I{d}") for d in unique_dirs)) def main() -> None: