From 6eaac0c37b73681ca08a8903e0c64c79bcdaf85f Mon Sep 17 00:00:00 2001 From: Matthias Dellweg Date: Fri, 26 Jan 2024 17:36:13 +0100 Subject: [PATCH] Pin black dependency [noissue] --- .github/workflows/lint.yml | 2 +- templates/github/.ci/scripts/collect_changes.py.j2 | 8 +++++--- templates/github/lint_requirements.txt.j2 | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index dc1f3bd5..5a8f1e71 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,7 +30,7 @@ jobs: - name: "Lint plugin_template" working-directory: "plugin_template" run: | - pip3 install black flake8 + pip3 install black==23.12.1 flake8 black --version black --check --diff plugin-template utils.py flake8 plugin-template utils.py diff --git a/templates/github/.ci/scripts/collect_changes.py.j2 b/templates/github/.ci/scripts/collect_changes.py.j2 index 4035c1c3..b90ceedc 100755 --- a/templates/github/.ci/scripts/collect_changes.py.j2 +++ b/templates/github/.ci/scripts/collect_changes.py.j2 @@ -14,9 +14,11 @@ tc_settings = toml.load("pyproject.toml")["tool"]["towncrier"] CHANGELOG_FILE = tc_settings.get("filename", "NEWS.rst") START_STRING = tc_settings.get( "start_string", - "\n" - if CHANGELOG_FILE.endswith(".md") - else ".. towncrier release notes start\n", + ( + "\n" + if CHANGELOG_FILE.endswith(".md") + else ".. towncrier release notes start\n" + ), ) TITLE_FORMAT = tc_settings.get("title_format", "{name} {version} ({project_date})") diff --git a/templates/github/lint_requirements.txt.j2 b/templates/github/lint_requirements.txt.j2 index 17f33e01..cf9f1e8e 100644 --- a/templates/github/lint_requirements.txt.j2 +++ b/templates/github/lint_requirements.txt.j2 @@ -2,7 +2,7 @@ # python packages handy for developers, but not required by pulp {% if black -%} -black +black==23.12.1 {% endif -%} check-manifest flake8