Przeglądaj źródła

fix pep8 violations - conftest.py

Robert Blenis 4 lat temu
rodzic
commit
d11f1a7454
2 zmienionych plików z 7 dodań i 8 usunięć
  1. 7 7
      conftest.py
  2. 0 1
      setup.cfg

+ 7 - 7
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)

+ 0 - 1
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