From 3efcd37f6f3d4d4c4414a427b59e3e7d0f951491 Mon Sep 17 00:00:00 2001 From: agessaman Date: Mon, 7 Sep 2026 13:05:19 -0700 Subject: [PATCH] ci: reformat two files ruff 0.15.14 would rewrite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `pre-commit run --all-files` fails on `dev` at the `ruff-format` hook, so every open pull request is red on a check that has nothing to do with its own diff. Both files arrived with 72da7ee (pr-436) formatted by an earlier ruff. Purely cosmetic, and exactly what `ruff format` produces: - `sqlite_handler.py` — a generator expression and an f-string concatenation that both now fit inside the line limit unsplit. - `test_companion_import_repeater_contacts.py` — the blank line ruff requires after a module docstring. --- repeater/data_acquisition/sqlite_handler.py | 7 ++----- tests/test_companion_import_repeater_contacts.py | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/repeater/data_acquisition/sqlite_handler.py b/repeater/data_acquisition/sqlite_handler.py index 75730ce..923d9cb 100644 --- a/repeater/data_acquisition/sqlite_handler.py +++ b/repeater/data_acquisition/sqlite_handler.py @@ -3884,16 +3884,13 @@ class SQLiteHandler: if t in self._ADVERT_TYPE_BY_API } stored = sorted( - key - for key, adv in self._ADVERT_TYPE_BY_STORED.items() - if adv in wanted + key for key, adv in self._ADVERT_TYPE_BY_STORED.items() if adv in wanted ) if not stored: return 0 placeholders = ",".join("?" * len(stored)) query += ( - " AND LOWER(REPLACE(TRIM(contact_type), ' ', '_')) " - f"IN ({placeholders})" + f" AND LOWER(REPLACE(TRIM(contact_type), ' ', '_')) IN ({placeholders})" ) params.extend(stored) if hours is not None: diff --git a/tests/test_companion_import_repeater_contacts.py b/tests/test_companion_import_repeater_contacts.py index 85d1e54..2900ed4 100644 --- a/tests/test_companion_import_repeater_contacts.py +++ b/tests/test_companion_import_repeater_contacts.py @@ -18,6 +18,7 @@ than 1 even on an unfiltered import. Both derived the mapping independently; they now share one table. """ + import os import shutil import sqlite3