[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-26 19:31:11 +00:00
commit ea3c3822a1
2 changed files with 11 additions and 3 deletions

View file

@ -345,7 +345,9 @@ def test_the_safetensors_load_yields_a_gpu_it_lost_while_loading():
encoding = "utf-8"
)
load_impl = route_src[route_src.index("async def _load_model_impl") :]
unsloth_load = load_impl.index("success = await asyncio.to_thread(\n backend.load_model,")
unsloth_load = load_impl.index(
"success = await asyncio.to_thread(\n backend.load_model,"
)
tail = load_impl[unsloth_load:]
guard = tail.index("if current_owner() != CHAT:")
assert "await asyncio.to_thread(backend.unload_model, config.identifier)" in tail[guard:]

View file

@ -755,5 +755,11 @@ def test_video_gallery_fetches_clips_as_their_cards_come_into_view():
eager = list(re.finditer(r"page\.videos\.forEach\(\(video\) => void ensureSrc\(video\)\)", src))
assert eager, "the jsdom/old-webview fallback fetch is missing"
for match in eager:
assert 'typeof IntersectionObserver === "undefined"' in src[max(0, match.start() - 260) : match.start()]
assert re.search(r"if \(!selected\) return;\s*\n\s*void \(async \(\) => \{\s*\n\s*await ensureSrc\(selected\);", src)
assert (
'typeof IntersectionObserver === "undefined"'
in src[max(0, match.start() - 260) : match.start()]
)
assert re.search(
r"if \(!selected\) return;\s*\n\s*void \(async \(\) => \{\s*\n\s*await ensureSrc\(selected\);",
src,
)