From eba5a003347bfd60b09712786509092c7d766008 Mon Sep 17 00:00:00 2001 From: Jeffrey Serio <23226432+hyperreal64@users.noreply.github.com> Date: Mon, 5 Aug 2024 20:28:43 -0500 Subject: [PATCH] Correct docstrings --- bin/scihub_knapsack.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/scihub_knapsack.py b/bin/scihub_knapsack.py index 9891339..1dd7718 100755 --- a/bin/scihub_knapsack.py +++ b/bin/scihub_knapsack.py @@ -10,7 +10,7 @@ By default, the larger torrents are prioritized in descending order, but the script can be run with the --smaller flag to prioritize smaller torrents in ascending order. -The script will select only torrents with . +The script will select only torrents with less than or equal to . Usage: scihub_knapsack.py [--smaller] [--dry-run] -H -U -P -S -s @@ -33,8 +33,8 @@ Options: -S The maximum size, in GiB or TiB, of the knapsack to add Sci Hub torrents to. Must be a positive integer or float. Must have either G or T on the end, which represents GiB or TiB. - -s Select torrents with seeders. - is a positive integer argument. + -s Select torrents with less than or equal to + seeders. is a positive integer. """ import json @@ -112,7 +112,8 @@ def fill_knapsack( Fill the knapsack. Arguments: - max_seeders: int -- Select only torrents with this number of seeders + max_seeders: int -- Select only torrents with less than or equal to + this number of seeders knapsack_size: int -- The size in bytes of the knapsack smaller: bool -- Prioritize smaller sized torrents (Default = False) @@ -120,7 +121,7 @@ def fill_knapsack( A list of dictionaries that represent the torrents. """ - # List of torrents with + # List of torrents with less than or equal to torrents = [t for t in get_torrent_health_data() if t["seeders"] <= max_seeders] # Sorted list of torrents with . If smaller == True, sort them