From 0402b23eb484c373ff7673dfe6ce62329257e367 Mon Sep 17 00:00:00 2001 From: Teal Dulcet Date: Fri, 21 Mar 2025 04:55:19 -0700 Subject: [PATCH] Fixed FURB129 (readlines-in-for): Instead of calling `readlines()`, iterate over file object directly --- management/mailconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/management/mailconfig.py b/management/mailconfig.py index 1213c900..770be95f 100644 --- a/management/mailconfig.py +++ b/management/mailconfig.py @@ -150,7 +150,7 @@ def get_mail_users_ex(env, with_archived=False): dirsize_file = os.path.join(env['STORAGE_ROOT'], f'mail/mailboxes/{domain}/{user}/maildirsize') with open(dirsize_file, encoding="utf-8") as f: box_quota = int(f.readline().split('S')[0]) - for line in f.readlines(): + for line in f: (size, count) = line.split(' ') box_size += int(size)