style: fix ruff formatting in broadcast_service and tests

This commit is contained in:
Fringg
2026-02-17 18:50:25 +03:00
parent df5b1a072d
commit 90278f1f5f
2 changed files with 6 additions and 2 deletions

View File

@@ -428,7 +428,9 @@ class BroadcastService:
sent_count,
failed_count,
blocked_count,
status='cancelled' if cancelled else ('completed' if failed_count == 0 and blocked_count == 0 else 'partial'),
status='cancelled'
if cancelled
else ('completed' if failed_count == 0 and blocked_count == 0 else 'partial'),
)
async def _mark_cancelled(

View File

@@ -745,4 +745,6 @@ async def test_auto_purchase_trial_remaining_days_transferred(monkeypatch):
# Проверяем, что подписка продлена на 30 дней + 2 оставшихся дня триала = 32 от now
# end_date = trial_end + 30 = (now + 2) + 30 = now + 32
actual_total_days = (subscription.end_date - now).days
assert actual_total_days == 32, f'Expected 32 days from now (30 purchased + 2 remaining trial), got {actual_total_days}'
assert actual_total_days == 32, (
f'Expected 32 days from now (30 purchased + 2 remaining trial), got {actual_total_days}'
)