浏览代码

run black 23.1.0 on the code

Thomas Waldmann 2 年之前
父节点
当前提交
a0330d578e

+ 1 - 1
src/borg/archive.py

@@ -1054,7 +1054,7 @@ Duration: {0.duration}
             pi = ProgressIndicatorPercent(
                 total=len(items_ids), msg="Decrementing references %3.0f%%", msgid="archive.delete"
             )
-            for (i, (items_id, data)) in enumerate(zip(items_ids, self.repository.get_many(items_ids))):
+            for i, (items_id, data) in enumerate(zip(items_ids, self.repository.get_many(items_ids))):
                 if progress:
                     pi.show(i)
                 _, data = self.repo_objs.parse(items_id, data)

+ 0 - 1
src/borg/archiver/benchmark_cmd.py

@@ -217,7 +217,6 @@ class BenchmarkMixIn:
         return 0
 
     def build_parser_benchmarks(self, subparsers, common_parser, mid_common_parser):
-
         from ._common import process_epilog
 
         benchmark_epilog = process_epilog("These commands do various benchmarks.")

+ 0 - 1
src/borg/archiver/check_cmd.py

@@ -66,7 +66,6 @@ class CheckMixIn:
         return EXIT_SUCCESS
 
     def build_parser_check(self, subparsers, common_parser, mid_common_parser):
-
         from ._common import process_epilog
         from ._common import define_archive_filters_group
 

+ 0 - 1
src/borg/archiver/compact_cmd.py

@@ -22,7 +22,6 @@ class CompactMixIn:
         return EXIT_SUCCESS
 
     def build_parser_compact(self, subparsers, common_parser, mid_common_parser):
-
         from ._common import process_epilog
 
         compact_epilog = process_epilog(

+ 0 - 1
src/borg/archiver/config_cmd.py

@@ -150,7 +150,6 @@ class ConfigMixIn:
                 cache.close()
 
     def build_parser_config(self, subparsers, common_parser, mid_common_parser):
-
         from ._common import process_epilog
 
         config_epilog = process_epilog(

+ 0 - 1
src/borg/archiver/debug_cmd.py

@@ -330,7 +330,6 @@ class DebugMixIn:
         return EXIT_SUCCESS
 
     def build_parser_debug(self, subparsers, common_parser, mid_common_parser):
-
         debug_epilog = process_epilog(
             """
         These commands are not intended for normal use and potentially very

+ 0 - 1
src/borg/archiver/diff_cmd.py

@@ -58,7 +58,6 @@ class DiffMixIn:
         return self.exit_code
 
     def build_parser_diff(self, subparsers, common_parser, mid_common_parser):
-
         from ._common import process_epilog
         from ._common import define_exclusion_group
 

+ 0 - 1
src/borg/archiver/extract_cmd.py

@@ -109,7 +109,6 @@ class ExtractMixIn:
         return self.exit_code
 
     def build_parser_extract(self, subparsers, common_parser, mid_common_parser):
-
         from ._common import process_epilog
         from ._common import define_exclusion_group
 

+ 0 - 1
src/borg/archiver/key_cmds.py

@@ -132,7 +132,6 @@ class KeysMixIn:
         return EXIT_SUCCESS
 
     def build_parser_keys(self, subparsers, common_parser, mid_common_parser):
-
         from ._common import process_epilog
 
         subparser = subparsers.add_parser(

+ 0 - 1
src/borg/archiver/lock_cmds.py

@@ -51,7 +51,6 @@ class LocksMixIn:
         return self.exit_code
 
     def build_parser_locks(self, subparsers, common_parser, mid_common_parser):
-
         from ._common import process_epilog
 
         break_lock_epilog = process_epilog(

+ 0 - 1
src/borg/archiver/prune_cmd.py

@@ -170,7 +170,6 @@ class PruneMixIn:
         return self.exit_code
 
     def build_parser_prune(self, subparsers, common_parser, mid_common_parser):
-
         from ._common import process_epilog
         from ._common import define_archive_filters_group
 

+ 0 - 1
src/borg/archiver/rdelete_cmd.py

@@ -90,7 +90,6 @@ class RDeleteMixIn:
         return self.exit_code
 
     def build_parser_rdelete(self, subparsers, common_parser, mid_common_parser):
-
         from ._common import process_epilog
 
         rdelete_epilog = process_epilog(

+ 0 - 1
src/borg/archiver/tar_cmds.py

@@ -331,7 +331,6 @@ class TarMixIn:
                 log_multi(str(archive), str(archive.stats), logger=logging.getLogger("borg.output.stats"))
 
     def build_parser_tar(self, subparsers, common_parser, mid_common_parser):
-
         from ._common import process_epilog
 
         export_tar_epilog = process_epilog(

+ 0 - 1
src/borg/archiver/transfer_cmd.py

@@ -142,7 +142,6 @@ class TransferMixIn:
         return EXIT_SUCCESS
 
     def build_parser_transfer(self, subparsers, common_parser, mid_common_parser):
-
         from ._common import process_epilog
         from ._common import define_archive_filters_group
 

+ 1 - 1
src/borg/patterns.py

@@ -151,7 +151,7 @@ class PatternMatcher:
             return self.is_include_cmd[value]
 
         # this is the slow way, if we have many patterns in self._items:
-        for (pattern, cmd) in self._items:
+        for pattern, cmd in self._items:
             if pattern.match(path, normalize=False):
                 self.recurse_dir = pattern.recurse_dir
                 return self.is_include_cmd[cmd]

+ 0 - 1
src/borg/testsuite/archiver/tar_cmds.py

@@ -26,7 +26,6 @@ def have_gnutar():
 
 
 class ArchiverTestCase(ArchiverTestCaseBase):
-
     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.")
 

+ 0 - 1
src/borg/testsuite/benchmark.py

@@ -113,7 +113,6 @@ def test_help(benchmark, cmd):
 
 @pytest.mark.parametrize("type, key, value", [(Item, "size", 1000), (Item, "mode", 0x777), (Item, "deleted", False)])
 def test_propdict_attributes(benchmark, type, key, value):
-
     propdict = type()
 
     def getattr_setattr(item, key, value):

+ 1 - 0
src/borg/testsuite/chunker.py

@@ -10,6 +10,7 @@ from . import BaseTestCase
 
 def cf(chunks):
     """chunk filter"""
+
     # this is to simplify testing: either return the data piece (bytes) or the hole length (int).
     def _cf(chunk):
         if chunk.meta["allocation"] == CH_DATA:

+ 0 - 1
src/borg/testsuite/hashindex.py

@@ -601,7 +601,6 @@ class AllIndexTestCase(BaseTestCase):
 
 class IndexCorruptionTestCase(BaseTestCase):
     def test_bug_4829(self):
-
         from struct import pack
 
         def HH(x, y, z):