From 554a1616488ce396431e7144741937b8b7e5bc42 Mon Sep 17 00:00:00 2001 From: Teal Dulcet Date: Sun, 12 Jan 2025 06:44:46 -0800 Subject: [PATCH] Fixed RET505 (superfluous-else-return): Unnecessary `elif` after `return` statement --- management/backup.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/management/backup.py b/management/backup.py index 97fc70ad..2b0b79ae 100755 --- a/management/backup.py +++ b/management/backup.py @@ -528,7 +528,7 @@ def list_target_files(config): except ClientError as e: raise ValueError(e) return backup_list - elif target.scheme == 'b2': + if target.scheme == 'b2': from b2sdk.v1 import InMemoryAccountInfo, B2Api from b2sdk.v1.exception import NonExistentBucket info = InMemoryAccountInfo() @@ -547,8 +547,7 @@ def list_target_files(config): raise ValueError(msg) return [(key.file_name, key.size) for key, _ in bucket.ls()] - else: - raise ValueError(config["target"]) + raise ValueError(config["target"]) def backup_set_custom(env, target, target_user, target_pass, min_age):