From ef224e5dad25debf4526f2fb017bd771a60448dd Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Fri, 14 Oct 2022 15:06:36 +0200 Subject: Python: Proper type annotations --- wrappers/python/eduvpn_common/loader.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'wrappers/python/eduvpn_common/loader.py') diff --git a/wrappers/python/eduvpn_common/loader.py b/wrappers/python/eduvpn_common/loader.py index 23851f3..a5eec3f 100644 --- a/wrappers/python/eduvpn_common/loader.py +++ b/wrappers/python/eduvpn_common/loader.py @@ -1,9 +1,9 @@ -from ctypes import * +from ctypes import cdll, CDLL, c_char_p, c_int, c_void_p from collections import defaultdict import pathlib import platform from eduvpn_common import __version__ -from eduvpn_common.types import * +from eduvpn_common.types import cError, cServer, cServers, cServerProfiles, cServerLocations, cDiscoveryServer, cDiscoveryServers, ConfigError, DataError, VPNStateChange def load_lib(): @@ -39,7 +39,7 @@ def load_lib(): return lib -def initialize_functions(lib): +def initialize_functions(lib: CDLL): # Exposed functions # We have to use c_void_p instead of c_char_p to free it properly # See https://stackoverflow.com/questions/13445568/python-ctypes-how-to-free-memory-getting-invalid-pointer-error -- cgit v1.2.3