From 09755c3e240a48c85c9bd7f734df408e3614c122 Mon Sep 17 00:00:00 2001 From: didericis Date: Fri, 26 Jun 2026 23:08:12 -0400 Subject: [PATCH] chore: drop pyright/pylint badges and their badge-update automation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pyright "0 errors" and pylint "9.93/10" badges were static, hand-synced shields that duplicated state the `lint` CI job already enforces — a maintenance tax that could silently drift from reality. Remove both badges from the README and strip the corresponding steps (pylint/pyright runs, sed rewrites, commit-message lines, and the `.pylintrc`/`pyrightconfig.json` path triggers) from the badge-update workflow. Lint/type enforcement in CI is unchanged; only the published badges go away. Coverage and core-coverage badges stay. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01NkwFXLFff9PYPy4wgVBJp9 --- .gitea/workflows/update-badges.yml | 32 ++---------------------------- README.md | 2 -- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/.gitea/workflows/update-badges.yml b/.gitea/workflows/update-badges.yml index d04c200..2c587f4 100644 --- a/.gitea/workflows/update-badges.yml +++ b/.gitea/workflows/update-badges.yml @@ -6,8 +6,6 @@ on: - main paths: - '**.py' - - '.pylintrc' - - 'pyrightconfig.json' - '.coveragerc' # The core-coverage badge reads this list; refresh when it changes. - 'scripts/critical-modules.txt' @@ -32,22 +30,6 @@ jobs: python -m pip install --upgrade pip pip install -r requirements-dev.txt - - name: Run pylint and extract score - id: pylint - run: | - PYLINT_OUTPUT=$(python -m pylint bot_bottle/ 2>&1) || true - SCORE=$(echo "$PYLINT_OUTPUT" | grep -oP '(?<=rated at )\d+\.\d+/10' | head -1) - echo "score=$SCORE" >> $GITHUB_OUTPUT - echo "Pylint score: $SCORE" - - - name: Run pyright and check errors - id: pyright - run: | - PYRIGHT_OUTPUT=$(python -m pyright 2>&1) || true - ERRORS=$(echo "$PYRIGHT_OUTPUT" | grep -oP '\d+(?= error)' | head -1) - echo "errors=$ERRORS" >> $GITHUB_OUTPUT - echo "Pyright errors: $ERRORS" - - name: Run coverage and extract percentage id: coverage run: | @@ -69,19 +51,9 @@ jobs: - name: Update badges in README run: | - PYLINT_SCORE="${{ steps.pylint.outputs.score }}" - PYRIGHT_ERRORS="${{ steps.pyright.outputs.errors }}" COVERAGE_PERCENT="${{ steps.coverage.outputs.percent }}" CORE_COVERAGE_PERCENT="${{ steps.core_coverage.outputs.percent }}" - PYLINT_SCORE_ENCODED=$(echo "$PYLINT_SCORE" | sed 's|/|%2F|g') - - if [ -n "$PYLINT_SCORE_ENCODED" ]; then - sed -i "s|/badge/pylint-[^)]*|/badge/pylint-${PYLINT_SCORE_ENCODED}-brightgreen|" README.md - fi - if [ -n "$PYRIGHT_ERRORS" ]; then - sed -i "s|/badge/pyright-[^)]*|/badge/pyright-${PYRIGHT_ERRORS}%20errors-brightgreen|" README.md - fi if [ -n "$COVERAGE_PERCENT" ]; then sed -i "s|/badge/coverage-[^)]*|/badge/coverage-${COVERAGE_PERCENT}%25-brightgreen|" README.md fi @@ -90,7 +62,7 @@ jobs: fi echo "Updated badges:" - grep -E "pylint|pyright|coverage" README.md | head -4 + grep -E "coverage" README.md | head -2 - name: Commit and push badge updates run: | @@ -103,7 +75,7 @@ jobs: else echo "Badge changes detected, committing..." git add README.md - MSG="chore: update quality badges"$'\n\n'"- Pylint: ${{ steps.pylint.outputs.score }}"$'\n'"- Pyright: ${{ steps.pyright.outputs.errors }} errors"$'\n'"- Coverage: ${{ steps.coverage.outputs.percent }}%"$'\n'"- Core coverage: ${{ steps.core_coverage.outputs.percent }}%"$'\n\n'"[skip ci]" + MSG="chore: update quality badges"$'\n\n'"- Coverage: ${{ steps.coverage.outputs.percent }}%"$'\n'"- Core coverage: ${{ steps.core_coverage.outputs.percent }}%"$'\n\n'"[skip ci]" git commit -m "$MSG" git push fi diff --git a/README.md b/README.md index 80577e3..3be9ef1 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@ # bot-bottle [![test](https://gitea.dideric.is/didericis/bot-bottle/actions/workflows/test.yml/badge.svg?branch=main)](https://gitea.dideric.is/didericis/bot-bottle/actions?workflow=test.yml) -[![pylint](https://img.shields.io/badge/pylint-9.93%2F10-brightgreen)](https://github.com/PyCQA/pylint) -[![pyright](https://img.shields.io/badge/pyright-0%20errors-brightgreen)](https://github.com/microsoft/pyright) [![coverage](https://img.shields.io/badge/coverage-84%25-brightgreen)](https://coverage.readthedocs.io/) [![core coverage](https://img.shields.io/badge/core%20coverage-96%25-brightgreen)](https://gitea.dideric.is/didericis/bot-bottle/src/branch/main/docs/decisions/0004-coverage-policy.md)