annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
46
c21d1c2c84e1 - removed pydc.py wrapper overhead (which only called pydcext.so functions, directly, anyways)
Tassilo Philipp
parents:
diff changeset
1 import sys
c21d1c2c84e1 - removed pydc.py wrapper overhead (which only called pydcext.so functions, directly, anyways)
Tassilo Philipp
parents:
diff changeset
2 from typing import Optional, Any, TypeVar
c21d1c2c84e1 - removed pydc.py wrapper overhead (which only called pydcext.so functions, directly, anyways)
Tassilo Philipp
parents:
diff changeset
3
47
44045db8fa5f PyCObject/PyCapsule not usable as type annotation
Tassilo Philipp
parents: 46
diff changeset
4 # Handle type, depending on python version this is either internal type
44045db8fa5f PyCObject/PyCapsule not usable as type annotation
Tassilo Philipp
parents: 46
diff changeset
5 # PyCObject or PyCapsule, neither of one can be used as annotation
44045db8fa5f PyCObject/PyCapsule not usable as type annotation
Tassilo Philipp
parents: 46
diff changeset
6 H = TypeVar('H')
46
c21d1c2c84e1 - removed pydc.py wrapper overhead (which only called pydcext.so functions, directly, anyways)
Tassilo Philipp
parents:
diff changeset
7
c21d1c2c84e1 - removed pydc.py wrapper overhead (which only called pydcext.so functions, directly, anyways)
Tassilo Philipp
parents:
diff changeset
8 def load(libpath: Optional[str]) -> H: ...
c21d1c2c84e1 - removed pydc.py wrapper overhead (which only called pydcext.so functions, directly, anyways)
Tassilo Philipp
parents:
diff changeset
9 def find(libhandle: H, symbol: str) -> H: ...
c21d1c2c84e1 - removed pydc.py wrapper overhead (which only called pydcext.so functions, directly, anyways)
Tassilo Philipp
parents:
diff changeset
10 def free(libhandle: H) -> None: ...
c21d1c2c84e1 - removed pydc.py wrapper overhead (which only called pydcext.so functions, directly, anyways)
Tassilo Philipp
parents:
diff changeset
11 def get_path(libhandle: Optional[H]) -> str: ...
c21d1c2c84e1 - removed pydc.py wrapper overhead (which only called pydcext.so functions, directly, anyways)
Tassilo Philipp
parents:
diff changeset
12 def call(funcptr: H, signature: str, *arguments: Any) -> Any: ...
c21d1c2c84e1 - removed pydc.py wrapper overhead (which only called pydcext.so functions, directly, anyways)
Tassilo Philipp
parents:
diff changeset
13