mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 12:29:28 +00:00
![]() In the following code, the comment used to get wrongly associated with
the `if False` since it looked like an elif. This fixes it by checking
the indentation and adding a regression test
```python
if True:
pass
else: # Comment
if False:
pass
pass
```
Originally found in
|
||
---|---|---|
.. | ||
snapshots | ||
debug.rs | ||
format.rs | ||
map.rs | ||
mod.rs | ||
node_key.rs | ||
placement.rs | ||
visitor.rs |