Skip to content

Commit d6dfe6e

Browse files
authored
[python-crontab] Update to 3.4.* (#16321)
1 parent e40bd5a commit d6dfe6e

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

stubs/python-crontab/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version = "3.3.*"
1+
version = "3.4.*"
22
upstream-repository = "https://gitlab.com/doctormo/python-crontab"
33
dependencies = ["types-croniter"]

stubs/python-crontab/crontab.pyi

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ SPECREX: Final[re.Pattern[str]]
3535
DEVNULL: Final[str]
3636
WEEK_ENUM: Final[list[str]]
3737
MONTH_ENUM: Final[list[str | None]]
38-
SPECIALS_CONVERSION: Final[bool]
38+
SPECIALS_CONVERSION: bool | None
3939
SPECIALS: Final[dict[str, str]]
4040
SPECIAL_IGNORE: Final[list[str]]
4141
S_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

Comments
 (0)