mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:39:12 +00:00
Attach dangling comments to the comprehension instead of the if
or iter
nodes (#7693)
This commit is contained in:
parent
e62e245c61
commit
e2ec42539b
13 changed files with 124 additions and 22 deletions
|
@ -101,6 +101,13 @@ aaaaaaaaaaaaaaaaaaaaa = [
|
|||
x
|
||||
for (x, y,) in z if head_name
|
||||
]
|
||||
|
||||
[
|
||||
1 for components in # pylint: disable=undefined-loop-variable
|
||||
b + # integer 1 may only have decimal 01-09
|
||||
c # negative decimal
|
||||
]
|
||||
|
||||
```
|
||||
|
||||
## Output
|
||||
|
@ -234,6 +241,12 @@ aaaaaaaaaaaaaaaaaaaaa = [
|
|||
) in z
|
||||
if head_name
|
||||
]
|
||||
|
||||
[
|
||||
1
|
||||
for components in b # pylint: disable=undefined-loop-variable # integer 1 may only have decimal 01-09
|
||||
+ c # negative decimal
|
||||
]
|
||||
```
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue