Skip to content

Add ruff for linting instead of flake8 and isort#418

Merged
maxdymond merged 1 commit intomainfrom
md/ruff
Mar 30, 2026
Merged

Add ruff for linting instead of flake8 and isort#418
maxdymond merged 1 commit intomainfrom
md/ruff

Conversation

@maxdymond
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the project’s Python linting from flake8/isort to Ruff, updates configuration accordingly, and refactors the changelog renderers to share common rendering logic while adding/adjusting type annotations and docstrings to satisfy the new lint rules.

Changes:

  • Replace flake8/isort tox envs with a Ruff tox env and add ruff.toml configuration.
  • Remove several dev tooling dependencies (flake8/isort/bandit/etc.) and add Ruff to the dev dependency group.
  • Refactor Slack/Teams changelog renderers to use a new shared render_block_document helper and tighten typing/docstrings across code and tests.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tox.ini Switch tox lint env from flake8/bandit to Ruff; updates GH Actions env mapping.
ruff.toml Adds Ruff lint/format configuration (including import sorting, docstrings, annotations, security rules).
pyproject.toml Updates dev dependencies to include Ruff and removes legacy linters; adds basic mypy config.
setup.cfg Removes flake8 configuration section.
src/announcer/common.py Introduces shared rendering helpers and list utilities used by renderers.
src/announcer/changelogrenderer.py Refactors Slack renderer to use shared helper and adds typing/docstrings.
src/announcer/teamschangelogrenderer.py Refactors Teams renderer to use shared helper and adds typing/docstrings.
src/announcer/__init__.py Updates mistletoe Document usage and improves typing/docstrings.
tests/test_announce.py Reorders imports, adds typing/docstrings, and minor test data fixes.
tests/test_changelog.py Adds module/function docstrings and typing; minor string literal cleanup.
CONTRIBUTING.md Updates contributor instructions to reference Ruff instead of flake8.
CHANGELOG.md Notes the Ruff migration in the Unreleased section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Max Dymond <max.dymond@alianza.com>
@maxdymond maxdymond merged commit 986aa38 into main Mar 30, 2026
4 checks passed
@maxdymond maxdymond deleted the md/ruff branch March 30, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants