view 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
line wrap: on
line source

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: ...