From e02ada0cb666475098823f6c2e63044839205c16 Mon Sep 17 00:00:00 2001 From: David Orel Date: Mon, 25 May 2026 18:35:31 +0200 Subject: [PATCH] fix: Updates type annotations to use Optional instead of union syntax Changes type annotations for the scheduler parameter from union syntax (`AsyncIOScheduler | None`) to the `Optional` generic type for consistency across the codebase. Also adds `Optional` to the typing imports. --- taskiq_flow/scheduling/scheduler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/taskiq_flow/scheduling/scheduler.py b/taskiq_flow/scheduling/scheduler.py index 00042e5..5fc3a02 100644 --- a/taskiq_flow/scheduling/scheduler.py +++ b/taskiq_flow/scheduling/scheduler.py @@ -13,7 +13,7 @@ import logging from datetime import datetime -from typing import Any, cast +from typing import Any, Optional, cast from taskiq import AsyncBroker @@ -381,7 +381,7 @@ class PipelineScheduler: def __init__( self, broker: AsyncBroker, - scheduler: AsyncIOScheduler | None = None, + scheduler: Optional[AsyncIOScheduler] = None, job_store_url: str | None = None, ) -> None: if AsyncIOScheduler is None: