Reformat file with black

This commit is contained in:
deajan 2025-10-05 21:08:49 +02:00
parent efd468b5ab
commit 27050e8dc9
3 changed files with 15 additions and 20 deletions

View file

@ -855,21 +855,19 @@ def _migrate_config_dict(full_config: dict, old_version: str, new_version: str)
object_type: str,
) -> dict:
try:
if full_config.g(
f"{object_type}.{object_name}.repo_opts.compression"
) is None and f"{object_type}.{object_name}.backup_opts.compression" is not None:
if (
full_config.g(f"{object_type}.{object_name}.repo_opts.compression")
is None
and f"{object_type}.{object_name}.backup_opts.compression" is not None
):
full_config.s(
f"{object_type}.{object_name}.repo_opts.compression",
full_config.g(
f"{object_type}.{object_name}.backup_opts.compression"
),
)
full_config.d(
f"{object_type}.{object_name}.backup_opts.compression"
)
logger.info(
f"Migrated {object_name} compression to repo_opts"
)
full_config.d(f"{object_type}.{object_name}.backup_opts.compression")
logger.info(f"Migrated {object_name} compression to repo_opts")
except KeyError:
logger.info(
f"{object_type} {object_name} has no compression, skipping migration"

View file

@ -1222,18 +1222,14 @@ def config_gui(full_config: dict, config_file: str):
),
],
[
sg.Text(
_t("config_gui.pack_size"), size=(20, 1)
),
sg.Text(_t("config_gui.pack_size"), size=(20, 1)),
sg.Image(
NON_INHERITED_ICON,
key="inherited.backup_opts.pack_size",
tooltip=_t("config_gui.group_inherited"),
pad=1,
),
sg.Input(
key="backup_opts.pack_size", size=(8, 1)
),
sg.Input(key="backup_opts.pack_size", size=(8, 1)),
],
]
),
@ -1603,7 +1599,8 @@ def config_gui(full_config: dict, config_file: str):
NON_INHERITED_ICON,
key="inherited_repo_group",
tooltip=_t("config_gui.group_inherited"),
pad=1),
pad=1,
),
sg.Combo(
values=configuration.get_group_list(full_config),
key="repo_group",