From f7c843fd21b195627c1b478b7069b887e03c73ff Mon Sep 17 00:00:00 2001 From: Alexander-N Date: Mon, 17 Jul 2017 11:21:30 +0200 Subject: [PATCH] Enable pylint check E0211 (method has no argument) in .coafile Adapt Attic013Item in test_attic013_acl_bug so that as_dict takes `self` as first argument. This was the only case where E0211 was violated. --- .coafile | 2 +- src/borg/testsuite/archiver.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.coafile b/.coafile index 9005aa7ae..03ba32c72 100644 --- a/.coafile +++ b/.coafile @@ -24,7 +24,7 @@ pylint_disable = C0103, C0111, C0112, C0301, C0302, C0325, C0330, C0411, C0412, W0511, W0603, W0611, W0612, W0613, W0614, W0621, W0622, W0702, W0703, W1201, W1202, W1401, W1503, W1505, R0101, R0201, R0204, R0902, R0903, R0904, R0911, R0912, R0913, R0914, R0915, R0916, - E0102, E0202, E0211, E0401, E0611, E0702, E1101, E1102, E1120, E1133 + E0102, E0202, E0401, E0611, E0702, E1101, E1102, E1120, E1133 pydocstyle_ignore = D100, D101, D102, D103, D104, D105, D200, D201, D202, D203, D204, D205, D209, D210, D212, D213, D300, D301, D400, D401, D402, D403, D404 diff --git a/src/borg/testsuite/archiver.py b/src/borg/testsuite/archiver.py index 895799d24..99e8b1ae0 100644 --- a/src/borg/testsuite/archiver.py +++ b/src/borg/testsuite/archiver.py @@ -2975,7 +2975,7 @@ def test_attic013_acl_bug(self): # a b'acl'=None key-value pair. # This bug can still live on in Borg repositories (through borg upgrade). class Attic013Item: - def as_dict(): + def as_dict(self): return { # These are required b'path': '1234', @@ -2994,7 +2994,7 @@ def as_dict(): manifest, key = Manifest.load(repository, Manifest.NO_OPERATION_CHECK) with Cache(repository, key, manifest) as cache: archive = Archive(repository, key, manifest, '0.13', cache=cache, create=True) - archive.items_buffer.add(Attic013Item) + archive.items_buffer.add(Attic013Item()) archive.save() self.cmd('check', self.repository_location, exit_code=0) self.cmd('list', self.repository_location + '::0.13', exit_code=0)