From 902b1c7f2f7be11ffe0bebb2203526c2b5202c32 Mon Sep 17 00:00:00 2001 From: Jorge Alvarez Jarreta Date: Wed, 6 Nov 2024 10:39:14 +0000 Subject: [PATCH] update ruff configuration --- pyproject.toml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 1bd0c3041..699f64b72 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -190,9 +190,29 @@ show-fixes = true [tool.ruff.format] docstring-code-format = true +[tool.ruff.lint] +select = [ + "ALL", +] +ignore = [ + "COM812", # https://docs.astral.sh/ruff/rules/trailing-comma-on-bare-tuple/ + "D107", # https://docs.astral.sh/ruff/rules/undocumented-public-init/ + "D203", # https://docs.astral.sh/ruff/rules/one-blank-line-before-class/ + "D211", # https://docs.astral.sh/ruff/rules/blank-line-before-class/ + "D213", # https://docs.astral.sh/ruff/rules/multi-line-summary-second-line/ + "G004", # https://docs.astral.sh/ruff/rules/logging-f-string/ + "I001", # https://docs.astral.sh/ruff/rules/unsorted-imports/ + "ICN001", # https://docs.astral.sh/ruff/rules/unconventional-import-alias/ + "ISC001", # https://docs.astral.sh/ruff/rules/single-line-implicit-string-concatenation/ + "UP035", # https://docs.astral.sh/ruff/rules/deprecated-import/ +] + [tool.ruff.lint.per-file-ignores] # Ignore `F403` (unable to detect undefined names) in all `__init__.py` files "__init__.py" = ["F403"] +# Ignore `INP001` (packages missing an __init__.py file) and `S101` (raise error instead of using assert) +# in all pytest files +"src/python/tests/**.py" = ["INP001", "S101"] [tool.mypy] mypy_path = "src/python"