From d43f86e482d7d98702bef77ffbbe07eee6583a4a Mon Sep 17 00:00:00 2001 From: Andreas Finkler <3929834+DudeNr33@users.noreply.github.com> Date: Tue, 12 Jul 2022 19:28:00 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Pierre Sassoulas --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .../contributor_guide/contribute.rst | 2 +- script/check_newsfragments.py | 24 +++++++++++++------ 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3d3adb0f171..82bd53ea5a7 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -7,7 +7,7 @@ To ease the process of reviewing your PR, do make sure to complete the following - [ ] Create a news fragment with `towncrier create .` which will be included in the changelog. `` can be one of: new_check, removed_check, extension, false_positive, false_negative, bugfix, other, internal. If necessary you can write - details of offer examples on how the new change is supposed to work. + details or offer examples on how the new change is supposed to work. - [ ] If you used multiple emails or multiple names when contributing, add your mails and preferred name in ``script/.contributors_aliases.json`` --> diff --git a/doc/development_guide/contributor_guide/contribute.rst b/doc/development_guide/contributor_guide/contribute.rst index 4bf64d0b528..b2fc5bc4ab0 100644 --- a/doc/development_guide/contributor_guide/contribute.rst +++ b/doc/development_guide/contributor_guide/contribute.rst @@ -21,7 +21,7 @@ your patch gets accepted: - Create a news fragment with `towncrier create .` which will be included in the changelog. `` can be one of: new_check, removed_check, extension, false_positive, false_negative, bugfix, other, internal. If necessary you can write - details of offer examples on how the new change is supposed to work. + details or offer examples on how the new change is supposed to work. - Document your change, if it is a non-trivial one. diff --git a/script/check_newsfragments.py b/script/check_newsfragments.py index 90618828fc6..cb5544f0b10 100644 --- a/script/check_newsfragments.py +++ b/script/check_newsfragments.py @@ -59,13 +59,23 @@ def check_file(file: Path, verbose: bool) -> bool: print(f"Checked '{file}': LGTM 🤖👍") return True print( - f"{file}: does not respect the standard format 🤖👎\n\n" - "The standard format is:\n\n" - "\n" - "\n" - "\n\n" - "where can be one of:\n" - f"{', '.join(VALID_ISSUES_KEYWORDS)}" + f"""\ +{file}: does not respect the standard format 🤖👎 + +The standard format is: + + + + # + +Where can be one of: {', '.join(VALID_ISSUES_KEYWORDS)} + +For example: + +``pylint.x.y`` is now a private API. + +Refs #1234 +""" ) return False