diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a2852f3..87daebd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.27.0 + rev: 0.27.1 hooks: - id: check-github-workflows @@ -77,11 +77,13 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.3 + 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 44c3d5b..77977ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -96,7 +96,10 @@ nowarn = "test -W default {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"] @@ -154,7 +157,6 @@ enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] warn_unreachable = true [tool.ruff] -target-version = "py38" line-length = 100 [tool.ruff.lint] @@ -193,7 +195,7 @@ unfixable = [ "tests/*" = ["B011", "F841", "C408", "E402", "T201", "B007", "N802", "F841", "S101"] # C901 Function is too complex "jupyter_events/logger.py" = ["C901"] # `emit` is too complex (12 > 10) - +"docs/demo/demo-notebook.ipynb" = ["PLE1142", "E402", "T201"] [tool.interrogate] ignore-init-module=true