Skip to content

Sourcery Comments

Besides refactorings and suggestions, Sourcery also provides comments. In these cases, we have identified a possible issue with your code, but do not provide a specific fix.

For example, it's not a good practice to raise a general Exception, but we can't tell which specific error class would be a better fit. (Possibly one that you'll define.)

If you want to disable any of the comments in a specific function add in the comment # sourcery skip followed by the comment id. To skip it across your whole project add it into the refactor skips section of your Sourcery config file.

To disable all comments and only see refactorings and suggestions, unselect the rule type "comments" in your editor config. You can also set the rule_types property in the .sourcery.yaml config file.

If you have any questions about any of these comments or have suggestions for new ones please reach out to us.

Back to top