1
0
Fork 0
forked from github/pelican

fix linting errors

This commit is contained in:
Deniz Turgut 2020-05-12 23:30:03 +03:00
commit 873df9094a
No known key found for this signature in database
GPG key ID: 87B7168D7AB3ED2F
3 changed files with 11 additions and 11 deletions

View file

@ -201,20 +201,20 @@ class LogCountHandler(BufferingHandler):
def count_logs(self, msg=None, level=None):
return len([
l
for l
rec
for rec
in self.buffer
if (msg is None or re.match(msg, l.getMessage())) and
(level is None or l.levelno == level)
if (msg is None or re.match(msg, rec.getMessage())) and
(level is None or rec.levelno == level)
])
def count_formatted_logs(self, msg=None, level=None):
return len([
l
for l
rec
for rec
in self.buffer
if (msg is None or re.search(msg, self.format(l))) and
(level is None or l.levelno == level)
if (msg is None or re.search(msg, self.format(rec))) and
(level is None or rec.levelno == level)
])

View file

@ -73,8 +73,8 @@ class TestPelican(LoggedTestCase):
return True
return False
if err:
err = '\n'.join([l for l in err.decode('utf8').splitlines()
if not ignorable_git_crlf_errors(l)])
err = '\n'.join([line for line in err.decode('utf8').splitlines()
if not ignorable_git_crlf_errors(line)])
assert not out, out
assert not err, err

View file

@ -88,7 +88,7 @@ def ask(question, answer=str, default=None, length=None):
if default:
r = input('> {} [{}] '.format(question, default))
else:
r = input('> {} '.format(question, default))
r = input('> {} '.format(question))
r = r.strip()