Skip to content

Conversation

@henryiii
Copy link
Contributor

@henryiii henryiii commented Nov 17, 2025

This adds the TC checks from ruff. This makes two changes:

  • Things used only for type checking are moved into TYPE_CHECKING import blocks. (autofix, but only under the unsafe fixes flag) Note that some of them already were, this just makes it more consistent.
  • Casts are always strings, since they have no runtime effect, and that also helps avoiding runtime typecheck imports, above.

Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
@henryiii henryiii force-pushed the henryiii/chore/ruff-TC branch from 1f88563 to 7312935 Compare November 17, 2025 17:33
@henryiii henryiii merged commit 516e60a into pypa:main Nov 17, 2025
40 checks passed
@henryiii henryiii deleted the henryiii/chore/ruff-TC branch November 17, 2025 18:19
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.

2 participants