Skip to content

Conversation

TaKO8Ki
Copy link
Contributor

@TaKO8Ki TaKO8Ki commented Sep 26, 2025

Summary

Fixes #19138

  • Treat comments located between the as token and the alias name as trailing comments on the alias.
  • Add regression test to cover the case.

Test Plan

I have added a test case to import_from.py.

Copy link
Contributor

ruff-ecosystem results

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@MichaReiser
Copy link
Member

MichaReiser commented Sep 26, 2025

Uff sorry. @amyreese was already working on this when we assigned the issue to you. We didn't notice because I forgot to assign @amyreese. I'm very sorry that this happened.

I close this in favor of #20561.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debug assert The node has dangling comments that need to be formatted manually. Add the special dangling comments handling to fmt_fields.

2 participants