Skip to content

A minor refinement of the Ruff ruleset#57

Merged
mderner-ca merged 5 commits into
citizensadvice:mainfrom
mderner-ca:main
Jun 26, 2026
Merged

A minor refinement of the Ruff ruleset#57
mderner-ca merged 5 commits into
citizensadvice:mainfrom
mderner-ca:main

Conversation

@mderner-ca

Copy link
Copy Markdown
Collaborator

Adds:

  • Tryceratops - better Exception management
  • Eradicate - no commented out code
  • Flake8-Logging - correct management of logging instances
  • McCabe complexity - warns about overly complex programs (measured by cyclomatic complexity)
  • Ignore for *args type hinting
  • Allow raise of vanilla exception (now disallowed by tryceratops) in tests
  • Links for rules - so anyone copying this template can easily assess for themselves what they like and don't like

Moves:

  • Ignore assert - this definitely wants to be an enforced rule, so moved to be ignored only in tests

@mderner-ca mderner-ca requested a review from a team as a code owner June 25, 2026 15:38
Comment thread pyproject.toml Outdated
* removed the ignore for T201 as we are not enforcing that ruleset anyway
* added clarifying comments for the remaining ignored rules
@mderner-ca mderner-ca merged commit 594325c into citizensadvice:main Jun 26, 2026
2 checks passed
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