Skip to content

Avoid module lookup for known classes when possible#14343

Merged
MichaReiser merged 1 commit intomainfrom
micha/known-class-avoid-module-lookup
Nov 14, 2024
Merged

Avoid module lookup for known classes when possible#14343
MichaReiser merged 1 commit intomainfrom
micha/known-class-avoid-module-lookup

Conversation

@MichaReiser
Copy link
Copy Markdown
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 ty 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
@github-actions
Copy link
Copy Markdown
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
@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

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant