From c2ead79b4aa208c4b41192c7f8e3eca7cfb060ba Mon Sep 17 00:00:00 2001 From: "JO Jr." Date: Sat, 27 Jan 2024 12:41:42 -0500 Subject: [PATCH] random.randint => choice --- random_size.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/random_size.py b/random_size.py index d9bdfce..733ade3 100644 --- a/random_size.py +++ b/random_size.py @@ -19,8 +19,7 @@ class RandomSize: def func(self:str): sizes = read_config('sizes') rand_obj = random.Random() - idx = rand_obj.randint(0, len(sizes)) - size = sizes[idx] + size = rand_obj.choice(sizes) x, y = [int(v) for v in size.split('x')] return (x,y)