From 4e7d42986b333147bbc89508c3ebeb9cc289374d Mon Sep 17 00:00:00 2001 From: Jeroen Wijenbergh Date: Wed, 8 May 2024 11:52:35 +0200 Subject: Format: Run Ruff & isort --- internal/verify/test_data/generate_forged.py | 2 +- selenium_eduvpn.py | 1 + wrappers/python/eduvpn_common/loader.py | 2 +- wrappers/python/eduvpn_common/types.py | 16 +++++++++++++++- wrappers/python/example/main.py | 11 ++++++----- wrappers/python/tests.py | 9 +++++---- 6 files changed, 29 insertions(+), 12 deletions(-) diff --git a/internal/verify/test_data/generate_forged.py b/internal/verify/test_data/generate_forged.py index 0040161..a2bf1c6 100644 --- a/internal/verify/test_data/generate_forged.py +++ b/internal/verify/test_data/generate_forged.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import hashlib import base64 +import hashlib # Hash server_list.json diff --git a/selenium_eduvpn.py b/selenium_eduvpn.py index 2f452a0..605bc54 100644 --- a/selenium_eduvpn.py +++ b/selenium_eduvpn.py @@ -1,5 +1,6 @@ import os import sys + from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.firefox.options import Options diff --git a/wrappers/python/eduvpn_common/loader.py b/wrappers/python/eduvpn_common/loader.py index d258dab..08179ee 100644 --- a/wrappers/python/eduvpn_common/loader.py +++ b/wrappers/python/eduvpn_common/loader.py @@ -1,5 +1,5 @@ import pathlib -from ctypes import CDLL, c_char_p, c_int, c_longlong, c_void_p, cdll, POINTER +from ctypes import CDLL, POINTER, c_char_p, c_int, c_longlong, c_void_p, cdll from eduvpn_common import __version__ from eduvpn_common.types import ( diff --git a/wrappers/python/eduvpn_common/types.py b/wrappers/python/eduvpn_common/types.py index e9a1e86..21690fb 100644 --- a/wrappers/python/eduvpn_common/types.py +++ b/wrappers/python/eduvpn_common/types.py @@ -1,4 +1,18 @@ -from ctypes import CDLL, CFUNCTYPE, POINTER, Structure, byref, c_char, c_char_p, c_int, c_longlong, c_size_t, c_ulonglong, c_void_p, cast +from ctypes import ( + CDLL, + CFUNCTYPE, + POINTER, + Structure, + byref, + c_char, + c_char_p, + c_int, + c_longlong, + c_size_t, + c_ulonglong, + c_void_p, + cast, +) from typing import Any, Iterator, List, Optional, Tuple diff --git a/wrappers/python/example/main.py b/wrappers/python/example/main.py index f6103bb..8008592 100644 --- a/wrappers/python/example/main.py +++ b/wrappers/python/example/main.py @@ -1,10 +1,11 @@ -from eduvpn_common import __version__ as commonver +import sys +import webbrowser +from typing import List, Optional, Tuple + import eduvpn_common.main as eduvpn -from eduvpn_common.state import State, StateType +from eduvpn_common import __version__ as commonver from eduvpn_common.server import Config, Profiles -from typing import Optional, List, Tuple -import webbrowser -import sys +from eduvpn_common.state import State, StateType # Asks the user for a profile index diff --git a/wrappers/python/tests.py b/wrappers/python/tests.py index f10eac7..72627a4 100644 --- a/wrappers/python/tests.py +++ b/wrappers/python/tests.py @@ -1,12 +1,13 @@ #!/usr/bin/env python3 -import unittest -import eduvpn_common.main as eduvpn -import eduvpn_common.event as event -from eduvpn_common.state import State, StateType import os import sys import threading +import unittest + +import eduvpn_common.event as event +import eduvpn_common.main as eduvpn +from eduvpn_common.state import State, StateType # Import project root directory where the selenium python utility is sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) -- cgit v1.2.3