From fba67250d1c4e7f6a7c47726ec998c79fb78ef95 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Fri, 22 May 2026 21:27:04 -0700 Subject: [PATCH] Ran Black --- tests/test_navigation_search_js.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/test_navigation_search_js.py b/tests/test_navigation_search_js.py index acb1b85e..b487357d 100644 --- a/tests/test_navigation_search_js.py +++ b/tests/test_navigation_search_js.py @@ -3,7 +3,6 @@ from pathlib import Path import subprocess import textwrap - REPO_ROOT = Path(__file__).resolve().parents[1] STATIC_DIR = REPO_ROOT / "datasette" / "static" @@ -209,7 +208,8 @@ def test_navigation_search_tracks_and_renders_recent_items(): def test_navigation_search_renders_jump_sections_from_javascript_plugins(): - script = textwrap.dedent(""" + script = ( + textwrap.dedent(""" const fs = require("fs"); const vm = require("vm"); const datasetteManagerJs = __DATASETTE_MANAGER_JS__; @@ -373,12 +373,15 @@ def test_navigation_search_renders_jump_sections_from_javascript_plugins(): throw new Error(`Missing jump section content: ${html}`); } process.stdout.write("ok"); - """).replace( - "__DATASETTE_MANAGER_JS__", - json.dumps(str(STATIC_DIR / "datasette-manager.js")), - ).replace( - "__NAVIGATION_SEARCH_JS__", - json.dumps(str(STATIC_DIR / "navigation-search.js")), + """) + .replace( + "__DATASETTE_MANAGER_JS__", + json.dumps(str(STATIC_DIR / "datasette-manager.js")), + ) + .replace( + "__NAVIGATION_SEARCH_JS__", + json.dumps(str(STATIC_DIR / "navigation-search.js")), + ) ) result = subprocess.run( ["node", "-e", script],