annotate python/pydc/pydc-stubs/pydc.pyi @ 47:44045db8fa5f

PyCObject/PyCapsule not usable as type annotation
author Tassilo Philipp
date Fri, 13 Nov 2020 18:04:05 +0100
parents c21d1c2c84e1
children
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