From 70af800eaac645e04ac015c54ff332300c2dcdb0 Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Mon, 31 Aug 2026 13:20:37 -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/test_cli_serve_server.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_cli_serve_server.py b/tests/test_cli_serve_server.py index 61205536..f6f63b0a 100644 --- a/tests/test_cli_serve_server.py +++ b/tests/test_cli_serve_server.py @@ -155,7 +155,7 @@ def test_startup_error_fails_fast_before_port_binds(serve_with_plugins): # and therefore every plugin's `shutdown` hook. The plugin below writes a # sentinel file from inside its shutdown hook so this can be checked from # outside the subprocess after it exits. -SHUTDOWN_SENTINEL_PLUGIN_TEMPLATE = ''' +SHUTDOWN_SENTINEL_PLUGIN_TEMPLATE = """ import pathlib from datasette import hookimpl @@ -165,7 +165,7 @@ SENTINEL_PATH = {sentinel_path!r} @hookimpl def shutdown(datasette): pathlib.Path(SENTINEL_PATH).write_text("shutdown ran", "utf-8") -''' +""" def _start_serve_with_shutdown_sentinel(serve_with_plugins, tmp_path): @@ -196,9 +196,9 @@ def test_sigterm_runs_shutdown_hooks(serve_with_plugins, tmp_path): "datasette serve did not exit within 10s of SIGTERM\n" + ds_proc.stdout.read().decode("utf-8") ) + output = ds_proc.stdout.read().decode("utf-8") assert sentinel_path.exists(), ( - "shutdown hook never wrote its sentinel file after SIGTERM\n" - + ds_proc.stdout.read().decode("utf-8") + "shutdown hook never wrote its sentinel file after SIGTERM\n" + output ) assert sentinel_path.read_text("utf-8") == "shutdown ran" @@ -222,8 +222,8 @@ def test_sigint_runs_shutdown_hooks(serve_with_plugins, tmp_path): "datasette serve did not exit within 10s of SIGINT\n" + ds_proc.stdout.read().decode("utf-8") ) + output = ds_proc.stdout.read().decode("utf-8") assert sentinel_path.exists(), ( - "shutdown hook never wrote its sentinel file after SIGINT\n" - + ds_proc.stdout.read().decode("utf-8") + "shutdown hook never wrote its sentinel file after SIGINT\n" + output ) assert sentinel_path.read_text("utf-8") == "shutdown ran"