From b591d61ed1cec2aa4e598ca2b5a6f499e201404d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Mar 2023 15:47:57 +0100 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#6762) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/charliermarsh/ruff-pre-commit: v0.0.237 → v0.0.254](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.237...v0.0.254) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update ruff * Lint conftest --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jeremy Tuloup --- .pre-commit-config.yaml | 2 +- notebook/app.py | 2 +- pyproject.toml | 2 +- tests/conftest.py | 2 +- ui-tests/test/jupyter_server_config.py | 16 ++++++++-------- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5d4122e7b..f6a1734e3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: - id: black - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.237 + rev: v0.0.254 hooks: - id: ruff args: ["--fix"] diff --git a/notebook/app.py b/notebook/app.py index c81c4abbe..e4ca63469 100644 --- a/notebook/app.py +++ b/notebook/app.py @@ -32,7 +32,7 @@ version = __version__ class NotebookBaseHandler(ExtensionHandlerJinjaMixin, ExtensionHandlerMixin, JupyterHandler): """The base notebook API handler.""" - def get_page_config(self): # noqa:C901 + def get_page_config(self): """Get the page config.""" config = LabConfig() app = self.extensionapp diff --git a/pyproject.toml b/pyproject.toml index c2a5c5d98..e7ea503ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -145,7 +145,7 @@ dependencies = [ "black[jupyter]==22.10.0", "mdformat>0.7", "mdformat-gfm>=0.3.5", - "ruff==0.0.237" + "ruff==0.0.254" ] detached = true [tool.hatch.envs.lint.scripts] diff --git a/tests/conftest.py b/tests/conftest.py index a5ce0d48d..80ae8bf28 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -32,7 +32,7 @@ labextensions_dir = pytest.fixture(lambda tmp_path: mkdir(tmp_path, "labextensio @pytest.fixture -def make_notebook_app( +def make_notebook_app( # noqa PLR0913 jp_root_dir, jp_template_dir, app_settings_dir, diff --git a/ui-tests/test/jupyter_server_config.py b/ui-tests/test/jupyter_server_config.py index 6718f22d5..2c4a719da 100644 --- a/ui-tests/test/jupyter_server_config.py +++ b/ui-tests/test/jupyter_server_config.py @@ -5,14 +5,14 @@ from typing import Any import jupyterlab c: Any -c.ServerApp.port = 8888 # noqa -c.ServerApp.port_retries = 0 # noqa -c.ServerApp.open_browser = False # noqa +c.ServerApp.port = 8888 +c.ServerApp.port_retries = 0 +c.ServerApp.open_browser = False -c.ServerApp.root_dir = mkdtemp(prefix="galata-test-") # noqa -c.ServerApp.token = "" # noqa -c.ServerApp.password = "" # noqa -c.ServerApp.disable_check_xsrf = True # noqa +c.ServerApp.root_dir = mkdtemp(prefix="galata-test-") +c.ServerApp.token = "" +c.ServerApp.password = "" +c.ServerApp.disable_check_xsrf = True -c.JupyterNotebookApp.expose_app_in_browser = True # noqa +c.JupyterNotebookApp.expose_app_in_browser = True c.LabServerApp.extra_labextensions_path = str(Path(jupyterlab.__file__).parent / "galata")