From 7b094c1c907b26e72a5f0d5d46014628e5baa493 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 22 Aug 2024 12:09:52 +0200 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#33) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Philipp A. --- .pre-commit-config.yaml | 2 +- pyproject.toml | 4 ++-- tests/data/notebooks/example-py.ipynb | 4 ++-- tests/test_runner.py | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6ca6654..a180f86 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: hooks: - id: prettier - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.7 + rev: v0.6.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/pyproject.toml b/pyproject.toml index a63da0e..334be67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ features = ["test"] [tool.hatch.envs.test.scripts] run = "pytest -vv {args}" -[tool.ruff] +[tool.ruff.lint] select = ["ALL"] extend-ignore = [ "COM812", "ISC001", # Incompatible with formatter @@ -35,7 +35,7 @@ extend-ignore = [ "TD002", # No need for TODO authors ] allowed-confusables = ["’", "×"] -[tool.ruff.extend-per-file-ignores] +[tool.ruff.lint.extend-per-file-ignores] "tests/**/*.py" = [ "D100", # No module docstrings necessary for tests "D103", # No function docstrings necessary for tests diff --git a/tests/data/notebooks/example-py.ipynb b/tests/data/notebooks/example-py.ipynb index 5fc852a..8880479 100644 --- a/tests/data/notebooks/example-py.ipynb +++ b/tests/data/notebooks/example-py.ipynb @@ -9,8 +9,8 @@ "import random\n", "from pathlib import Path\n", "\n", - "r = random.randint(0, 10)\n", - "Path(\"int.txt\").write_text(str(r))\n" + "r = random.randint(0, 10) # noqa: S311\n", + "Path(\"int.txt\").write_text(str(r))" ] } ], diff --git a/tests/test_runner.py b/tests/test_runner.py index abb1c46..fd8e4fe 100644 --- a/tests/test_runner.py +++ b/tests/test_runner.py @@ -7,6 +7,7 @@ import pytest from nbclient.exceptions import CellExecutionError from nbformat import v4 + from prelude_runner.cli import load_preludes, main from prelude_runner.core import Preludes, execute from prelude_runner.types import CodeCell, Notebook, Stream