Fix pylint for run_check.py

This commit is contained in:
Mikhail f. Shiryaev 2022-01-13 14:51:48 +01:00
parent f1b216cac3
commit 89415ff415
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4

View File

@ -127,13 +127,10 @@ def should_run_checks_for_pr(pr_info):
def check_pr_description(pr_info):
description = pr_info.body
lines = [
line
for line in map(
lambda x: x.strip(), description.split("\n") if description else []
)
]
lines = [re.sub(r"\s+", " ", l) for l in lines]
lines = list(
map(lambda x: x.strip(), description.split("\n") if description else [])
)
lines = [re.sub(r"\s+", " ", line) for line in lines]
category = ""
entry = ""
@ -198,7 +195,7 @@ def check_pr_description(pr_info):
return ""
if not entry:
return "Changelog entry required for category '{}'".format(category)
return f"Changelog entry required for category '{category}'"
return ""