ci: add pre-commit and tests workflows
This commit is contained in:
parent
ee43046e59
commit
bdb5c984fa
13 changed files with 339 additions and 297 deletions
|
|
@ -2,14 +2,16 @@ import sys
|
|||
from collections.abc import Callable
|
||||
from functools import wraps
|
||||
|
||||
import pendulum
|
||||
from pendulum.tz import local_timezone
|
||||
from rich import print
|
||||
from whenever import Instant
|
||||
|
||||
|
||||
def now():
|
||||
tz = local_timezone()
|
||||
return pendulum.now(tz) # type: ignore[reportArgumentType]
|
||||
return Instant.now()
|
||||
|
||||
|
||||
def now_as_date():
|
||||
return now().py_datetime().date()
|
||||
|
||||
|
||||
def capture(fn: Callable):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue