diff python/pydc/pydc.pyi @ 50:edf5c85de5ac

put pyi next to so for mypy to pick it up, directly
author Tassilo Philipp
date Sat, 14 Nov 2020 21:18:09 +0100
parents python/pydc/pydc-stubs/pydc.pyi@44045db8fa5f
children 918dab7a6606
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/python/pydc/pydc.pyi	Sat Nov 14 21:18:09 2020 +0100
@@ -0,0 +1,13 @@
+import sys
+from typing import Optional, Any, TypeVar
+
+# Handle type, depending on python version this is either internal type
+# PyCObject or PyCapsule, neither of one can be used as annotation
+H = TypeVar('H')
+
+def load(libpath: Optional[str]) -> H: ...
+def find(libhandle: H, symbol: str) -> H: ...
+def free(libhandle: H) -> None: ...
+def get_path(libhandle: Optional[H]) -> str: ...
+def call(funcptr: H, signature: str, *arguments: Any) -> Any: ...
+