Merge pull request #1378 from YunoHost/ci-format-dev

[CI] Format code with Black
This commit is contained in:
Alexandre Aubin 2021-11-14 21:42:14 +01:00 committed by GitHub
commit 2d9bfdce2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View file

@ -210,7 +210,10 @@ class MailDiagnoser(Diagnoser):
# Do the DNS Query # Do the DNS Query
status, answers = dig(query, "A") status, answers = dig(query, "A")
if status != "ok" or (answers and set(answers) <= set(blacklist["non_blacklisted_return_code"])): if status != "ok" or (
answers
and set(answers) <= set(blacklist["non_blacklisted_return_code"])
):
continue continue
# Try to get the reason # Try to get the reason

View file

@ -749,8 +749,12 @@ class OperationLogger(object):
# 72971 DEBUG 29739 + ynh_exit_properly # 72971 DEBUG 29739 + ynh_exit_properly
# which are lines from backup-before-upgrade or restore-after-failed-upgrade ... # which are lines from backup-before-upgrade or restore-after-failed-upgrade ...
filters = [re.compile(f_) for f_ in BORING_LOG_LINES] filters = [re.compile(f_) for f_ in BORING_LOG_LINES]
filters.append(re.compile(r'\d+ \+ ')) filters.append(re.compile(r"\d+ \+ "))
lines = [line for line in lines if not any(filter_.search(line) for filter_ in filters)] lines = [
line
for line in lines
if not any(filter_.search(line) for filter_ in filters)
]
lines_to_display = [] lines_to_display = []