@@ -133,7 +133,7 @@ def abs_path(v: str | None) -> str | None:
133133 k : v for k , v in ([("makefile_filename" , makefile ())] if makefile is not None else []) if k is not None
134134 }
135135
136- config_var_keys = set ()
136+ config_var_keys : set [ str ] = set ()
137137 for element in self .sysconfig_paths .values ():
138138 config_var_keys .update (k [1 :- 1 ] for k in _CONF_VAR_RE .findall (element ))
139139 config_var_keys .add ("PYTHONFRAMEWORK" )
@@ -607,7 +607,9 @@ def _gen_cookie() -> str:
607607 return "" .join (choice (f"{ ascii_lowercase } { ascii_uppercase } { digits } " ) for _ in range (_COOKIE_LENGTH )) # noqa: S311
608608
609609
610- def _run_subprocess (cls : type [PythonInfo ], exe : str , env : MutableMapping [str , str ]) -> PythonInfo | RuntimeError :
610+ def _run_subprocess ( # noqa: PLR0914
611+ cls : type [PythonInfo ], exe : str , env : MutableMapping [str , str ]
612+ ) -> PythonInfo | RuntimeError :
611613 py_info_script = Path (os .path .abspath (__file__ )).parent / "_info.py" # noqa: PTH100
612614 # Cookies allow splitting the serialized stdout output generated by the script collecting the info from the output
613615 # generated by something else.
@@ -665,7 +667,9 @@ def _run_subprocess(cls: type[PythonInfo], exe: str, env: MutableMapping[str, st
665667 result .executable = exe # keep the original executable as this may contain initialization code
666668 return result
667669
668- msg = f"{ exe } with code { code } { f' out: { out !r} ' if out else '' } { f" err: { err !r} " if err else '' } "
670+ err_str = f" err: { err !r} " if err else ""
671+ out_str = f" out: { out !r} " if out else ""
672+ msg = f"{ exe } with code { code } { out_str } { err_str } "
669673 return RuntimeError (f"failed to query { msg } " )
670674
671675
0 commit comments