Skip to content

Commit

Permalink
Merge branch fix-flake8-3.8.1 of https://github.com/valeriocos/per…
Browse files Browse the repository at this point in the history
…ceval`

Merges #670
Closes #670
  • Loading branch information
zhquan committed May 22, 2020
2 parents 8ff102a + 87528b3 commit 7f4cceb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions perceval/backends/core/mbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class MBox(Backend):
:param archive: archive to store/retrieve items
:param ssl_verify: enable/disable SSL verification
"""
version = '0.13.0'
version = '0.13.1'

CATEGORIES = [CATEGORY_MESSAGE]

Expand Down Expand Up @@ -246,8 +246,8 @@ def _copy_mbox(self, mbox):

with mbox.container as f_in:
with open(tmp_path, mode='wb') as f_out:
for l in f_in:
f_out.write(l)
for line in f_in:
f_out.write(line)
return tmp_path

def _validate_message(self, message):
Expand Down
10 changes: 5 additions & 5 deletions perceval/backends/core/pipermail.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Pipermail(MBox):
:param archive: archive to store/retrieve items
:param ssl_verify: enable/disable SSL verification
"""
version = '0.11.0'
version = '0.11.1'

CATEGORIES = [CATEGORY_MESSAGE]

Expand Down Expand Up @@ -217,8 +217,8 @@ def fetch(self, from_date=DEFAULT_DATETIME):
if not os.path.exists(self.dirpath):
os.makedirs(self.dirpath)

for l in links:
filename = os.path.basename(l)
for link in links:
filename = os.path.basename(link)

mbox_dt = self._parse_date_from_filepath(filename)

Expand All @@ -227,10 +227,10 @@ def fetch(self, from_date=DEFAULT_DATETIME):
from_date < mbox_dt):

filepath = os.path.join(self.dirpath, filename)
success = self._download_archive(l, filepath)
success = self._download_archive(link, filepath)

if success:
fetched.append((l, filepath))
fetched.append((link, filepath))

logger.info("%s/%s MBoxes downloaded", len(fetched), len(links))

Expand Down
4 changes: 2 additions & 2 deletions tests/test_mbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ def copy_mbox_side_effect(*args, **kwargs):

with mbox.container as f_in:
with open(tmp_path, mode='wb') as f_out:
for l in f_in:
f_out.write(l)
for line in f_in:
f_out.write(line)
return tmp_path

shutil.copy(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data/mbox/mbox_single.mbox'),
Expand Down
2 changes: 1 addition & 1 deletion tests/test_nntp.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def article(self, article_id):
raise nntplib.NNTPTemporaryError('not found')

with open(a[1], 'rb') as f:
lines = [l.rstrip() for l in f]
lines = [line.rstrip() for line in f]
return None, MockArticleInfo(article_id, message_id, lines)

def quit(self):
Expand Down

0 comments on commit 7f4cceb

Please sign in to comment.