mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-03 05:13:00 +00:00
[flake8-comprehension] Mark autofix for C420 as unsafe if there's comments inside the dict comprehension (#18768)
This commit is contained in:
parent
06da2c808f
commit
65b288b45b
3 changed files with 66 additions and 2 deletions
|
|
@ -90,3 +90,14 @@ def func():
|
|||
|
||||
def func():
|
||||
{(a, b): a + b for (a, b) in [(1, 2), (3, 4)]} # OK
|
||||
|
||||
# https://github.com/astral-sh/ruff/issues/18764
|
||||
{ # 1
|
||||
a # 2
|
||||
: # 3
|
||||
None # 4
|
||||
for # 5
|
||||
a # 6
|
||||
in # 7
|
||||
iterable # 8
|
||||
} # 9
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue