mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Stylefix for new bugbear update
This commit is contained in:
parent
e2ef842bb5
commit
bd19ee45d8
7 changed files with 9 additions and 9 deletions
|
|
@ -211,7 +211,7 @@ def test_already_synced():
|
|||
a.update = b.update = a.upload = b.upload = \
|
||||
lambda *a, **kw: pytest.fail('Method shouldn\'t have been called.')
|
||||
|
||||
for i in (1, 2):
|
||||
for _ in (1, 2):
|
||||
sync(a, b, status)
|
||||
assert status == old_status
|
||||
assert items(a) == items(b) == {item.raw}
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ def test_split_contacts():
|
|||
bare = '\r\n'.join([VCARD_TEMPLATE.format(r=x, uid=x) for x in range(4)])
|
||||
with_wrapper = 'BEGIN:VADDRESSBOOK\r\n' + bare + '\nEND:VADDRESSBOOK\r\n'
|
||||
|
||||
for x in (bare, with_wrapper):
|
||||
for _ in (bare, with_wrapper):
|
||||
split = list(vobject.split_collection(bare))
|
||||
assert len(split) == 4
|
||||
assert vobject.join_collection(split).splitlines() == \
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ def prepare_pair(wq, pair_name, collections, config, callback, **kwargs):
|
|||
wq.put(functools.partial(callback, collection=collection,
|
||||
general=config.general, **kwargs))
|
||||
|
||||
for i in range(new_workers):
|
||||
for _ in range(new_workers):
|
||||
wq.spawn_worker()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -601,7 +601,7 @@ class DAVStorage(Storage):
|
|||
root = _parse_xml(response.content)
|
||||
|
||||
rv = self._parse_prop_responses(root)
|
||||
for href, etag, prop in rv:
|
||||
for href, etag, _prop in rv:
|
||||
yield href, etag
|
||||
|
||||
def get_meta(self, key):
|
||||
|
|
@ -817,7 +817,7 @@ class CalDAVStorage(DAVStorage):
|
|||
headers=headers)
|
||||
root = _parse_xml(response.content)
|
||||
rv = self._parse_prop_responses(root)
|
||||
for href, etag, prop in rv:
|
||||
for href, etag, _prop in rv:
|
||||
yield href, etag
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class MemoryStorage(Storage):
|
|||
return item.ident + self.fileext
|
||||
|
||||
def list(self):
|
||||
for href, (etag, item) in self.items.items():
|
||||
for href, (etag, _item) in self.items.items():
|
||||
yield href, etag
|
||||
|
||||
def get(self, href):
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class RemoteStorage(Storage):
|
|||
except exceptions.NotFoundError:
|
||||
return
|
||||
|
||||
for name, info in _iter_listing(r.json()):
|
||||
for name, _info in _iter_listing(r.json()):
|
||||
if not name.endswith('/'):
|
||||
continue # not a folder
|
||||
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ class _Component(object):
|
|||
stack = []
|
||||
rv = []
|
||||
try:
|
||||
for i, line in enumerate(lines):
|
||||
for _i, line in enumerate(lines):
|
||||
if line.startswith(u'BEGIN:'):
|
||||
c_name = line[len(u'BEGIN:'):].strip().upper()
|
||||
stack.append(cls(c_name, [], []))
|
||||
|
|
@ -271,7 +271,7 @@ class _Component(object):
|
|||
stack[-1].props.append(line)
|
||||
except IndexError:
|
||||
raise ValueError('Parsing error at line {}. Check the debug log '
|
||||
'for more information.'.format(i + 1))
|
||||
'for more information.'.format(_i + 1))
|
||||
|
||||
if multiple:
|
||||
return rv
|
||||
|
|
|
|||
Loading…
Reference in a new issue