Skip to content

Commit 216686f

Browse files
committed
style: apply ruff format
1 parent e990211 commit 216686f

3 files changed

Lines changed: 6 additions & 15 deletions

File tree

migrations/env.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
config = context.config
2929
# Escape % as %% so ConfigParser interpolation does not choke on
3030
# percent-encoded characters in the URL (e.g. %40 for '@' in a password).
31-
config.set_main_option(
32-
"sqlalchemy.url", settings.database_url.replace("%", "%%")
33-
)
31+
config.set_main_option("sqlalchemy.url", settings.database_url.replace("%", "%%"))
3432

3533
# Interpret the config file for Python logging.
3634
# This line sets up loggers basically.
@@ -53,9 +51,8 @@ def include_object(
5351
in migrations, never as tables by ``create_all``. Without this filter
5452
``alembic check`` would perpetually report them as missing tables.
5553
"""
56-
return not (
57-
type_ == "table" and object.info.get("is_view")
58-
)
54+
return not (type_ == "table" and object.info.get("is_view"))
55+
5956

6057
# other values from the config, defined by the needs of env.py,
6158
# can be acquired:

tests/test_main.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ async def fake_bootstrap_data() -> None:
6969
monkeypatch.setattr(main_module, "bootstrap_data", fake_bootstrap_data)
7070
monkeypatch.setattr(main_module, "set_process_boot_at", lambda: None)
7171
monkeypatch.setattr(main_module, "session_scope", _fake_session_scope)
72-
monkeypatch.setattr(
73-
main_module, "reset_lease", AsyncMock()
74-
)
72+
monkeypatch.setattr(main_module, "reset_lease", AsyncMock())
7573
monkeypatch.setattr(main_module, "start_scheduler", lambda: None)
7674
monkeypatch.setattr(main_module, "stop_scheduler", AsyncMock())
7775
monkeypatch.setattr(main_module, "send_test_email", AsyncMock())
@@ -101,9 +99,7 @@ async def fake_bootstrap_data() -> None:
10199
monkeypatch.setattr(main_module, "bootstrap_data", fake_bootstrap_data)
102100
monkeypatch.setattr(main_module, "set_process_boot_at", lambda: None)
103101
monkeypatch.setattr(main_module, "session_scope", _fake_session_scope)
104-
monkeypatch.setattr(
105-
main_module, "reset_lease", AsyncMock()
106-
)
102+
monkeypatch.setattr(main_module, "reset_lease", AsyncMock())
107103
monkeypatch.setattr(main_module, "start_scheduler", lambda: None)
108104
monkeypatch.setattr(main_module, "stop_scheduler", AsyncMock())
109105
monkeypatch.setattr(main_module, "send_test_email", AsyncMock())

voucherbot/services/ai/analyzer.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,7 @@ def _pick_groq_model(exclude: set[str] | None = None) -> str | None:
182182
"""
183183
excluded = exclude or set()
184184
available = [
185-
m
186-
for m in _GROQ_BATCH_MODELS
187-
if m not in excluded and is_model_available(m)
185+
m for m in _GROQ_BATCH_MODELS if m not in excluded and is_model_available(m)
188186
]
189187
if not available:
190188
return None

0 commit comments

Comments
 (0)