Skip to content

Commit c1613b2

Browse files
authored
[stubsabot] Bump python-crontab to 3.3.* (#14409)
1 parent 9a0eaf8 commit c1613b2

File tree

3 files changed

+25
-20
lines changed

3 files changed

+25
-20
lines changed

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.2.*"
1+
version = "3.3.*"
22
upstream_repository = "https://gitlab.com/doctormo/python-crontab"
33
requires = ["types-croniter"]

stubs/python-crontab/cronlog.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from _typeshed import StrOrBytesPath
22
from codecs import StreamReaderWriter
33
from collections.abc import Generator, Iterator
4+
from datetime import datetime
45
from types import TracebackType
56
from typing_extensions import Self
67

@@ -20,6 +21,8 @@ class LogReader:
2021
def __iter__(self) -> Iterator[str]: ...
2122
def readlines(self, until: int = ...) -> Generator[tuple[int, str], None, None]: ...
2223

24+
def cron_date_to_datetime(cron_str: str) -> datetime: ...
25+
2326
class CronLog(LogReader):
2427
user: str | None
2528
def __init__(self, filename: StrOrBytesPath = ..., user: str | None = ...) -> None: ...

stubs/python-crontab/crontab.pyi

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ from collections.abc import Callable, Generator, Iterable, Iterator
77
from datetime import datetime
88
from logging import Logger
99
from types import TracebackType
10-
from typing import Any, Literal, Protocol, SupportsIndex, TypeVar, overload, type_check_only
10+
from typing import Any, Final, Literal, Protocol, SupportsIndex, TypeVar, overload, type_check_only
1111
from typing_extensions import Self, TypeAlias
1212

1313
from croniter.croniter import croniter
@@ -28,22 +28,24 @@ class _Options(Protocol):
2828
locale_code: str | None
2929
def __init__(self) -> None: ...
3030

31-
__pkgname__: str
32-
ITEMREX: re.Pattern[str]
33-
SPECREX: re.Pattern[str]
34-
DEVNULL: str
35-
WEEK_ENUM: list[str]
36-
MONTH_ENUM: list[str | None]
37-
SPECIALS: dict[str, str]
38-
SPECIAL_IGNORE: list[str]
39-
S_INFO: list[dict[str, str | int | list[str] | list[str | None]]]
40-
WINOS: bool
41-
POSIX: bool
42-
SYSTEMV: bool
43-
ZERO_PAD: bool
31+
__pkgname__: Final[str]
32+
__version__: Final[str]
33+
ITEMREX: Final[re.Pattern[str]]
34+
SPECREX: Final[re.Pattern[str]]
35+
DEVNULL: Final[str]
36+
WEEK_ENUM: Final[list[str]]
37+
MONTH_ENUM: Final[list[str | None]]
38+
SPECIALS_CONVERSION: Final[bool]
39+
SPECIALS: Final[dict[str, str]]
40+
SPECIAL_IGNORE: Final[list[str]]
41+
S_INFO: Final[list[dict[str, str | int | list[str] | list[str | None]]]]
42+
WINOS: Final[bool]
43+
POSIX: Final[bool]
44+
SYSTEMV: Final[bool]
45+
ZERO_PAD: Final[bool]
4446
LOG: Logger
45-
CRON_COMMAND: str
46-
SHELL: str
47+
CRON_COMMAND: Final[str]
48+
SHELL: Final[str]
4749
current_user: Callable[[], str | None]
4850

4951
class Process:
@@ -95,7 +97,7 @@ class CronTab:
9597
# work for `CronItem` subclasses, which might define other kwargs.
9698
def run_pending(self, *, now: datetime | None = ..., **kwargs: Any) -> Iterator[str]: ...
9799
def run_scheduler(self, timeout: int = -1, cadence: int = 60, warp: bool = False) -> Iterator[str]: ...
98-
def render(self, errors: bool = ..., specials: bool | None = ...) -> str: ...
100+
def render(self, errors: bool = ...) -> str: ...
99101
def new(
100102
self,
101103
command: str = ...,
@@ -147,7 +149,7 @@ class CronItem:
147149
def enable(self, enabled: bool = ...) -> bool: ...
148150
def is_enabled(self) -> bool: ...
149151
def is_valid(self) -> bool: ...
150-
def render(self, specials: bool = ...) -> str: ...
152+
def render(self) -> str: ...
151153
def every_reboot(self) -> None: ...
152154
def every(self, unit: int = ...) -> Every: ...
153155
def setall(self, *args: Any) -> None: ...
@@ -224,7 +226,7 @@ class CronSlices(list[CronSlice]):
224226
def is_valid(cls, *args: Any) -> bool: ...
225227
def setall(self, *slices: str) -> None: ...
226228
def clean_render(self) -> str: ...
227-
def render(self, specials: bool = ...) -> str: ...
229+
def render(self) -> str: ...
228230
def clear(self) -> None: ...
229231
def frequency(self, year: int | None = ...) -> int: ...
230232
def frequency_per_year(self, year: int | None = ...) -> int: ...

0 commit comments

Comments
 (0)