Skip to content

Comments

[pyupgrade] Prevent infinite loop with I002 and UP026#20634

Merged
ntBre merged 2 commits intoastral-sh:mainfrom
IDrokin117:feature/gh-20601
Sep 30, 2025
Merged

[pyupgrade] Prevent infinite loop with I002 and UP026#20634
ntBre merged 2 commits intoastral-sh:mainfrom
IDrokin117:feature/gh-20601

Conversation

@IDrokin117
Copy link
Contributor

Summary

Closes #20601

Do not treat imports as unused for the rule unnecessary-builtin-import (UP029) if they are required by isort(missing-required-import)

Test Plan

  • Added test case i002_up029_conflict to ensure there is no conflict

@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre ntBre added bug Something isn't working fixes Related to suggested fixes for violations labels Sep 30, 2025
Copy link
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!

@ntBre ntBre merged commit 11dae2c into astral-sh:main Sep 30, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fixes Related to suggested fixes for violations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Infinite loop] I002 and UP029

2 participants