From 5137d7ea3bf3356f917f6ccf44610cc23ea6492b Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Fri, 14 Oct 2022 15:08:37 +0200 Subject: Python: Run black --- wrappers/python/eduvpn_common/main.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'wrappers/python/eduvpn_common/main.py') diff --git a/wrappers/python/eduvpn_common/main.py b/wrappers/python/eduvpn_common/main.py index c48fce1..b581c5e 100644 --- a/wrappers/python/eduvpn_common/main.py +++ b/wrappers/python/eduvpn_common/main.py @@ -7,8 +7,7 @@ from eduvpn_common.event import EventHandler from eduvpn_common.loader import initialize_functions, load_lib 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) +from eduvpn_common.types import VPNStateChange, decode_res, encode_args, get_data_error class EduVPN(object): @@ -64,7 +63,11 @@ class EduVPN(object): raise Exception("Already registered") register_err = self.go_function( - self.lib.Register, self.config_directory, self.language, state_callback, debug + self.lib.Register, + self.config_directory, + self.language, + state_callback, + debug, ) if register_err: @@ -262,6 +265,7 @@ class EduVPN(object): return servers + eduvpn_objects: Dict[str, EduVPN] = {} @@ -273,7 +277,6 @@ def state_callback(name: bytes, old_state: int, new_state: int, data: Any): eduvpn_objects[name_decoded].callback(State(old_state), State(new_state), data) - def add_as_global_object(eduvpn: EduVPN) -> bool: global eduvpn_objects if eduvpn.name not in eduvpn_objects: @@ -285,4 +288,3 @@ def add_as_global_object(eduvpn: EduVPN) -> bool: def remove_as_global_object(eduvpn: EduVPN): global eduvpn_objects eduvpn_objects.pop(eduvpn.name, None) - -- cgit v1.2.3