Skip to content

Reject parenthesized star imports - #26021

Merged
charliermarsh merged 1 commit into
mainfrom
charlie/reject-parenthesized-star-import
Jun 15, 2026
Merged

Reject parenthesized star imports#26021
charliermarsh merged 1 commit into
mainfrom
charlie/reject-parenthesized-star-import

Conversation

@charliermarsh

Copy link
Copy Markdown
Member

Summary

Reject parenthesized star imports such as:

from module import (*)

Python only permits a bare star in from imports. The parser previously accepted the parenthesized form because star aliases were parsed independently of the surrounding import-list delimiters.

This adds the missing parser validation while preserving ordinary parenthesized imports and bare star imports.

@astral-sh-bot

astral-sh-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

Memory usage report

Memory usage unchanged ✅

@astral-sh-bot

astral-sh-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

ecosystem-analyzer results

No diagnostic changes detected ✅

Flaky changes detected. This PR summary excludes flaky changes; see the HTML report for details.

Full report with detailed diff (timing results)

@astral-sh-bot

astral-sh-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@charliermarsh charliermarsh changed the title [parser] Reject parenthesized star imports Reject parenthesized star imports Jun 15, 2026
@charliermarsh
charliermarsh marked this pull request as ready for review June 15, 2026 21:01
@charliermarsh charliermarsh added the parser Related to the parser label Jun 15, 2026
@charliermarsh
charliermarsh merged commit a50dc58 into main Jun 15, 2026
59 checks passed
@charliermarsh
charliermarsh deleted the charlie/reject-parenthesized-star-import branch June 15, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parser Related to the parser

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant