Skip to content

[red-knot] infer int literal types#11623

Merged
carljm merged 2 commits intoastral-sh:mainfrom
carljm:intlit
May 31, 2024
Merged

[red-knot] infer int literal types#11623
carljm merged 2 commits intoastral-sh:mainfrom
carljm:intlit

Conversation

@carljm
Copy link
Copy Markdown
Contributor

@carljm carljm commented May 30, 2024

Summary

Give red-knot the ability to infer int literal types. This is quick and easy, mostly because these types are a convenient way to observe control-flow handling with simple assignments.

Test Plan

Added test.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 30, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@carljm carljm added the internal An internal refactor or improvement label May 31, 2024
Comment thread crates/red_knot/src/types/infer.rs Outdated
Comment thread crates/red_knot/src/types/infer.rs Outdated
Comment thread crates/red_knot/src/types/infer.rs
Copy link
Copy Markdown
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

LGTM, modulo comments

@carljm carljm merged commit 16a926d into astral-sh:main May 31, 2024
@carljm carljm deleted the intlit branch May 31, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants