From a1973ea7a47922ec5ebbc912bba58908217a9947 Mon Sep 17 00:00:00 2001 From: Nicholas Junge Date: Fri, 18 Oct 2024 16:11:43 +0200 Subject: [PATCH] Small formatting fixes in stubgen_wrapper.py --- stubgen_wrapper.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stubgen_wrapper.py b/stubgen_wrapper.py index 481fedf..049adc2 100644 --- a/stubgen_wrapper.py +++ b/stubgen_wrapper.py @@ -5,9 +5,8 @@ from typing import Union from stubgen import main -from python.runfiles import runfiles -DEBUG = bool(os.getenv("DEBUG", False)) +DEBUG = bool(os.getenv("DEBUG")) RLOCATION_ROOT = Path("_main") # the Python path root under the script's runfiles. def get_runfiles_dir(path: Union[str, os.PathLike]): @@ -90,7 +89,7 @@ def wrapper(): ext_path = runfiles_dir / fname if DEBUG: print(f"ext_path = {ext_path}") - if (ext_path).is_symlink(): + if ext_path.is_symlink(): # Path.readlink() is available on Python 3.9+ only. objfile = Path(os.readlink(ext_path)) else: