Skip to content

[ruff] add import annotations for UP007 & UP045 - #23259

Merged
ntBre merged 7 commits into
astral-sh:mainfrom
11happy:import_annotation_for_UP007_and_UP045
Jun 5, 2026
Merged

[ruff] add import annotations for UP007 & UP045#23259
ntBre merged 7 commits into
astral-sh:mainfrom
11happy:import_annotation_for_UP007_and_UP045

Conversation

@11happy

@11happy 11happy commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

Summary

part of #19359

Test Plan

added tests & snapshots

@11happy
11happy force-pushed the import_annotation_for_UP007_and_UP045 branch from 4bf8c65 to 768f4c2 Compare February 13, 2026 06:44
@astral-sh-bot

astral-sh-bot Bot commented Feb 13, 2026

Copy link
Copy Markdown

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre ntBre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See my comment on #23260 (review). I think this PR has the same issues. It's probably best to get one of these landed and then apply the same approach to the other instead of updating them both in parallel since I think they'll be quite similar.

@ntBre ntBre added rule Implementing or modifying a lint rule preview Related to preview mode features labels Feb 20, 2026
@11happy

11happy commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

Making it draft as once UP006 lands I will update this similarly here.

@11happy
11happy marked this pull request as draft March 5, 2026 07:59
@11happy
11happy force-pushed the import_annotation_for_UP007_and_UP045 branch 2 times, most recently from 7460d0c to 6b36c53 Compare March 16, 2026 15:48
@11happy
11happy marked this pull request as ready for review March 16, 2026 16:26
@astral-sh-bot
astral-sh-bot Bot requested a review from amyreese March 16, 2026 16:26
@11happy

11happy commented Mar 16, 2026

Copy link
Copy Markdown
Contributor Author

Its ready for review kept it similar to UP006.
Thank you : )

@ntBre
ntBre removed the request for review from amyreese May 27, 2026 20:31
@ntBre ntBre self-assigned this May 27, 2026

@ntBre ntBre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you! And sorry for the delay. This looks quite good to me overall, I just found one place where I think we are missing the new fix, and a couple of small docs updates. Do you mind taking care of the merge conflicts too?

Comment thread crates/ruff_linter/src/rules/pyupgrade/rules/use_pep604_annotation.rs Outdated
11happy added 6 commits June 1, 2026 18:36
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>

missing snap

Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>

update snaps

Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>

add snaps

Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
@11happy
11happy force-pushed the import_annotation_for_UP007_and_UP045 branch from 13a66ff to e9ae6db Compare June 1, 2026 13:35
@11happy

11happy commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

done I have addressed all the comments & fixed the merge conflicts : )

@ntBre ntBre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you!

@ntBre
ntBre merged commit 568519e into astral-sh:main Jun 5, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Related to preview mode features rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants