From d58b37c55dfc86e43f5dc2f40fbfbd94cdaed461 Mon Sep 17 00:00:00 2001 From: woutdenolf Date: Wed, 29 Jul 2026 07:39:16 +0200 Subject: [PATCH] upgrade ruff --- README.md | 2 +- doc/examples.md | 5 +++-- doc/index.md | 5 +---- pyproject.toml | 19 ++++++++++++++----- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 1247e2e..39c1ef1 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Then, add `ewokssphinx` to the list of `extensions` in the Sphinx configuration extensions = [ ..., - "ewokssphinx" + "ewokssphinx", ] ``` diff --git a/doc/examples.md b/doc/examples.md index 220a2af..cecb4a3 100644 --- a/doc/examples.md +++ b/doc/examples.md @@ -72,9 +72,10 @@ To use attribute docstrings instead of `description` to document the fields, set from ewokscore.model import BaseInputModel from pydantic import ConfigDict + class Inputs(BaseInputModel): - model_config = ConfigDict(use_attribute_docstrings=True) - + model_config = ConfigDict(use_attribute_docstrings=True) + planet: str = "Earth" """The planet on which the search will be made""" diff --git a/doc/index.md b/doc/index.md index e8a7b2f..750a05f 100644 --- a/doc/index.md +++ b/doc/index.md @@ -15,10 +15,7 @@ Then, add `ewokssphinx` to the list of `extensions` in the Sphinx configuration ... -extensions = [ - ..., - "ewokssphinx" -] +extensions = [..., "ewokssphinx"] ``` ## Contents diff --git a/pyproject.toml b/pyproject.toml index 1127dbb..12ef45e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ test = [ ] dev = [ "ewokssphinx[test]", - "ruff", + "ruff>=0.16.0", ] doc = [ "ewokssphinx[test]", @@ -59,12 +59,21 @@ ewokssphinx = ["*.css"] omit = ['*/tests/*'] [tool.ruff.lint] -select = ["E", "F", "I", "S"] -ignore = ["E501"] +select = [ + "E", # pycodestyle errors + "F", # pyflakes + "I", # isort + "S", # flake8-bandit +] +ignore = [ + "E501", # line too long +] [tool.ruff.lint.per-file-ignores] -# Ignore `S101` (assert used violations) in all test files -"src/ewokssphinx/tests/*.py" = ["S101"] +"src/ewokssphinx/tests/*.py" = [ + "S101" # allow asserts +] [tool.ruff.lint.isort] force-single-line = true +known-first-party = ["ewokssphinx"]