Skip to content

Conversation

@Daverball
Copy link
Contributor

@Daverball Daverball commented Nov 28, 2024

Summary

Another minor thing that came up as part of #12927

TC004 doesn't use the runtime_imports vector we're building during analysis of deferred scopes, so we don't need to do that work when it's the only typing import rule that is enabled.

Test Plan

cargo nextest run

@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

We still shouldn't run TC004 in stub files, it won't ever cause
violations so we do a whole bunch of work for nothing
Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

Thanks

@MichaReiser MichaReiser added the internal An internal refactor or improvement label Nov 28, 2024
@MichaReiser MichaReiser merged commit d9cbf2f into astral-sh:main Nov 28, 2024
21 checks passed
@Daverball Daverball deleted the refactor/unnecessary-tc004-overhead branch November 28, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants