diff options
author | Daniel Schadt <kingdread@gmx.de> | 2025-08-12 21:00:46 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2025-08-12 21:00:46 +0200 |
commit | e888344ba561bc6a52f96f7a7bc2ad24be287a82 (patch) | |
tree | 9ef388ad197a89b48a02a6e5a88529d15e68036b | |
parent | 6da6f0b5ce4cfb41aaf79699e289be678007e2ad (diff) | |
download | hittekaart-e888344ba561bc6a52f96f7a7bc2ad24be287a82.tar.gz hittekaart-e888344ba561bc6a52f96f7a7bc2ad24be287a82.tar.bz2 hittekaart-e888344ba561bc6a52f96f7a7bc2ad24be287a82.zip |
add type hintspy
It seems like the "simple" way with just the pyi file doesn't work, so
we need to add the py.typed manually.
Also, enjoy this path:
hittekaart/hittekaart-py/hittekaart_py/hittekaart_py.pyi
-rw-r--r-- | hittekaart-py/hittekaart_py/__init__.py | 1 | ||||
-rw-r--r-- | hittekaart-py/hittekaart_py/hittekaart_py.pyi | 43 | ||||
-rw-r--r-- | hittekaart-py/hittekaart_py/py.typed | 0 |
3 files changed, 44 insertions, 0 deletions
diff --git a/hittekaart-py/hittekaart_py/__init__.py b/hittekaart-py/hittekaart_py/__init__.py new file mode 100644 index 0000000..039ffd1 --- /dev/null +++ b/hittekaart-py/hittekaart_py/__init__.py @@ -0,0 +1 @@ +from .hittekaart_py import * diff --git a/hittekaart-py/hittekaart_py/hittekaart_py.pyi b/hittekaart-py/hittekaart_py/hittekaart_py.pyi new file mode 100644 index 0000000..0efe011 --- /dev/null +++ b/hittekaart-py/hittekaart_py/hittekaart_py.pyi @@ -0,0 +1,43 @@ +from typing import Iterable + + +class Track: + @staticmethod + def from_file(path: bytes, compression: str | None) -> "Track": ... + + @staticmethod + def from_coordinates(coordinates: list[tuple[float, float]]) -> "Track": ... + + +class Storage: + @staticmethod + def Folder(path: bytes) -> "Storage": ... + + @staticmethod + def Sqlite(path: bytes) -> "Storage": ... + + +class HeatmapRenderer: + def __new__(cls) -> "HeatmapRenderer": ... + + +class MarktileRenderer: + def __new__(cls) -> "MarktileRenderer": ... + + +class TilehuntRenderer: + def __new__(cls, zoom: int) -> "TilehuntRenderer": ... + + +class Settings: + min_zoom: int + max_zoom: int + threads: int + def __new__(cls, min_zoom: int=0, max_zoom: int=19, threads: int=0) -> "Settings": ... + + +def generate(settings: Settings, items: Iterable[Track], renderer: HeatmapRenderer | MarktileRenderer | TilehuntRenderer, storage: Storage): ... + + +class HitteError(Exception): + ... diff --git a/hittekaart-py/hittekaart_py/py.typed b/hittekaart-py/hittekaart_py/py.typed new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/hittekaart-py/hittekaart_py/py.typed |