From 6873bc70ebcaf3249d5bb018bca1df4e6c628f59 Mon Sep 17 00:00:00 2001 From: Duncan Macleod <macleoddm@cardiff.ac.uk> Date: Mon, 17 Mar 2025 10:15:03 +0000 Subject: [PATCH] pyproject.toml: enable all ruff rules then selectively disable things we don't care about --- pyproject.toml | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 33732ec..042ed16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,23 +93,14 @@ filterwarnings = [ ] [tool.ruff.lint] -select = [ - # mccabe - "C90", - # pycodestyle errors - "E", - # flake8-executable - "EXE", - # pyflakes - "F", - # isort - "I", - # pep8-naming - "N", - # pyupgrade - "UP", - # pycodestyle warnings - "W", +select = ["ALL"] +ignore = [ + "ANN003", # type annotations for **kwargs + "D203", # blank line before class docstring + "D213", # docstring summary on second line + "D413", # blank line after last section + "PLR0913", # too many arguments + "SIM108", # if-else instead of ternary if ] [tool.ruff.lint.isort] @@ -121,6 +112,19 @@ force-wrap-aliases = true "F401", # unused-import "F403", # undefined-local-with-import-star ] +"*/tests/*" = [ + "ANN", # type annotations + "B904", # raise from + "EM101", # string literal in exception + "PLR2004", # magic value used in comparison + "S101", # assert +] +"docs/*" = [ + "A", # builtins + "ANN", # type annotations + "D", # docstrings + "INP001", # implicit namespace package +] [tool.setuptools] license-files = [ "LICENSE" ] -- GitLab