Changelog

1.14.1 (2026-05-05)

  • Documented that custom rule prefixes need to be added to ruff’s [tool.ruff.lint].external setting

1.14.0 (2026-05-05)

  • Added support for project-specific (custom) rules via the custom_rules setting in pyproject.toml

  • Generalised # noqa: <CODE> detection to recognise custom rule IDs (no longer limited to PBR/DBR prefixes)

  • Fixed a bug where # noqa codes were matched as substrings (# noqa: PBR0011 could mute PBR001); codes are now matched exactly

  • Fixed a bug where code-shaped tokens outside the # noqa: payload (e.g. # fixes PBR001 ticket  # noqa: PBR002) silently widened the suppression set; only codes after # noqa: and before any subsequent # are now honoured

  • Accept uppercase (# NOQA:) and whitespace-tolerant (#noqa:PBR001) noqa directives, matching flake8/ruff

  • Fixed a bug in the exclude list where a single invalid rule ID silently disabled all other exclusions for that rule; invalid IDs now warn but valid ones are still honoured

  • Malformed source files (e.g. unterminated triple-quoted strings) now produce the user-friendly BoaRestrictorParsingError instead of a raw tokenize.TokenError

  • Custom rules are validated eagerly at load time: RULE_ID must match ^[A-Z]+\d+$ (e.g. MYP001), and both RULE_ID and RULE_LABEL must be strings — misconfigured rules fail the run with a clear message before any file is linted

1.13.3 (2026-03-30)

  • Maintenance via ambient-package-update

1.13.2 (2026-03-30)

  • Maintenance updates via ambient-package-update

1.13.1 (2026-03-27)

  • Performance improvements for rules DBR002, DBR005, DBR006, and DBR007

1.13.0 (2026-02-27)

  • Added new rule DBR007 to require max_length for Django model CharField

1.12.8 (2026-02-17)

  • Fixed a bug where PBR002 would trigger for functions having an inner function

1.12.7 (2025-12-11)

  • Added improved warning on SyntaxErrors to indicate possible Python version mismatch

  • Updated docs about mismatching Python versions

1.12.6 (2025-12-11)

  • Maintenance updates via ambient-package-update

1.12.5 (2025-12-02)

  • Fixed a bug not detecting DBR003 issues

1.12.4 (2025-11-05)

  • Updating linters and formatters

1.12.3 (2025-10-15)

  • Maintenance updates via ambient-package-update

1.12.2 (2025-10-10)

  • Maintenance updates via ambient-package-update

1.12.1 (2025-09-29)

  • Optimized toml variable loading

1.12.0 (2025-09-29)

  • Reverted changes after finding critical bug leading to always skipping first file passed from pre-commit

1.11.2 (2025-09-29)

  • Possible bugfix with pre-commit integration

1.11.1 (2025-09-29)

  • Made linter more robust against unexpected issues

1.11.0 (2025-09-29)

  • Added new AvoidTupleBasedModelChoices rule

1.10.6 (2025-09-02)

  • Added noqa option to docs

1.10.5 (2025-08-18)

  • Fixed an odd issue with rules not being detected

1.10.4 (2025-08-15)

  • Fixed a bug which caused DBR005 rule to crash on relative imports

1.10.3 (2025-08-14)

  • Added disclaimer about linter usage to the docs

1.10.2 (2025-07-09)

  • Extended PBR008 to also detect set and dict comprehensions

1.10.1 (2025-07-08)

  • Extended PBR008 to also detect list comprehensions

1.10.0 (2025-07-01)

  • Added Django-only rule to prohibit usage of “django.db” in the API layer (DBR005)

1.9.0 (2025-06-28)

  • Added new rule to prohibit usage of loops in unittests (PBR008)

1.8.1 (2025-06-11)

  • Improved docs and added test for file-based rule exclusions

1.8.0 (2025-06-11)

  • Added rule to prohibit usage of “datetime.now()” in favour of “django.utils.timezone.now()”

  • Restructured documentation

  • Updated package claim to include Django

1.7.3 (2025-05-29)

  • Maintenance updates via ambient-package-update

  • 1.7.2 (2025-05-12)

    • Fixed a bug in the docs at “DBR002”

  • 1.7.1 (2025-05-12)

    • Updated docs about ruff support and Django-based rules

  • 1.7.0 (2025-05-09)

    • Avoid usage of type-hints in variable names as suffixes (PBR007)

  • 1.6.0 (2025-05-09)

    • Added rule DBR003 to prohibit usage of “assertTrue” and “assertFalse” in Django unittests

  • 1.5.3 (2025-05-09)

    • Fixed bug that DBR rules couldn’t be ignored via “noqa” statements

  • 1.5.2 (2025-05-09)

    • Removed matches of DBR002 if import is just for type-hinting purposes

  • 1.5.1 (2025-04-16)

    • Fixed a bug which would show wrong occurrence paths in pre-commit output

  • 1.5.0 (2025-04-16)

    • Added Django-only rule to prohibit usage of “django.db” in the view layer

  • 1.4.0 (2025-04-11)

    • Added first Django-only rule to prohibit use of TestCase.assertRaises()

  • 1.3.5 (2025-04-04)

    • Caught exception when pyproject.toml contains syntax errors

  • 1.3.4 (2025-04-04)

    • Maintenance via ambient-package-update

  • 1.3.3 (2025-01-15)

    • Fixed a crash when invalid source code was passed to the linter

  • 1.3.2 (2025-01-15)

    • Moved parts of documentation from Readme to RTD

  • 1.3.1 (2025-01-13)

    • Added check in unittests to avoid forgetting to register new rules

  • 1.3.0 (2025-01-13)

    • Added rule PBR005 for ensuring service classes have exactly one public method called “process”

    • Added rule PBR006 for ensuring abstract classes inherit from abc.ABC

  • 1.2.1 (2024-12-13)

    • Allowed other imports from datetime module except datetime and date

  • 1.2.0 (2024-12-10)

    • Added per-file exclusion list in configuration

    • Added warnings if non-existing rules are excluded in the configuration

    • Removed occurrence counter output in CLI since pre-commit calls the linter recursively

  • 1.1.2 (2024-12-09)

    • Removed success message since pre-commit runs any linter x times

  • 1.1.1 (2024-12-09)

    • Fixed a bug that caused PBR004 not to be executed

  • 1.1.0 (2024-12-09)

    • Added rule PBR003 for prohibiting import nested datetime from datetime module

    • Added rule PBR004 for enforcing kw_only parameter for dataclasses

    • Moved AST creation from rule declaration to cli level for performance reasons

  • 1.0.3 (2024-12-02)

    • Re-added Django dependency

    • Added ruff linting rules

  • 1.0.2 (2024-12-02)

    • Fixed sphinx docs

  • 1.0.1 (2024-12-02)

    • Added forgotten changelog

    • Added docs for git tags for pre-commit

  • 1.0.0 (2024-12-02)

    • Added rule PBR001 for enforcing kwargs in functions and methods

    • Added rule PBR002 for enforcing return type-hints when a function contains a return statement

    • Project setup and configuration