mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-06 21:14:38 +08:00
Reformat files with black
This commit is contained in:
parent
b42c037fb2
commit
d7aa20d3b4
4 changed files with 10 additions and 12 deletions
|
@ -81,7 +81,9 @@ def g(self, path, sep=".", default=None, list_ok=False):
|
|||
try:
|
||||
return self.mlget(path.split(sep), default=default, list_ok=list_ok)
|
||||
except AssertionError as exc:
|
||||
logger.debug(f"ERROR {exc} for path={path},sep={sep},default={default},list_ok={list_ok}")
|
||||
logger.debug(
|
||||
f"ERROR {exc} for path={path},sep={sep},default={default},list_ok={list_ok}"
|
||||
)
|
||||
raise AssertionError
|
||||
|
||||
|
||||
|
|
|
@ -1444,7 +1444,7 @@ class NPBackupRunner:
|
|||
msg = f"Empty retention policy. Won't run"
|
||||
self.write_logs(msg, level="error")
|
||||
return self.convert_to_json_output(False, msg)
|
||||
|
||||
|
||||
# Convert group by to list
|
||||
group_by = []
|
||||
for entry in ["host", "paths", "tags"]:
|
||||
|
|
|
@ -1519,9 +1519,7 @@ def config_gui(full_config: dict, config_file: str):
|
|||
size=(100, 1),
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Text(_t("config_gui.policiy_group_by"))
|
||||
],
|
||||
[sg.Text(_t("config_gui.policiy_group_by"))],
|
||||
[
|
||||
sg.Image(
|
||||
NON_INHERITED_ICON,
|
||||
|
@ -1531,7 +1529,7 @@ def config_gui(full_config: dict, config_file: str):
|
|||
),
|
||||
sg.Checkbox(
|
||||
_t("config_gui.group_by_host"),
|
||||
key="repo_opts.retention_policy.group_by_host"
|
||||
key="repo_opts.retention_policy.group_by_host",
|
||||
),
|
||||
sg.Image(
|
||||
NON_INHERITED_ICON,
|
||||
|
@ -1541,7 +1539,7 @@ def config_gui(full_config: dict, config_file: str):
|
|||
),
|
||||
sg.Checkbox(
|
||||
_t("config_gui.group_by_paths"),
|
||||
key="repo_opts.retention_policy.group_by_paths"
|
||||
key="repo_opts.retention_policy.group_by_paths",
|
||||
),
|
||||
sg.Image(
|
||||
NON_INHERITED_ICON,
|
||||
|
@ -1551,12 +1549,10 @@ def config_gui(full_config: dict, config_file: str):
|
|||
),
|
||||
sg.Checkbox(
|
||||
_t("config_gui.group_by_tags"),
|
||||
key="repo_opts.retention_policy.group_by_tags"
|
||||
key="repo_opts.retention_policy.group_by_tags",
|
||||
),
|
||||
],
|
||||
[
|
||||
sg.Text(_t("config_gui.policiy_group_by_explanation"))
|
||||
],
|
||||
[sg.Text(_t("config_gui.policiy_group_by_explanation"))],
|
||||
[sg.HorizontalSeparator()],
|
||||
[
|
||||
sg.Column(
|
||||
|
|
|
@ -1089,7 +1089,7 @@ class ResticRunner:
|
|||
self,
|
||||
snapshots: Optional[Union[List[str], Optional[str]]] = None,
|
||||
policy: Optional[dict] = None,
|
||||
group_by: Optional[List[str]] = None
|
||||
group_by: Optional[List[str]] = None,
|
||||
) -> Union[bool, str, dict]:
|
||||
"""
|
||||
Execute forget command for given snapshot
|
||||
|
|
Loading…
Add table
Reference in a new issue