Open stephenfin opened 3 months ago
👍 Yeah I think we just rolled these out under the C4
category because the already existed there. I'm not sure where we could relay this information. We've talked about supporting rule aliases in the past, but it raises all kinds of tricky UX questions 🤔
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 https://github.com/astral-sh/ruff/issues/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 :smile: