mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:24 +00:00
![]() <!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary <!-- What's the purpose of the change? What does it do, and why? --> Fix #11482. Applies https://github.com/adamchainz/flake8-comprehensions/pull/205 to ruff. `C416` should be skipped if comprehension contains unpacking. Here's an example: ```python list_of_lists = [[1, 2], [3, 4]] # ruff suggests `list(list_of_lists)` here, but that would change the result. # `list(list_of_lists)` is not `[(1, 2), (3, 4)]` a = [(x, y) for x, y in list_of_lists] # This is equivalent to `list(list_of_lists)` b = [x for x in list_of_lists] ``` ## Test Plan <!-- How was it tested? --> Existing checks --------- Signed-off-by: harupy <hkawamura0130@gmail.com> |
||
---|---|---|
.. | ||
resources | ||
src | ||
Cargo.toml |