From a53d0d83fdf3eacf2bfb2dfcfdbbaa14847af7b1 Mon Sep 17 00:00:00 2001 From: bbhtt Date: Sat, 5 Oct 2024 18:32:23 +0530 Subject: [PATCH] Use a single loop --- flatpak_builder_lint/checks/desktop.py | 2 -- flatpak_builder_lint/checks/metainfo.py | 2 -- flatpak_builder_lint/checks/screenshots.py | 2 -- 3 files changed, 6 deletions(-) diff --git a/flatpak_builder_lint/checks/desktop.py b/flatpak_builder_lint/checks/desktop.py index 92db11dd..418bcce9 100644 --- a/flatpak_builder_lint/checks/desktop.py +++ b/flatpak_builder_lint/checks/desktop.py @@ -259,8 +259,6 @@ def check_repo(self, path: str) -> None: for subdir in dirs_needed: os.makedirs(os.path.join(tmpdir, subdir), exist_ok=True) - - for subdir in dirs_needed: ostree.extract_subpath( path, ref, f"files/share/{subdir}", os.path.join(tmpdir, subdir), True ) diff --git a/flatpak_builder_lint/checks/metainfo.py b/flatpak_builder_lint/checks/metainfo.py index 8b8f997e..e6281834 100644 --- a/flatpak_builder_lint/checks/metainfo.py +++ b/flatpak_builder_lint/checks/metainfo.py @@ -253,8 +253,6 @@ def check_repo(self, path: str) -> None: for subdir in dirs_needed: os.makedirs(os.path.join(tmpdir, subdir), exist_ok=True) - - for subdir in dirs_needed: ostree.extract_subpath( path, ref, f"files/share/{subdir}", os.path.join(tmpdir, subdir), True ) diff --git a/flatpak_builder_lint/checks/screenshots.py b/flatpak_builder_lint/checks/screenshots.py index 2dc94b60..e88d48f8 100644 --- a/flatpak_builder_lint/checks/screenshots.py +++ b/flatpak_builder_lint/checks/screenshots.py @@ -24,8 +24,6 @@ def check_repo(self, path: str) -> None: for subdir in dirs_needed: os.makedirs(os.path.join(tmpdir, subdir), exist_ok=True) - - for subdir in dirs_needed: ostree.extract_subpath( path, ref, f"files/share/{subdir}", os.path.join(tmpdir, subdir), True )