From d11f1a7454c6fd00c2a249ff3230f213050ba132 Mon Sep 17 00:00:00 2001 From: Robert Blenis Date: Sun, 21 Mar 2021 17:47:08 -0400 Subject: [PATCH] fix pep8 violations - conftest.py --- conftest.py | 14 +++++++------- setup.cfg | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/conftest.py b/conftest.py index 6fd596104..a1e3b6c77 100644 --- a/conftest.py +++ b/conftest.py @@ -15,16 +15,15 @@ if hasattr(pytest, 'register_assert_rewrite'): pytest.register_assert_rewrite('borg.testsuite') -import borg.cache -from borg.logger import setup_logging +import borg.cache # noqa: E402 +from borg.logger import setup_logging # noqa: E402 # Ensure that the loggers exist for all tests setup_logging() -from borg.testsuite import has_lchflags, has_llfuse -from borg.testsuite import are_symlinks_supported, are_hardlinks_supported, is_utime_fully_supported -from borg.testsuite.platform import fakeroot_detected, are_acls_working -from borg import xattr +from borg.testsuite import has_lchflags, has_llfuse # noqa: E402 +from borg.testsuite import are_symlinks_supported, are_hardlinks_supported, is_utime_fully_supported # noqa: E402 +from borg.testsuite.platform import fakeroot_detected # noqa: E402 @pytest.fixture(autouse=True) @@ -65,7 +64,8 @@ class DefaultPatches: self.org_cache_wipe_cache = borg.cache.LocalCache.wipe_cache def wipe_should_not_be_called(*a, **kw): - raise AssertionError("Cache wipe was triggered, if this is part of the test add @pytest.mark.allow_cache_wipe") + raise AssertionError("Cache wipe was triggered, if this is part of the test add " + "@pytest.mark.allow_cache_wipe") if 'allow_cache_wipe' not in request.keywords: borg.cache.LocalCache.wipe_cache = wipe_should_not_be_called request.addfinalizer(self.undo) diff --git a/setup.cfg b/setup.cfg index 259025597..bf1b38df5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,7 +42,6 @@ ignore = E226, W503 # with existing code. if you want to change them, you should first fix all # flake8 failures that appear with your change. per_file_ignores = - conftest.py:E402,E501,F401 docs/conf.py:E121,E126,E265,E305,E401,E402, scripts/errorlist.py:F401 src/borg/archive.py:E122,E125,E127,E402,E501,F401,F405,W504