mirror of
https://github.com/borgbackup/borg.git
synced 2026-05-28 04:03:21 -04:00
run black 23.1.0 on the code
This commit is contained in:
parent
96862787db
commit
a0330d578e
19 changed files with 3 additions and 18 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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.")
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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.")
|
||||
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -601,7 +601,6 @@ class AllIndexTestCase(BaseTestCase):
|
|||
|
||||
class IndexCorruptionTestCase(BaseTestCase):
|
||||
def test_bug_4829(self):
|
||||
|
||||
from struct import pack
|
||||
|
||||
def HH(x, y, z):
|
||||
|
|
|
|||
Loading…
Reference in a new issue