From 36d10fecb195a505511df0d3a52157765eaad335 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Wed, 20 Mar 2024 12:01:24 -0700 Subject: [PATCH] Upgrade black in test requirements. --- borgmatic/borg/list.py | 8 +++++--- borgmatic/execute.py | 6 +++--- borgmatic/hooks/command.py | 6 +++--- test_requirements.txt | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/borgmatic/borg/list.py b/borgmatic/borg/list.py index 7c29df38..a824c476 100644 --- a/borgmatic/borg/list.py +++ b/borgmatic/borg/list.py @@ -79,9 +79,11 @@ def make_find_paths(find_paths): return () return tuple( - find_path - if re.compile(r'([-!+RrPp] )|(\w\w:)').match(find_path) - else f'sh:**/*{find_path}*/**' + ( + find_path + if re.compile(r'([-!+RrPp] )|(\w\w:)').match(find_path) + else f'sh:**/*{find_path}*/**' + ) for find_path in find_paths ) diff --git a/borgmatic/execute.py b/borgmatic/execute.py index fdc9eb76..df4b029f 100644 --- a/borgmatic/execute.py +++ b/borgmatic/execute.py @@ -376,9 +376,9 @@ def execute_command_with_processes( command, stdin=input_file, stdout=None if do_not_capture else (output_file or subprocess.PIPE), - stderr=None - if do_not_capture - else (subprocess.PIPE if output_file else subprocess.STDOUT), + stderr=( + None if do_not_capture else (subprocess.PIPE if output_file else subprocess.STDOUT) + ), shell=shell, env=environment, cwd=working_directory, diff --git a/borgmatic/hooks/command.py b/borgmatic/hooks/command.py index 299c1a1f..421d4d7f 100644 --- a/borgmatic/hooks/command.py +++ b/borgmatic/hooks/command.py @@ -68,9 +68,9 @@ def execute_hook(commands, umask, config_filename, description, dry_run, **conte if not dry_run: execute.execute_command( [command], - output_log_level=logging.ERROR - if description == 'on-error' - else logging.WARNING, + output_log_level=( + logging.ERROR if description == 'on-error' else logging.WARNING + ), shell=True, ) finally: diff --git a/test_requirements.txt b/test_requirements.txt index b4632902..0b63bb87 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -1,7 +1,7 @@ appdirs==1.4.4 apprise==1.3.0 attrs==22.2.0 -black==23.3.0 +black==24.3.0 certifi==2023.7.22 chardet==5.1.0 click==8.1.3