From 9e66261e5817d34f0f1dc84700340c7dfa0fddff Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 6 Mar 2026 09:06:20 -0500 Subject: [PATCH] Add ruff check linting with E and F rules Adds ruff lint configuration selecting E (pycodestyle errors) and F (pyflakes) rules with a conservative ignore list to avoid breaking existing code. Adds `ruff check .` to the Makefile format target. Does not include import sorting (I) rules. Co-Authored-By: Claude Opus 4.6 --- Makefile | 1 + changelog.d/add-ruff-linting.added.md | 1 + pyproject.toml | 4 ++++ 3 files changed, 6 insertions(+) create mode 100644 changelog.d/add-ruff-linting.added.md diff --git a/Makefile b/Makefile index fd99cbbb..05e9ccb7 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ documentation: format: ruff format . + ruff check . install: pip install -e ".[dev]" --config-settings editable_mode=compat diff --git a/changelog.d/add-ruff-linting.added.md b/changelog.d/add-ruff-linting.added.md new file mode 100644 index 00000000..b16e7d09 --- /dev/null +++ b/changelog.d/add-ruff-linting.added.md @@ -0,0 +1 @@ +Added ruff check linting configuration with E and F rules to catch common Python errors. diff --git a/pyproject.toml b/pyproject.toml index 85f789b1..284e671c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,3 +103,7 @@ showcontent = true directory = "removed" name = "Removed" showcontent = true + +[tool.ruff.lint] +select = ["E", "F"] +ignore = ["E402", "E501", "E712", "E713", "E721", "E722", "E741", "F401", "F402", "F403", "F405", "F541", "F811", "F821", "F841"]