Changelog


We've focused on improving our documentation for custom rules. Check out these how-to guides:

Added

  • Create Sourcery Rule command to VS Code. This creates a new stub rule in your project-level Sourcery configuration (creating that config if it doesn't exist). You can access this command from the Command Palette, or by selecting the code that you want to be the base pattern for your rule, right clicking and choosing Sourcery: Create Rule.
  • Support for captures in custom rules descriptions
  • CLI option --exclude to exclude some rules for the commands review and refactor
  • Documentation: How to use Sourcery custom rules to get rid of deprecated code
  • Documentation: How to use Sourcery custom rules to remove debugging statements from your code from your code?
  • Reference Documentation about Sourcery custom rules

Changed

Fixed

  • Class-level refactorings will now appear again.
  • Issue with hoist-repeated-if-condition that caused if-statements to appear with empty tests if the hoisted expression was a boolop
  • Improve responsiveness of CLI to keyboard interrupts
  • Fall back to locally saved authentication if Sourcery auth server throws an error
  • Show explanation in VSCode, PyCharm and the CLI for Sourcery custom rules