astral-sh / ruff

An extremely fast Python linter and code formatter, written in Rust.
https://docs.astral.sh/ruff
MIT License
28.79k stars 933 forks source link

RUF025 duplicates unimplemented rule C420 #12110

Open tjkuson opened 1 week ago

tjkuson commented 1 week ago

unnecessary-dict-comprehension-for-iterable (RUF025) now exists as a flake8-comprehensions rule (https://github.com/adamchainz/flake8-comprehensions/pull/553).

Although C420 has not been implemented yet, it would make sense (and seems to match what has been done before) to merge the rules in favour of the flake8 plugin. Although the rule request was made to Ruff first (https://github.com/astral-sh/ruff/issues/9592, https://github.com/adamchainz/flake8-comprehensions/issues/552), my understanding is that Ruff favours strong coupling to flake8.

search terms: RUF025, flake8-comprehensions, duplicate, duplication

Related to https://github.com/astral-sh/ruff/issues/2714

charliermarsh commented 1 week ago

Cool, makes sense to me to redirect it to C420! Thanks for doing that.