Skip to content

Commit 10f0439

Browse files
committed
🐛 version 0.10.2
fix crontier dependency
1 parent b7decee commit 10f0439

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

arclet/entari/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@
6464
WH = WebhookInfo
6565
filter_ = Filter
6666

67-
__version__ = "0.10.1"
67+
__version__ = "0.10.2"

arclet/entari/scheduler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from arclet.letoderea import es
88
from arclet.letoderea.typing import Contexts
9-
from croniter import croniter
109
from launart import Launart, Service, any_completed
1110
from launart.status import Phase
1211

@@ -186,6 +185,10 @@ def crontab(cron_str: str):
186185
Args:
187186
cron_str (str): cron 表达式
188187
"""
188+
try:
189+
from croniter import croniter
190+
except ImportError:
191+
raise ImportError("Please install croniter to use cron expression") from None
189192

190193
it = croniter(cron_str, datetime.now())
191194

pdm.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "arclet-entari"
3-
version = "0.10.1"
3+
version = "0.10.2"
44
description = "Simple IM Framework based on satori-python"
55
authors = [
66
{name = "RF-Tar-Railt",email = "[email protected]"},
@@ -25,6 +25,9 @@ classifiers = [
2525

2626
[project.optional-dependencies]
2727
yaml = ["pyyaml>=6.0.2"]
28+
cron = [
29+
"croniter>=5.0.1",
30+
]
2831

2932
[project.scripts]
3033
entari = "arclet.entari.__main__:main"
@@ -45,7 +48,6 @@ dev = [
4548
"fix-future-annotations>=0.5.0",
4649
"watchfiles>=0.24.0",
4750
"pyyaml>=6.0.2",
48-
"croniter>=5.0.1",
4951
]
5052
[tool.black]
5153
line-length = 120

0 commit comments

Comments
 (0)