1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-26 01:37:20 +00:00

Fix borg config flake8 failures

Suppressed E731 so lambdas can be assigned to vars
This commit is contained in:
Milkey Mouse 2017-11-21 11:41:36 -08:00
parent 2ac0bf4980
commit 15d9c94981
No known key found for this signature in database
GPG key ID: C6EF5A02F5647987
2 changed files with 7 additions and 7 deletions

View file

@ -5,7 +5,7 @@ python_files = testsuite/*.py
# please note that the values are adjusted so that they do not cause failures
# with existing code. if you want to change them, you should first fix all
# flake8 failures that appear with your change.
ignore = E122,E123,E125,E126,E127,E128,E226,E402,E722,E741,F401,F405,F811
ignore = E122,E123,E125,E126,E127,E128,E226,E402,E722,E731,E741,F401,F405,F811
# line length long term target: 120
max-line-length = 255
exclude = build,dist,.git,.idea,.cache,.tox,docs/conf.py

View file

@ -2783,13 +2783,13 @@ def test_config(self):
os.unlink('input/flagfile')
self.cmd('init', '--encryption=repokey', self.repository_location)
for flags in [[], ['--cache']]:
for key in {'testkey', 'testsection.testkey'}:
self.cmd('config', self.repository_location, *flags, key, exit_code=1)
self.cmd('config', self.repository_location, *flags, key, 'testcontents')
output = self.cmd('config', self.repository_location, *flags, key)
for cfg_key in {'testkey', 'testsection.testkey'}:
self.cmd('config', self.repository_location, *flags, cfg_key, exit_code=1)
self.cmd('config', self.repository_location, *flags, cfg_key, 'testcontents')
output = self.cmd('config', self.repository_location, *flags, cfg_key)
assert output == 'testcontents\n'
self.cmd('config', self.repository_location, *flags, '--delete', key)
self.cmd('config', self.repository_location, *flags, key, exit_code=1)
self.cmd('config', self.repository_location, *flags, '--delete', cfg_key)
self.cmd('config', self.repository_location, *flags, cfg_key, exit_code=1)
requires_gnutar = pytest.mark.skipif(not have_gnutar(), reason='GNU tar must be installed for this test.')
requires_gzip = pytest.mark.skipif(not shutil.which('gzip'), reason='gzip must be installed for this test.')