forked from github/pelican
fix linting errors
This commit is contained in:
parent
21242e3a47
commit
873df9094a
3 changed files with 11 additions and 11 deletions
|
|
@ -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)
|
||||
])
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue