summaryrefslogtreecommitdiff
path: root/wrappers/python/eduvpn_common
diff options
context:
space:
mode:
Diffstat (limited to 'wrappers/python/eduvpn_common')
-rw-r--r--wrappers/python/eduvpn_common/discovery.py10
-rw-r--r--wrappers/python/eduvpn_common/event.py13
-rw-r--r--wrappers/python/eduvpn_common/loader.py10
-rw-r--r--wrappers/python/eduvpn_common/main.py7
-rw-r--r--wrappers/python/eduvpn_common/server.py8
-rw-r--r--wrappers/python/eduvpn_common/types.py6
6 files changed, 30 insertions, 24 deletions
diff --git a/wrappers/python/eduvpn_common/discovery.py b/wrappers/python/eduvpn_common/discovery.py
index 3a1cbe6..91f29bd 100644
--- a/wrappers/python/eduvpn_common/discovery.py
+++ b/wrappers/python/eduvpn_common/discovery.py
@@ -1,9 +1,7 @@
-from eduvpn_common.types import (
- cDiscoveryOrganizations,
- cDiscoveryServers,
- get_ptr_list_strings,
-)
-from ctypes import cast, POINTER
+from ctypes import POINTER, cast
+
+from eduvpn_common.types import (cDiscoveryOrganizations, cDiscoveryServers,
+ get_ptr_list_strings)
class DiscoOrganization:
diff --git a/wrappers/python/eduvpn_common/event.py b/wrappers/python/eduvpn_common/event.py
index 1e42ef4..940d0c0 100644
--- a/wrappers/python/eduvpn_common/event.py
+++ b/wrappers/python/eduvpn_common/event.py
@@ -1,15 +1,12 @@
-from ctypes import c_void_p, CDLL
+from ctypes import CDLL, c_void_p
from typing import Any, Callable, Dict, List, Tuple
+
+from eduvpn_common.server import (get_locations, get_servers,
+ get_transition_profiles,
+ get_transition_server)
from eduvpn_common.state import State, StateType
-from eduvpn_common.server import (
- get_locations,
- get_transition_profiles,
- get_transition_server,
- get_servers,
-)
from eduvpn_common.types import get_ptr_string
-
EDUVPN_CALLBACK_PROPERTY = "_eduvpn_property_callback"
# A state transition decorator for classes
diff --git a/wrappers/python/eduvpn_common/loader.py b/wrappers/python/eduvpn_common/loader.py
index a5eec3f..55adcb8 100644
--- a/wrappers/python/eduvpn_common/loader.py
+++ b/wrappers/python/eduvpn_common/loader.py
@@ -1,9 +1,13 @@
-from ctypes import cdll, CDLL, c_char_p, c_int, c_void_p
-from collections import defaultdict
import pathlib
import platform
+from collections import defaultdict
+from ctypes import CDLL, c_char_p, c_int, c_void_p, cdll
+
from eduvpn_common import __version__
-from eduvpn_common.types import cError, cServer, cServers, cServerProfiles, cServerLocations, cDiscoveryServer, cDiscoveryServers, ConfigError, DataError, VPNStateChange
+from eduvpn_common.types import (ConfigError, DataError, VPNStateChange,
+ cDiscoveryServer, cDiscoveryServers, cError,
+ cServer, cServerLocations, cServerProfiles,
+ cServers)
def load_lib():
diff --git a/wrappers/python/eduvpn_common/main.py b/wrappers/python/eduvpn_common/main.py
index 1271fb2..c48fce1 100644
--- a/wrappers/python/eduvpn_common/main.py
+++ b/wrappers/python/eduvpn_common/main.py
@@ -1,12 +1,15 @@
+import threading
from ctypes import c_char_p, c_int, c_void_p
from typing import Any, Callable, Dict, Optional, Tuple
-import threading
+
from eduvpn_common.discovery import get_disco_organizations, get_disco_servers
from eduvpn_common.event import EventHandler
from eduvpn_common.loader import initialize_functions, load_lib
-from eduvpn_common.types import VPNStateChange, encode_args, decode_res, get_data_error
from eduvpn_common.server import get_servers
from eduvpn_common.state import State, StateType
+from eduvpn_common.types import (VPNStateChange, decode_res, encode_args,
+ get_data_error)
+
class EduVPN(object):
def __init__(self, name: str, config_directory: str, language: str):
diff --git a/wrappers/python/eduvpn_common/server.py b/wrappers/python/eduvpn_common/server.py
index 01b5204..8dac3c1 100644
--- a/wrappers/python/eduvpn_common/server.py
+++ b/wrappers/python/eduvpn_common/server.py
@@ -1,7 +1,9 @@
-from typing import List, Optional, Type
-from eduvpn_common.types import cServer, cServers, cServerLocations, cServerProfiles
-from ctypes import c_void_p, cast, POINTER, CDLL
+from ctypes import CDLL, POINTER, c_void_p, cast
from datetime import datetime
+from typing import List, Optional, Type
+
+from eduvpn_common.types import (cServer, cServerLocations, cServerProfiles,
+ cServers)
class Profile:
diff --git a/wrappers/python/eduvpn_common/types.py b/wrappers/python/eduvpn_common/types.py
index 82987c0..6d647f1 100644
--- a/wrappers/python/eduvpn_common/types.py
+++ b/wrappers/python/eduvpn_common/types.py
@@ -1,7 +1,9 @@
-from ctypes import Structure, c_int, c_char_p, c_size_t, c_ulonglong, c_void_p, CFUNCTYPE, POINTER, CDLL, cast, pointer
-from eduvpn_common.error import ErrorLevel, WrappedError
+from ctypes import (CDLL, CFUNCTYPE, POINTER, Structure, c_char_p, c_int,
+ c_size_t, c_ulonglong, c_void_p, cast, pointer)
from typing import Any, Callable, Iterator, List, Optional, Tuple
+from eduvpn_common.error import ErrorLevel, WrappedError
+
class cError(Structure):
_fields_ = [