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] Add AlwaysTruthy and AlwaysFalsy to knot_extensions #15437

Merged
merged 8 commits into from
Jan 12, 2025

Conversation

InSyncWithFoo
Copy link
Contributor

Summary

Part of #15397. There are quite a few tests that use AlwaysTruthy/AlwaysFalsy/ClassLiteral/FunctionLiteral, so it's would be convenient to have direct access to them via knot_extensions.

Test Plan

Markdown tests.

Copy link
Contributor

github-actions bot commented Jan 12, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Contributor

@sharkdp sharkdp left a comment

Choose a reason for hiding this comment

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

Thank you. Adding AlwaysTruthy and AlwaysFalsy seems sensible to me. I considered adding something like LiteralExt in the knot_extensions PR, but we then decided to go with the more general TypeOf for now. If we add LiteralExt, we should probably remove TypeOf?

@AlexWaygood AlexWaygood added the red-knot Multi-file analysis & type inference label Jan 12, 2025
@InSyncWithFoo InSyncWithFoo changed the title [red-knot] Extend knot_extensions with a few more symbols [red-knot] Add AlwaysTruthy and AlwaysFalsy to knot_extensions Jan 12, 2025
@AlexWaygood AlexWaygood merged commit d1666fb into astral-sh:main Jan 12, 2025
21 checks passed
@InSyncWithFoo InSyncWithFoo deleted the rk-knot-extensions branch January 12, 2025 17:07
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.

3 participants