Sourcery will now show suggestions which are not strict refactorings, but
which will improve the code quality or avoid common coding mistakes. In VS
Code refactorings will now show as yellow warnings, while suggestions will be
at the blue information level. In PyCharm refactorings will stay as warnings,
while suggestions will show as weak warnings. These suggestions can be toggled
on or off with a new command in VS Code -
Toggle Sourcery Recommendation Level, and through a toggle button in the
Sourcery panel in PyCharm. The toggle can also be made directly in the user
suggestion - this is the first suggestion, and triggers when you use a
dictionary, set or list as a default argument to a function.
Sourcery now suggests some refactorings that require Python 3.9 by default. In
these cases a new code action is shown allowing the user to configure which
version of Python Sourcery should assume is being used (this is configured in
the user or project level sourcery yaml
merge-nested-ifs will no longer trigger if either condition contains a named
for-index-underscore will now also trigger on comprehensions and generators.
Enhanced remove-unused-enumerate to handle comprehensions
use-any and comprehension proposers will no longer incorrectly suggest
incorporating code containing named expressions.