Our new duplicate code detection feature is now available for PyCharm!
You can now select multiple files or folders and choose 'Sourcery - Detect Clones' to scan for duplicated code within them. This will find sections of code that are 3 lines long or greater that are duplicated in multiple places. It will also find near-duplicate code where variable names have been changed but the code structure remains the same. The duplicate code found will appear in the Sourcery tool window.
This feature is available in our Pro subscription. It is in active development so we would love your feedback.
Have a piece of code that you don't want to touch that is giving a low quality warning?
You can now disable these warnings in VS Code and PyCharm. Add
# sourcery no-metrics at
the end of the line with the function definition to do so. There's also a new quick-fix
action on the warnings to disable them.