Fixed PLW0120 (useless-else-on-loop): else clause on loop without a break statement; remove the else and dedent its contents

이 커밋은 다음에 포함됨:
Teal Dulcet
2025-06-18 05:00:22 -07:00
부모 68fd3dc535
커밋 3a1280d292
+2 -4
파일 보기
@@ -178,10 +178,8 @@ def should_force_full(config, env):
if dateutil.parser.parse(bak["date"]) + datetime.timedelta(days=config["min_age_in_days"]*10+1) < datetime.datetime.now(dateutil.tz.tzlocal()):
return True
return False
else:
# If we got here there are no (full) backups, so make one.
# (I love for/else blocks. Here it's just to show off.)
return True
# If we got here there are no (full) backups, so make one.
return True
def get_passphrase(env):
# Get the encryption passphrase. secret_key.txt is 2048 random