Add stubs for python-datemath (#5765)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
kasium
2023-01-11 01:04:07 +01:00
committed by GitHub
parent e2d67bf703
commit 5e1632be49
3 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
from datetime import datetime
import arrow
from .helpers import DateMathException as DateMathException, parse as parse
def dm(
expr: str, *, now: arrow.Arrow | None = ..., tz: str = ..., type: str | None = ..., roundDown: bool = ...
) -> arrow.Arrow: ...
def datemath(
expr: str, *, now: arrow.Arrow | None = ..., tz: str = ..., type: str | None = ..., roundDown: bool = ...
) -> datetime: ...

View File

@@ -0,0 +1,10 @@
from _typeshed import Incomplete
import arrow
class DateMathException(Exception): ...
def parse(
expression: str, now: arrow.Arrow | None = ..., tz: str = ..., type: str | None = ..., roundDown: bool = ...
) -> arrow.Arrow: ...
def __getattr__(name: str) -> Incomplete: ...