From 10dd80e9285e7460048126b0c10c0a389154ecb3 Mon Sep 17 00:00:00 2001 From: Simone Rubino Date: Sun, 19 Nov 2023 14:59:48 +0100 Subject: [PATCH] More ruff --- template/.pre-commit-config.yaml | 17 ++++++++--------- template/pyproject.toml.jinja | 9 +++++++++ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/template/.pre-commit-config.yaml b/template/.pre-commit-config.yaml index 4bcc4aa..7050747 100644 --- a/template/.pre-commit-config.yaml +++ b/template/.pre-commit-config.yaml @@ -1,13 +1,5 @@ # See https://pre-commit.com for more information repos: -- repo: https://github.com/pycqa/flake8 - rev: 6.1.0 - hooks: - - id: flake8 -- repo: https://github.com/PyCQA/autoflake - rev: v2.2.1 - hooks: - - id: autoflake - repo: https://github.com/pycqa/bandit rev: 1.7.5 hooks: @@ -16,8 +8,15 @@ repos: rev: v0.1.6 hooks: - id: ruff - args: [ --fix ] + args: [ + --fix, + --config, "pyproject.toml", + ] - id: ruff-format + args: [ + --fix, + --config, "pyproject.toml", + ] - repo: https://github.com/pycqa/docformatter rev: v1.7.5 hooks: diff --git a/template/pyproject.toml.jinja b/template/pyproject.toml.jinja index 2081508..71639d9 100644 --- a/template/pyproject.toml.jinja +++ b/template/pyproject.toml.jinja @@ -46,3 +46,12 @@ requires = [ "wheel", ] build-backend = "setuptools.build_meta" + +[tool.ruff.lint] +select = [ + "E4", "E7", "E9", "F", # Default + "D", # Enable all `pydocstyle` rules +] + +[tool.ruff.lint.pydocstyle] +convention = "pep257"