Global reformatting with black.

This commit is contained in:
Goffi 2025-09-13 10:46:10 +02:00
commit 96bf3af324

View file

@ -54,7 +54,6 @@ log.basicConfig(level=log.WARNING, format="[%(name)s] %(message)s")
###
## bridge handling
# we get bridge name from conf and initialise the right class accordingly
main_config = config.parse_main_conf()
@ -91,6 +90,7 @@ PROGRESS_DELAY = 0.1 # the progression will be checked every PROGRESS_DELAY s
def date_decoder(arg):
return date_utils.date_parse_ext(arg, default_tz=date_utils.TZ_LOCAL)
def optional_bool_decoder(arg: str) -> bool:
"""Decode an optional string to a boolean value.
@ -99,9 +99,9 @@ def optional_bool_decoder(arg: str) -> bool:
@raise ValueError: If the input string is not a valid boolean representation.
"""
lower_arg = arg.lower()
if lower_arg in ['true', '1', 't', 'y', 'yes']:
if lower_arg in ["true", "1", "t", "y", "yes"]:
return True
elif lower_arg in ['false', '0', 'f', 'n', 'no']:
elif lower_arg in ["false", "0", "f", "n", "no"]:
return False
else:
raise ValueError(f"Invalid boolean value: {arg}")