From 027918d49492de7e9028af6de676b40cbc860ad0 Mon Sep 17 00:00:00 2001 From: Teal Dulcet Date: Wed, 8 Jan 2025 05:10:17 -0800 Subject: [PATCH] Fixed FURB188 (slice-to-remove-prefix-or-suffix): Prefer `removeprefix` over conditionally replacing with slice. --- management/backup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/management/backup.py b/management/backup.py index 7dfd7619..42621820 100755 --- a/management/backup.py +++ b/management/backup.py @@ -464,8 +464,7 @@ def list_target_files(config): target_path = target.path if not target_path.endswith('/'): target_path += "/" - if target_path.startswith('/'): - target_path = target_path[1:] + target_path = target_path.removeprefix('/') rsync_command = [ 'rsync', '-e',