mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-28 02:39:50 +00:00
## Summary
This ensures that we treat `# comment` as parenthesized in contexts
like:
```python
while (
True
# comment
):
pass
```
The same logic applies equally to `for`, `async for`, `if`, `with`, and
`async with`. The general pattern is that you have an expression which
precedes a colon-separated suite.
|
||
|---|---|---|
| .. | ||
| snapshots | ||
| fixtures.rs | ||