Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stubs/python-crontab/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version = "3.3.*"
version = "3.4.*"
upstream-repository = "https://gitlab.com/doctormo/python-crontab"
dependencies = ["types-croniter"]
15 changes: 9 additions & 6 deletions stubs/python-crontab/crontab.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ SPECREX: Final[re.Pattern[str]]
DEVNULL: Final[str]
WEEK_ENUM: Final[list[str]]
MONTH_ENUM: Final[list[str | None]]
SPECIALS_CONVERSION: Final[bool]
SPECIALS_CONVERSION: bool | None

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SPECIALS: Final[dict[str, str]]
SPECIAL_IGNORE: Final[list[str]]
S_INFO: Final[list[dict[str, str | int | list[str] | list[str | None]]]]
Expand Down Expand Up @@ -96,7 +96,8 @@ class CronTab:
# Usually `kwargs` are just `now: datetime | None`, but technically this can
# work for `CronItem` subclasses, which might define other kwargs.
def run_pending(self, *, now: datetime | None = None, **kwargs: Any) -> Iterator[str]: ...
def run_scheduler(self, timeout: int = -1, cadence: int = 60, warp: bool = False) -> Iterator[str]: ...
def run_scheduler(self, timeout: int = -1, cadence: int | float = 60, warp: bool = False) -> Iterator[str]: ...
async def run_scheduler_async(self, timeout: int = -1, cadence: int | float = 60, warp: bool = False) -> Iterator[str]: ...
def render(self, errors: bool = False) -> str: ...
def new(
self,
Expand Down Expand Up @@ -279,15 +280,16 @@ class CronSlice:
def parse(self, value: str | None) -> None: ...
def render(self, resolve: bool = False) -> str: ...
def __eq__(self, arg: object) -> bool: ...
def every(self, n_value: int, also: bool = False) -> _Part: ...
def every(self, n_value: int, also: bool = False, random: bool = False) -> _Part: ...
# The only known kwarg, others are unused,
# `*args`` are passed to `parse_value`, so they are `Any`
def on(self, *n_value: Any, also: bool = False) -> list[_Part]: ...
def during(self, vfrom: int | str, vto: int | str, also: bool = False) -> _Part: ...
def during(self, vfrom: int | str, vto: int | str, also: bool = False, random: bool = False) -> _Part: ...
def random_during(self, vfrom: int | str, vto: int | str) -> _Part: ...
@property
def also(self) -> Also: ...
def clear(self) -> None: ...
def get_range(self, *vrange: int | str | CronValue) -> list[int | CronRange]: ...
def get_range(self, *vrange: int | str | CronValue, random: bool = False) -> list[int | CronRange]: ...
def __iter__(self) -> Iterator[int]: ...
def __len__(self) -> int: ...
def parse_value(self, val: str, sunday: int | None = None) -> int | CronValue: ...
Expand All @@ -307,7 +309,8 @@ class CronRange:
slice: str
cron: CronTab | None
seq: int
def __init__(self, vslice: str, *vrange: int | str | CronValue) -> None: ...
is_random_range: bool
def __init__(self, vslice: str, *vrange: int | str | CronValue, random: bool = False) -> None: ...
# Are not set in `__init__`:
vfrom: int | CronValue
vto: int | CronValue
Expand Down