[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-07-13 12:02:36 +00:00
commit 8c8efacf2d
2 changed files with 6 additions and 1 deletions

View file

@ -124,6 +124,7 @@ def _torchao_runtime_unavailable():
import sys
try:
from core._torchao_stub import is_win32_rocm, _STUB_SENTINEL
if is_win32_rocm():
return True
_tao = sys.modules.get("torchao")

View file

@ -356,5 +356,9 @@ def test_installer_registers_finder_once(monkeypatch):
assert len(finders) == 1
finally:
sys.meta_path[:] = meta_before
for k in [k for k in sys.modules if (k == "torchao" or k.startswith("torchao.")) and k not in tao_before]:
for k in [
k
for k in sys.modules
if (k == "torchao" or k.startswith("torchao.")) and k not in tao_before
]:
del sys.modules[k]