New walkthrough in VS Code and lots more power for custom rules!
We’ve added a walkthrough to our VS Code extension to make it easier to get started with Sourcery. Go to the Help > Get Started menu to check it out.
We’ve added two new refactorings for pandas! These aim to improve performance
by streamlining apply operations. If you have any feedback or more ideas for
rules you’d like to see in pandas please
let us know!
Custom rules are now even more powerful!
- You can specify paths that rules should be included or excluded from running on.
- You can now add tests for rules in-line in the config file
Added
sourcery initcommand to produce a default.sourcery.yamlconfiguration filereplace-apply-with-method-callrefactoring for PandasSeriesandDataFramereplace-apply-with-numpy-operationrefactoring for PandasSeriesandDataFrame- Rules can specify
pathsthat theyinclude/excludefrom running on - Support for
testsin custom rule configuration - Walkthrough for VS Code
- The
.sourcery.yamlfile is now validated when it is opened in PyCharm
Changed
- Added
versionto config file and removedrecommendation_levelfrom output - Allow pattern/replacement for custom rules to contain any combination of statement or expression
Fixed
- Issue where
for-index-replacementcould remove indices that were accessed later. - Tuples should now be given the correct parentheses everywhere (fixes issue )
- Ensure consistency between similar fstring examples
sum-comprehension: Do not apply if the namesumhas already been used.remove-redundant-fstringwon’t remove the content of multi-line fstrings.