style: apply ruff auto-fix

- Auto-formatted code with ruff format
- Applied ruff linting fixes with --fix

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2026-03-16 09:23:07 +00:00
parent fe20e02f78
commit c1657a01a7
+7 -3
View File
@@ -831,11 +831,13 @@ class TestUserNotificationService:
result = _send_email_notification({"smtp_host": "smtp.example.com"}, "Title", "Body") result = _send_email_notification({"smtp_host": "smtp.example.com"}, "Title", "Body")
assert result is False assert result is False
class TestBenchmark: class TestBenchmark:
@pytest.mark.unit @pytest.mark.unit
def test_update_preferences_benchmark(self, notif_engine, notif_session): def test_update_preferences_benchmark(self, notif_engine, notif_session):
import time
import statistics import statistics
import time
from app.main import app from app.main import app
target = UserNotificationTarget( target = UserNotificationTarget(
@@ -853,12 +855,14 @@ class TestBenchmark:
items_count = 100 items_count = 100
preferences = [] preferences = []
for i in range(items_count): for i in range(items_count):
preferences.append({ preferences.append(
{
"event_type": f"event.type.{i}", "event_type": f"event.type.{i}",
"channel_type": "webhook", "channel_type": "webhook",
"is_enabled": True, "is_enabled": True,
"target_id": target.id, "target_id": target.id,
}) }
)
payload = {"preferences": preferences} payload = {"preferences": preferences}