From 67161ca7b0cbcd2a37a51c7fd8fcfdbe0c577293 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Wed, 25 Oct 2023 14:14:17 +0200 Subject: Format: Run Black --- wrappers/python/eduvpn_common/event.py | 1 + wrappers/python/eduvpn_common/main.py | 4 +--- wrappers/python/eduvpn_common/server.py | 12 ++++++++---- 3 files changed, 10 insertions(+), 7 deletions(-) (limited to 'wrappers/python/eduvpn_common') diff --git a/wrappers/python/eduvpn_common/event.py b/wrappers/python/eduvpn_common/event.py index 746a0c9..d18dd40 100644 --- a/wrappers/python/eduvpn_common/event.py +++ b/wrappers/python/eduvpn_common/event.py @@ -13,6 +13,7 @@ from eduvpn_common.types import get_ptr_string # The attribute that callback functions get EDUVPN_CALLBACK_PROPERTY = "_eduvpn_property_callback" + # A state transition decorator for classes # To use this, make sure to register the class with `register_class_callbacks` def class_state_transition(state: int, state_type: StateType) -> Callable: diff --git a/wrappers/python/eduvpn_common/main.py b/wrappers/python/eduvpn_common/main.py index 74ff52d..0bf4d07 100644 --- a/wrappers/python/eduvpn_common/main.py +++ b/wrappers/python/eduvpn_common/main.py @@ -610,9 +610,7 @@ def token_callback(name: bytes, srv, tok): obj = eduvpn_objects[name_decoded] srv_conv = get_transition_server(obj.lib, srv) tok_conv = get_tokens(obj.lib, tok) - obj.token_callback( - srv_conv, tok_conv - ) + obj.token_callback(srv_conv, tok_conv) @VPNStateChange diff --git a/wrappers/python/eduvpn_common/server.py b/wrappers/python/eduvpn_common/server.py index 1ed0752..6760b40 100644 --- a/wrappers/python/eduvpn_common/server.py +++ b/wrappers/python/eduvpn_common/server.py @@ -21,7 +21,13 @@ class Profile: :param: search_domains: List[str]: The list of DNS search domains """ - def __init__(self, identifier: str, display_name: str, default_gateway: bool, dns_search_domains: List[str]): + def __init__( + self, + identifier: str, + display_name: str, + default_gateway: bool, + dns_search_domains: List[str], + ): self.identifier = identifier self.display_name = display_name self.default_gateway = default_gateway @@ -405,9 +411,7 @@ def get_tokens(lib: CDLL, ptr: c_void_p) -> Optional[Token]: refresh = toks.refresh.decode("utf-8") expired = toks.expired lib.FreeTokens(ptr) - return Token( - access, refresh, expired - ) + return Token(access, refresh, expired) return None -- cgit v1.2.3