From 9317cbaaf0ef124385b1558a0446add70907f79b Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Thu, 10 Feb 2022 10:23:34 -0800 Subject: [PATCH] Code formatting. --- borgmatic/borg/create.py | 8 ++++++-- tests/unit/borg/test_create.py | 4 +++- tox.ini | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/borgmatic/borg/create.py b/borgmatic/borg/create.py index 2330484..200f77c 100644 --- a/borgmatic/borg/create.py +++ b/borgmatic/borg/create.py @@ -243,9 +243,13 @@ def create_archive( numeric_ids_flags = ('--numeric-owner',) if location_config.get('numeric_owner') else () if feature.available(feature.Feature.UPLOAD_RATELIMIT, local_borg_version): - upload_ratelimit_flags = ('--upload-ratelimit', str(remote_rate_limit)) if remote_rate_limit else () + upload_ratelimit_flags = ( + ('--upload-ratelimit', str(remote_rate_limit)) if remote_rate_limit else () + ) else: - upload_ratelimit_flags = ('--remote-ratelimit', str(remote_rate_limit)) if remote_rate_limit else () + upload_ratelimit_flags = ( + ('--remote-ratelimit', str(remote_rate_limit)) if remote_rate_limit else () + ) full_command = ( tuple(local_path.split(' ')) diff --git a/tests/unit/borg/test_create.py b/tests/unit/borg/test_create.py index 66128b9..c3e1610 100644 --- a/tests/unit/borg/test_create.py +++ b/tests/unit/borg/test_create.py @@ -641,7 +641,9 @@ def test_create_archive_with_compression_calls_borg_with_compression_parameters( @pytest.mark.parametrize( 'feature_available,option_flag', ((True, '--upload-ratelimit'), (False, '--remote-ratelimit')), ) -def test_create_archive_with_remote_rate_limit_calls_borg_with_upload_ratelimit_parameters(feature_available, option_flag): +def test_create_archive_with_remote_rate_limit_calls_borg_with_upload_ratelimit_parameters( + feature_available, option_flag +): flexmock(module).should_receive('borgmatic_source_directories').and_return([]) flexmock(module).should_receive('deduplicate_directories').and_return(('foo', 'bar')) flexmock(module).should_receive('map_directories_to_devices').and_return({}) diff --git a/tox.ini b/tox.ini index 7d8340c..a58c871 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,7 @@ whitelist_externals = passenv = COVERAGE_FILE commands = pytest {posargs} - py38,py39: black --check . + py38,py39,py310: black --check . isort --check-only --settings-path setup.cfg . flake8 borgmatic tests