[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-03-18 05:00:40 +00:00
commit 35f3465d86

View file

@ -33,6 +33,7 @@ def _fix_torch_cuda_ld_path():
return False
try:
import importlib.util
spec = importlib.util.find_spec("torch")
if not spec or not spec.origin:
return False
@ -54,7 +55,7 @@ def _fix_torch_cuda_ld_path():
# Already at the front -- nothing to do
existing = ld_path.split(":")
if existing[:len(lib_dirs)] == lib_dirs:
if existing[: len(lib_dirs)] == lib_dirs:
return False
# Prepend torch dirs, deduplicate