pyupgrade (UP
) fixes do not include dict
/set
literal fixes
#12592
Labels
documentation
Improvements or additions to documentation
I noticed that the pyupgrade fixes result in different output to pyupgrade itself. Namely, it doesn't apply replace the use of
dict()
andset()
with the equivalent literals.pyupgrade
identifies and replaces these:ruff
does not (at least not using just theU
fix class):However, while I couldn't find anything confirming this (it's not mentioned in #827 and a search through other issues didn't highlight anything), it seems enabling another class of rules, the flake8-comprehensions (
C4
), resolves this.I don't know if the documentation tooling allows this (https://docs.astral.sh/ruff/rules/ appears to be auto-generated) but it could be helpful to provide a pointer or note to this effect for someone looking to replace pyupgrade wholesale? Alternatively, maybe this issue is enough of a pointer and it can simply be closed straight off 😄
The text was updated successfully, but these errors were encountered: