From 4ec5623431dbb68bce3b157b5618faf318597bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Far=C3=ADas=20Santana?= Date: Fri, 21 Jun 2024 01:59:45 +0200 Subject: [PATCH] fix: Update type hint --- posthog/temporal/batch_exports/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/posthog/temporal/batch_exports/utils.py b/posthog/temporal/batch_exports/utils.py index 625bdbd9f917b..b02a21f13bf5a 100644 --- a/posthog/temporal/batch_exports/utils.py +++ b/posthog/temporal/batch_exports/utils.py @@ -43,7 +43,7 @@ def rewind_gen() -> collections.abc.Generator[T, None, None]: @contextlib.asynccontextmanager async def set_status_to_running_task( run_id: str | None, logger, timeout: float = 10.0 -) -> typing.AsyncIterator[asyncio.Task]: +) -> typing.AsyncIterator[asyncio.Task | None]: """Manage a background task to set a batch export run to 'RUNNING' status. This is intended to be used within a batch export's 'insert_*' activity. These activities cannot afford @@ -56,7 +56,7 @@ async def set_status_to_running_task( """ if run_id is None: # Should never land here except in tests of individual activities - yield + yield None return background_task = asyncio.create_task(