@@ -35,7 +35,7 @@ SPECREX: Final[re.Pattern[str]]
3535DEVNULL : Final [str ]
3636WEEK_ENUM : Final [list [str ]]
3737MONTH_ENUM : Final [list [str | None ]]
38- SPECIALS_CONVERSION : Final [ bool ]
38+ SPECIALS_CONVERSION : bool | None
3939SPECIALS : Final [dict [str , str ]]
4040SPECIAL_IGNORE : Final [list [str ]]
4141S_INFO : Final [list [dict [str , str | int | list [str ] | list [str | None ]]]]
@@ -96,7 +96,8 @@ class CronTab:
9696 # Usually `kwargs` are just `now: datetime | None`, but technically this can
9797 # work for `CronItem` subclasses, which might define other kwargs.
9898 def run_pending (self , * , now : datetime | None = None , ** kwargs : Any ) -> Iterator [str ]: ...
99- def run_scheduler (self , timeout : int = - 1 , cadence : int = 60 , warp : bool = False ) -> Iterator [str ]: ...
99+ def run_scheduler (self , timeout : int = - 1 , cadence : int | float = 60 , warp : bool = False ) -> Iterator [str ]: ...
100+ async def run_scheduler_async (self , timeout : int = - 1 , cadence : int | float = 60 , warp : bool = False ) -> Iterator [str ]: ...
100101 def render (self , errors : bool = False ) -> str : ...
101102 def new (
102103 self ,
@@ -279,15 +280,16 @@ class CronSlice:
279280 def parse (self , value : str | None ) -> None : ...
280281 def render (self , resolve : bool = False ) -> str : ...
281282 def __eq__ (self , arg : object ) -> bool : ...
282- def every (self , n_value : int , also : bool = False ) -> _Part : ...
283+ def every (self , n_value : int , also : bool = False , random : bool = False ) -> _Part : ...
283284 # The only known kwarg, others are unused,
284285 # `*args`` are passed to `parse_value`, so they are `Any`
285286 def on (self , * n_value : Any , also : bool = False ) -> list [_Part ]: ...
286- def during (self , vfrom : int | str , vto : int | str , also : bool = False ) -> _Part : ...
287+ def during (self , vfrom : int | str , vto : int | str , also : bool = False , random : bool = False ) -> _Part : ...
288+ def random_during (self , vfrom : int | str , vto : int | str ) -> _Part : ...
287289 @property
288290 def also (self ) -> Also : ...
289291 def clear (self ) -> None : ...
290- def get_range (self , * vrange : int | str | CronValue ) -> list [int | CronRange ]: ...
292+ def get_range (self , * vrange : int | str | CronValue , random : bool = False ) -> list [int | CronRange ]: ...
291293 def __iter__ (self ) -> Iterator [int ]: ...
292294 def __len__ (self ) -> int : ...
293295 def parse_value (self , val : str , sunday : int | None = None ) -> int | CronValue : ...
@@ -307,7 +309,8 @@ class CronRange:
307309 slice : str
308310 cron : CronTab | None
309311 seq : int
310- def __init__ (self , vslice : str , * vrange : int | str | CronValue ) -> None : ...
312+ is_random_range : bool
313+ def __init__ (self , vslice : str , * vrange : int | str | CronValue , random : bool = False ) -> None : ...
311314 # Are not set in `__init__`:
312315 vfrom : int | CronValue
313316 vto : int | CronValue
0 commit comments