From 55d4318ec555b82af0e5df70cb04911ec324fc21 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 05:29:21 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- binderhub/static/js/App.test.jsx | 6 +++++- binderhub/static/js/components/ErrorPage.jsx | 2 +- binderhub/static/js/pages/LoadingPage.jsx | 4 ++-- integration-tests/test_ui.py | 4 +++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/binderhub/static/js/App.test.jsx b/binderhub/static/js/App.test.jsx index dd653d556..9e8768469 100644 --- a/binderhub/static/js/App.test.jsx +++ b/binderhub/static/js/App.test.jsx @@ -59,5 +59,9 @@ test("renders error for misconfigured repo", () => { , ); - expect(screen.queryByText(/Spec is not of the form "user\/repo\/ref", provided: "userrepo\/main"/)).toBeInTheDocument(); + expect( + screen.queryByText( + /Spec is not of the form "user\/repo\/ref", provided: "userrepo\/main"/, + ), + ).toBeInTheDocument(); }); diff --git a/binderhub/static/js/components/ErrorPage.jsx b/binderhub/static/js/components/ErrorPage.jsx index a9bd9c7f4..db6008ae9 100644 --- a/binderhub/static/js/components/ErrorPage.jsx +++ b/binderhub/static/js/components/ErrorPage.jsx @@ -2,7 +2,7 @@ export function ErrorPage({ title, errorMessage }) { return ( <>
-

{ title }

+

{title}

{errorMessage} Note: Some errors disappear by refreshing the page. diff --git a/binderhub/static/js/pages/LoadingPage.jsx b/binderhub/static/js/pages/LoadingPage.jsx index 4a5aaafd5..f75f5554a 100644 --- a/binderhub/static/js/pages/LoadingPage.jsx +++ b/binderhub/static/js/pages/LoadingPage.jsx @@ -25,7 +25,7 @@ export function LoadingPage({ baseUrl }) { const [isLaunching, setIsLaunching] = useState(false); const spec = new Spec(buildSpec, LaunchSpec.fromSearchParams(searchParams)); - const formatError = buildSpec.split("/").filter(x => !!x).length !== 4; + const formatError = buildSpec.split("/").filter((x) => !!x).length !== 4; useEffect(() => { if (!formatError) { @@ -40,7 +40,7 @@ export function LoadingPage({ baseUrl }) { title="400: Bad Request" errorMessage={`Spec is not of the form "user/repo/ref", provided: "${buildSpec.substring(buildSpec.indexOf("/") + 1)}".`} /> - ) + ); } return ( diff --git a/integration-tests/test_ui.py b/integration-tests/test_ui.py index 684822159..4b0215098 100644 --- a/integration-tests/test_ui.py +++ b/integration-tests/test_ui.py @@ -107,7 +107,9 @@ async def test_loading_page( assert r.status == status_code, f"{r.status} {uri}" if status_code == 200: nbviewer_url = page.get_by_test_id("nbviewer-iframe").get_attribute("src") - expected_url = f"https://nbviewer.jupyter.org/github/{repo}/tree/{ref.replace("/", "")}" + expected_url = ( + f"https://nbviewer.jupyter.org/github/{repo}/tree/{ref.replace("/", "")}" + ) assert nbviewer_url == expected_url