Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid module lookup for known classes when possible #14343

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented Nov 14, 2024

Summary

Avoid calling file_to_module when resolving known classes unless
the class name matches the name of a known class.

I don't expect this to change performance in a significant way (there aren't enough classes)

Test Plan

cargo test

@MichaReiser MichaReiser added the red-knot Multi-file analysis & type inference label Nov 14, 2024
@MichaReiser MichaReiser force-pushed the micha/known-class-avoid-module-lookup branch from 21f4c9b to d9ce50a Compare November 14, 2024 20:06
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser MichaReiser merged commit 24cd592 into main Nov 14, 2024
20 checks passed
@MichaReiser MichaReiser deleted the micha/known-class-avoid-module-lookup branch November 14, 2024 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
red-knot Multi-file analysis & type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant