From c2841dcc08cc52029516f5d55fcfc26c31d17261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Thu, 23 Jan 2025 14:48:33 +0100 Subject: [PATCH] Run ruff format --- dangerzone/cli.py | 2 +- dangerzone/isolation_provider/base.py | 6 +++--- tests/test_util.py | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dangerzone/cli.py b/dangerzone/cli.py index a8c0c47..dfac0ae 100644 --- a/dangerzone/cli.py +++ b/dangerzone/cli.py @@ -302,7 +302,7 @@ def display_banner() -> None: + Back.BLACK + Fore.LIGHTWHITE_EX + Style.BRIGHT - + f"{' '*left_spaces}Dangerzone v{get_version()}{' '*right_spaces}" + + f"{' ' * left_spaces}Dangerzone v{get_version()}{' ' * right_spaces}" + Fore.YELLOW + Style.DIM + "│" diff --git a/dangerzone/isolation_provider/base.py b/dangerzone/isolation_provider/base.py index cd08507..0a12be1 100644 --- a/dangerzone/isolation_provider/base.py +++ b/dangerzone/isolation_provider/base.py @@ -335,9 +335,9 @@ class IsolationProvider(ABC): stderr_thread = self.start_stderr_thread(p, stderr) if platform.system() != "Windows": - assert os.getpgid(p.pid) != os.getpgid( - os.getpid() - ), "Parent shares same PGID with child" + assert os.getpgid(p.pid) != os.getpgid(os.getpid()), ( + "Parent shares same PGID with child" + ) try: yield p diff --git a/tests/test_util.py b/tests/test_util.py index 2aa14cd..13d36ee 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -12,9 +12,9 @@ VERSION_FILE_NAME = "version.txt" def test_get_resource_path() -> None: share_dir = Path("share").resolve() resource_path = Path(util.get_resource_path(VERSION_FILE_NAME)).parent - assert share_dir.samefile( - resource_path - ), f"{share_dir} is not the same file as {resource_path}" + assert share_dir.samefile(resource_path), ( + f"{share_dir} is not the same file as {resource_path}" + ) @pytest.mark.skipif(platform.system() != "Windows", reason="Windows-specific")