diff --git a/conftest.py b/conftest.py index d1505033f..3a7c278af 100644 --- a/conftest.py +++ b/conftest.py @@ -15,16 +15,15 @@ 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, has_pyfuse3 -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, has_pyfuse3 # 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) @@ -67,7 +66,8 @@ def __init__(self, request): 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 9d20197b4..986ec12b2 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