Apply ruff 0.16 and black fixes

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012U7coQfVu8nK2R4q2mCULA
This commit is contained in:
Alex Garcia 2026-08-31 13:17:44 -07:00
commit c748683f2e
2 changed files with 7 additions and 5 deletions

View file

@ -341,7 +341,7 @@ def serve_with_plugins(tmp_path):
plugins_dir = tmp_path / "plugins"
plugins_dir.mkdir(exist_ok=True)
for module_name, source in plugins.items():
(plugins_dir / "{}.py".format(module_name)).write_text(source, "utf-8")
(plugins_dir / f"{module_name}.py").write_text(source, "utf-8")
port = find_free_port()
proc = subprocess.Popen(
[
@ -365,7 +365,7 @@ def serve_with_plugins(tmp_path):
processes.append(proc)
if wait_for_startup:
wait_until_responds(
"http://127.0.0.1:{}/-/versions.json".format(port), process=proc
f"http://127.0.0.1:{port}/-/versions.json", process=proc
)
return proc, port

View file

@ -145,6 +145,8 @@ def test_startup_error_fails_fast_before_port_binds(serve_with_plugins):
# confirms the socket was not left bound; on its own it cannot prove the
# failure preceded the bind, since a port nothing ever touched also
# refuses connections.
with pytest.raises(OSError):
with socket.create_connection(("127.0.0.1", port), timeout=0.2):
pass
with (
pytest.raises(OSError),
socket.create_connection(("127.0.0.1", port), timeout=0.2),
):
pass