From c748683f2e6b648829e14c6a27656c335b4295ca Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Mon, 31 Aug 2026 13:17:44 -0700 Subject: [PATCH] Apply ruff 0.16 and black fixes Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_012U7coQfVu8nK2R4q2mCULA --- tests/conftest.py | 4 ++-- tests/test_cli_serve_server.py | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 309ba1e4..12dce417 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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 diff --git a/tests/test_cli_serve_server.py b/tests/test_cli_serve_server.py index 824e186a..2f113ded 100644 --- a/tests/test_cli_serve_server.py +++ b/tests/test_cli_serve_server.py @@ -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