Fix panic with empty attribute inner comment (#6332)

Fixes https://github.com/astral-sh/ruff/issues/6181
This commit is contained in:
David Szotten 2023-08-04 10:59:55 +01:00 committed by GitHub
parent a48d16e025
commit fe97a2a302
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 6 deletions

View file

@ -112,7 +112,9 @@ x6 = (
a.b
)
# regression: https://github.com/astral-sh/ruff/issues/6181
(#
()).a
```
## Output
@ -200,6 +202,12 @@ x6 = (
# Check assumption with enclosing nodes
a.b
)
# regression: https://github.com/astral-sh/ruff/issues/6181
(
#
()
).a
```