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

types.rs: remove unused is_stdlib_symbol methods #14104

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

AlexWaygood
Copy link
Member

Summary

These methods are now unused: we now instead use the KnownFunction, KnownClass and KnownInstance enums to track whether a FunctionLiteral, ClassLiteral or Instance type represents a specific symbol that we care about. I also don't believe that these methods are particularly efficient. Let's get rid of them; we can always add them back later if we rediscover a need for them.

Test Plan

cargo test -p red_knot_python_semantic

@AlexWaygood AlexWaygood added the red-knot Multi-file analysis & type inference label Nov 5, 2024
Copy link
Contributor

github-actions bot commented Nov 5, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

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.

I'm now inclined to remove name and instead store the Symbolid....

@AlexWaygood AlexWaygood merged commit 05f97ba into main Nov 5, 2024
20 checks passed
@AlexWaygood AlexWaygood deleted the alex/types-cleanup branch November 5, 2024 12:46
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.

2 participants