Bugs squished, and a new CLI option!
[0.10.3] - 2022-02-24
Added
use-datetime-now-not-today
refactoringremove-str-from-fstring
refactoring (split out fromsimplify-fstring-formatting
)- New
--include
option to command-line interface and config files. This allows you to specify Sourcery to only apply certain refactoring rules.
Changed
simplify-fstring-formatting
will no longer remove calls tostr
in formatted values. This is not valid for classes which override__repr__
.use-named-expression
will now only trigger where the variable being assigned to is used in the body of theif
chain-compares
will now trigger when comparing to constants, and will avoid mixing different types of comparison- Extend
remove-str-from-print
refactoring to deal with multiple arguments
Fixed
- Disallow
use-next
refactoring when statements have side-effects - Side effect check for
for-append-to-extend
refactoring with tuple loop variables - Fix issue with the
use-any
refactoring - Fix issue where a non integer size metric was being display
- Don’t propose
useless-else-on-loop
when there is abreak
in an inner loop’s else - Ensure we keep two lines between functions when extracting new ones at module level.
- Ensure
default-get
doesnt trigger where the default has side effects - Don’t inline assignments of strings into f-strings (Fixes issue)
- Keep original quotes in fstring refactorings
- Don’t convert unicode CLDR in literal unicode values within fstrings - fixes this issue.