ruff/crates
qdegraaf 7566ca8ff7
Refactor `repeated_keys()` to use `ComparableExpr` (#5696)
## Summary

Replaces `DictionaryKey` enum with the more general `ComparableExpr`
when checking for duplicate keys

## Test Plan

Added test fixture from issue. Can potentially be expanded further
depending on what exactly we want to flag (e.g. do we also want to check
for unhashable types?) and which `ComparableExpr::XYZ` types we consider
literals.

## Issue link

Closes: https://github.com/astral-sh/ruff/issues/5691
2023-07-12 03:46:53 +00:00
..
flake8_to_ruff Bump version to 0.0.277 (#5515) 2023-07-04 17:31:32 -04:00
ruff Refactor `repeated_keys()` to use `ComparableExpr` (#5696) 2023-07-12 03:46:53 +00:00
ruff_benchmark Create `PyFormatOptions` 2023-06-26 14:02:17 +02:00
ruff_cache Only use a single cache file per Python package (#5117) 2023-06-19 17:46:13 +02:00
ruff_cli Run nightly Clippy over the Ruff repo (#5670) 2023-07-10 23:44:38 -04:00
ruff_dev Print files that are slow to format (#5681) 2023-07-11 13:03:18 +00:00
ruff_diagnostics Run nightly Clippy over the Ruff repo (#5670) 2023-07-10 23:44:38 -04:00
ruff_formatter Remove `mode` from `BestFitting` 2023-07-11 14:19:26 +02:00
ruff_index Add unreachable code rule (#5384) 2023-07-04 14:27:23 +00:00
ruff_macros Run nightly Clippy over the Ruff repo (#5670) 2023-07-10 23:44:38 -04:00
ruff_python_ast Run nightly Clippy over the Ruff repo (#5670) 2023-07-10 23:44:38 -04:00
ruff_python_formatter Only omit optinal parens if the expression ends or starts with a parenthesized expression 2023-07-11 17:05:25 +02:00
ruff_python_resolver Fix CI by downgrading to cargo insta 1.29.0 (#5589) 2023-07-08 14:54:49 +00:00
ruff_python_semantic Differentiate between runtime and typing-time annotations (#5575) 2023-07-07 00:21:44 -04:00
ruff_python_stdlib Remove some additional manual iterator matches (#5482) 2023-07-03 16:29:59 +00:00
ruff_python_whitespace Use consistent `Cargo.toml` metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_rustpython Use consistent `Cargo.toml` metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_textwrap Use consistent `Cargo.toml` metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_wasm [`pyupgrade`] Restore the `keep-runtime-typing` setting (#5470) 2023-07-03 02:11:31 +00:00