refactor: reorganize imports and improve code formatting for readability

This commit is contained in:
Abhimanyu Saharan
2026-02-15 13:20:46 +05:30
parent efad1d4afc
commit aa825863c2
8 changed files with 84 additions and 41 deletions

View File

@@ -74,7 +74,9 @@ def test_generic_requeue_respects_retry_cap(monkeypatch: pytest.MonkeyPatch, att
assert requeued.attempts == attempts + 1
def test_dequeue_task_tolerates_legacy_payload_without_envelope(monkeypatch: pytest.MonkeyPatch) -> None:
def test_dequeue_task_tolerates_legacy_payload_without_envelope(
monkeypatch: pytest.MonkeyPatch,
) -> None:
fake = _FakeRedis()
def _fake_redis(*, redis_url: str | None = None) -> _FakeRedis:

View File

@@ -127,7 +127,9 @@ class _FakeQueuedItem:
self.attempts = attempts
def _patch_dequeue(monkeypatch: pytest.MonkeyPatch, items: list[QueuedInboundDelivery | None]) -> None:
def _patch_dequeue(
monkeypatch: pytest.MonkeyPatch, items: list[QueuedInboundDelivery | None]
) -> None:
def _dequeue() -> QueuedInboundDelivery | None:
if not items:
return None
@@ -137,7 +139,9 @@ def _patch_dequeue(monkeypatch: pytest.MonkeyPatch, items: list[QueuedInboundDel
@pytest.mark.asyncio
async def test_dispatch_flush_processes_items_and_throttles(monkeypatch: pytest.MonkeyPatch) -> None:
async def test_dispatch_flush_processes_items_and_throttles(
monkeypatch: pytest.MonkeyPatch,
) -> None:
items: list[QueuedInboundDelivery | None] = [
_FakeQueuedItem(),
_FakeQueuedItem(),