mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:38:25 +00:00
![]() ## Summary Resolves #15997. Ruff used to introduce syntax errors while fixing these cases, but no longer will: ```python {"a": [], **{},} # ^^^^ Removed, leaving two contiguous commas {"a": [], **({})} # ^^^^^ Removed, leaving a stray closing parentheses ``` Previously, the function would take a shortcut if the unpacked dictionary is empty; now, both cases are handled using the same logic introduced in #15394. This change slightly modifies that logic to also remove the first comma following the dictionary, if and only if it is empty. ## Test Plan `cargo nextest run` and `cargo insta test`. |
||
---|---|---|
.. | ||
resources | ||
src | ||
Cargo.toml |