diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ebd5aafc..aa714531 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -68,11 +68,13 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.4 + rev: v0.1.5 hooks: - id: ruff + types_or: [python, jupyter] args: ["--fix", "--show-fixes"] - id: ruff-format + types_or: [python, jupyter] - repo: https://github.com/scientific-python/cookie rev: "2023.10.27" diff --git a/pyproject.toml b/pyproject.toml index bbb2924a..640e96d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,10 @@ test = "python -m pytest $ARGS --cov-fail-under 85 {args}" detached = true dependencies = ["pre-commit"] [tool.hatch.envs.lint.scripts] -build = "pre-commit run --all-files ruff" +build = [ + "pre-commit run --all-files ruff", + "pre-commit run --all-files ruff-format" +] [tool.hatch.envs.typing] dependencies = [ "pre-commit"] @@ -124,7 +127,6 @@ show_error_codes = true warn_unreachable = true [tool.ruff] -target-version = "py38" line-length = 100 [tool.ruff.lint] @@ -151,6 +153,7 @@ ignore = [ # SIM114 Combine `if` branches # PLR0912 Too many branches "tests/*" = ["S101", "N806", "PLR2004", "SIM114", "PLR0912"] +"*.ipynb" = ["B018", "T201", "F821"] [tool.interrogate] ignore-init-module=true