1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-17 17:57:23 +01:00

Fixed UP032 (f-string): Use f-string instead of format call

This commit is contained in:
Teal Dulcet
2025-01-12 07:36:41 -08:00
parent ed2ad44408
commit 0564d1abc8
10 changed files with 30 additions and 33 deletions

View File

@@ -204,7 +204,7 @@ def get_current_migration():
ver = 0
while True:
next_ver = (ver + 1)
migration_func = globals().get("migration_{:d}".format(next_ver))
migration_func = globals().get(f"migration_{next_ver:d}")
if not migration_func:
return ver
ver = next_ver
@@ -236,14 +236,14 @@ def run_migrations():
while True:
next_ver = (ourver + 1)
migration_func = globals().get("migration_{:d}".format(next_ver))
migration_func = globals().get(f"migration_{next_ver:d}")
if not migration_func:
# No more migrations to run.
break
print()
print("Running migration to Mail-in-a-Box #{:d}...".format(next_ver))
print(f"Running migration to Mail-in-a-Box #{next_ver:d}...")
try:
migration_func(env)