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

[red-knot] Inline Type::is_literal #13230

Merged
merged 1 commit into from
Sep 3, 2024
Merged

[red-knot] Inline Type::is_literal #13230

merged 1 commit into from
Sep 3, 2024

Conversation

AlexWaygood
Copy link
Member

The name of this method is somewhat confusing currently, as I would expect it to return true for LiteralString, but it doesn't (and LiteralString is displayed differently, so it wouldn't suit the method's current use case for it to include LiteralString). The method is only used in one location currently, so let's just inline it at that location.

@AlexWaygood AlexWaygood added the red-knot Multi-file analysis & type inference label Sep 3, 2024
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

@AlexWaygood AlexWaygood merged commit dfee658 into main Sep 3, 2024
19 checks passed
@AlexWaygood AlexWaygood deleted the alex/is-literal branch September 3, 2024 14:02
Copy link

codspeed-hq bot commented Sep 3, 2024

CodSpeed Performance Report

Merging #13230 will improve performances by 4.66%

Comparing alex/is-literal (d9fd5d1) with main (50c8ee5)

Summary

⚡ 1 improvements
✅ 31 untouched benchmarks

Benchmarks breakdown

Benchmark main alex/is-literal Change
linter/default-rules[pydantic/types.py] 1.9 ms 1.8 ms +4.66%

Copy link
Contributor

github-actions bot commented Sep 3, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

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