From a83db1aebcf852a1d7ce488f4636d7c1b32dc11a Mon Sep 17 00:00:00 2001 From: Teal Dulcet Date: Wed, 18 Jun 2025 04:20:19 -0700 Subject: [PATCH] Fixed FURB188 (slice-to-remove-prefix-or-suffix): Prefer `str.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 1887af79..d8f8c50e 100755 --- a/management/backup.py +++ b/management/backup.py @@ -463,8 +463,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',