From 87f7018acf52f36937902e4cf8184d4c3b2ffb07 Mon Sep 17 00:00:00 2001 From: Jeffrey Serio <23226432+hyperreal64@users.noreply.github.com> Date: Sat, 10 Aug 2024 18:44:57 -0500 Subject: [PATCH] refactor --- bin/qbth.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/qbth.py b/bin/qbth.py index 945dbfb..59025cb 100755 --- a/bin/qbth.py +++ b/bin/qbth.py @@ -70,9 +70,9 @@ def remove_torrents(distro_substring: str): torrent's file name. """ for torrent in qb.torrents(): - if distro_substring in torrent.get("name"): # type: ignore - qb.delete_permanently(torrent.get("hash")) # type: ignore - print(f"Removed {torrent.get('name')}") # type: ignore + if distro_substring in torrent.get("name"): # type: ignore + qb.delete_permanently(torrent.get("hash")) # type: ignore + print(f"Removed {torrent.get('name')}") # type: ignore def add_almalinux(rel_ver: str): @@ -177,9 +177,9 @@ def remove_fedora(rel_ver: str): """ torrents = qb.torrents() for torrent in torrents: - if torrent.get("name").startswith("Fedora") and torrent.get("name").endswith(rel_ver): # type: ignore - qb.delete_permanently(torrent.get("hash")) # type: ignore - print(f"Removed {torrent.get('name')}") # type: ignore + if torrent.get("name").startswith("Fedora") and torrent.get("name").endswith(rel_ver): # type: ignore + qb.delete_permanently(torrent.get("hash")) # type: ignore + print(f"Removed {torrent.get('name')}") # type: ignore def add_freebsd(rel_ver: str): @@ -363,7 +363,7 @@ if __name__ == "__main__": "gum", "choose", "--limit=1", - "--header='Available torrents'", + "--header=Available torrents", "--height=13", "AlmaLinux", "Debian",