From 0b67929da512d45c3d4cbcb9c8476c6646097ffc Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Sun, 19 Apr 2026 16:53:49 +0000 Subject: [PATCH 1/2] Enable additional ruff lint rules (W, LOG, DTZ, FLY, ISC) Add five new rule sets that pass cleanly without any code changes: pycodestyle warnings, flake8-logging, flake8-datetimez, flynt, and flake8-implicit-str-concat. --- pyproject.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f19230ed..97749dff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,7 @@ select = [ "ASYNC", # pycodestyle "E", + "W", # Pyflakes "F", # pyupgrade @@ -75,6 +76,14 @@ select = [ "N", # flake8-pytest-style "PT", + # flake8-logging + "LOG", + # flake8-datetimez + "DTZ", + # flynt + "FLY", + # flake8-implicit-str-concat + "ISC", ] ignore = ["E501"] # Line too long From 7ee839f27b75727263ef82320994382416491f84 Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Sun, 19 Apr 2026 17:09:54 +0000 Subject: [PATCH 2/2] Enable 10 additional ruff lint rules with zero code changes Add PGH, SLF, SLOT, TID, INP, ICN, G, BLE, TRY, and Q rule sets. Ignore TRY003 globally (long exception messages are idiomatic here). Add per-file ignores for tests (SLF001) and utils (INP001, BLE001). Add noqa for intentional blind except in ActionQueue worker. --- pyoverkiz/action_queue.py | 2 +- pyproject.toml | 28 ++++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/pyoverkiz/action_queue.py b/pyoverkiz/action_queue.py index 288c56af..104809a8 100644 --- a/pyoverkiz/action_queue.py +++ b/pyoverkiz/action_queue.py @@ -284,7 +284,7 @@ async def _execute_batch( for waiter in waiters: waiter.set_exception(exc) raise - except Exception as exc: + except Exception as exc: # noqa: BLE001 # Propagate exceptions to all waiters without swallowing system-level exits. for waiter in waiters: waiter.set_exception(exc) diff --git a/pyproject.toml b/pyproject.toml index 97749dff..9da49a22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,11 +84,35 @@ select = [ "FLY", # flake8-implicit-str-concat "ISC", + # pygrep-hooks + "PGH", + # flake8-self + "SLF", + # flake8-slots + "SLOT", + # tidy imports + "TID", + # flake8-no-pep420 + "INP", + # import conventions + "ICN", + # flake8-logging-format + "G", + # blind exception + "BLE", + # tryceratops + "TRY", + # flake8-quotes + "Q", +] +ignore = [ + "E501", # Line too long + "TRY003", # Long exception messages are acceptable for domain-specific errors ] -ignore = ["E501"] # Line too long [tool.ruff.lint.per-file-ignores] -"tests/**" = ["S101"] # Allow assert in tests +"tests/**" = ["S101", "SLF001"] # Allow assert and private member access in tests +"utils/**" = ["INP001", "BLE001"] # Utils are scripts, not packages [tool.ruff.lint.pydocstyle] convention = "google" # Accepts: "google", "numpy", or "pep257".