Reformat files with black

This commit is contained in:
Orsiris de Jong 2023-02-05 19:37:05 +01:00
parent da7fa826d0
commit 96d4268cbe
2 changed files with 3 additions and 6 deletions

View file

@ -141,12 +141,9 @@ def is_encrypted(config_dict: dict) -> bool:
is_enc = True
for option in ENCRYPTED_OPTIONS:
try:
if (
if config_dict[option["section"]][option["name"]] and not str(
config_dict[option["section"]][option["name"]]
and not str(config_dict[option["section"]][option["name"]]).startswith(
ID_STRING
)
):
).startswith(ID_STRING):
is_enc = False
except (TypeError, KeyError):
# Don't care about encryption on missing items

View file

@ -66,7 +66,7 @@ def metric_writer(config_dict: dict, restic_result: bool, result_string: str):
# Configure lables
label_string = ",".join(
[f"{key}=\"{value}\"" for key, value in labels.items() if value]
[f'{key}="{value}"' for key, value in labels.items() if value]
)
try:
# Make sure we convert prometheus_additional_labels to list if only one label is given