diff --git a/durationpy/__init__.pyi b/durationpy/__init__.pyi new file mode 100644 index 0000000..61b460e --- /dev/null +++ b/durationpy/__init__.pyi @@ -0,0 +1,6 @@ +import datetime + +def from_str(duration: str) -> datetime.timedelta: ... +def to_str(delta: datetime.timedelta, extended: bool = ...) -> str: ... + +class DurationError(ValueError): ... diff --git a/durationpy/py.typed b/durationpy/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/setup.py b/setup.py index 2f68c23..18d2ae9 100644 --- a/setup.py +++ b/setup.py @@ -9,5 +9,6 @@ download_url = 'https://github.com/icholy/durationpy/tarball/0.9', version = '0.9', packages = ['durationpy'], + package_data = {'durationpy': ['py.typed', '*.pyi']}, license = 'MIT' )