diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2c4f8f98..c042a838 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,12 +8,12 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: "v0.1.15" hooks: - - id: ruff-format + - id: ruff + args: [--fix, --exit-non-zero-on-fix] - repo: https://github.com/astral-sh/ruff-pre-commit rev: "v0.1.15" hooks: - - id: ruff - args: [--fix, --exit-non-zero-on-fix] + - id: ruff-format - repo: https://github.com/kynan/nbstripout rev: "0.6.1" hooks: diff --git a/pyproject.toml b/pyproject.toml index c504def8..1a9aae3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,6 +69,7 @@ python = ["3.9", "3.10", "3.11"] [tool.ruff] format.quote-style = "single" +lint.pydocstyle.convention = "numpy" target-version = "py39" line-length = 79 select = [ @@ -80,8 +81,13 @@ select = [ "B", # flake8-bugbear "UP", # pyupgrade ] +ignore = [ + "B028", # allow warning without stacklevel + "C901", # allow functions with a high complexity +] extend-select = ["Q"] extend-include = ["*.ipynb"] +flake8-quotes.inline-quotes = "single" isort.known-first-party = ["elisa"] isort.combine-as-imports = true