mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Add stubs for python-datemath (#5765)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
3
stubs/python-datemath/METADATA.toml
Normal file
3
stubs/python-datemath/METADATA.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
version = "1.5.*"
|
||||
# Requires a version of arrow with a `py.typed` file
|
||||
requires = ["arrow>=1.0.1"]
|
||||
12
stubs/python-datemath/datemath/__init__.pyi
Normal file
12
stubs/python-datemath/datemath/__init__.pyi
Normal 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: ...
|
||||
10
stubs/python-datemath/datemath/helpers.pyi
Normal file
10
stubs/python-datemath/datemath/helpers.pyi
Normal 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: ...
|
||||
Reference in New Issue
Block a user