Skip to content

Comments

Conformance: another update to LiteralString tests#2186

Merged
AlexWaygood merged 1 commit intopython:mainfrom
sharkdp:literalstr-2
Feb 20, 2026
Merged

Conformance: another update to LiteralString tests#2186
AlexWaygood merged 1 commit intopython:mainfrom
sharkdp:literalstr-2

Conversation

@sharkdp
Copy link
Contributor

@sharkdp sharkdp commented Feb 20, 2026

This is another case where the conformance suite expects type checkers to infer str(1) as str (and prevents them from inferring a more precise type). I replaced str(1) with input(), which should always be of type str. The conformance results did not change.

This is basically a follow-up to #2179. There was one more case further down the file, which I missed — apologies.

@srittau srittau added the topic: conformance tests Issues with the conformance test suite label Feb 20, 2026
Copy link
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.

Thank you! Given that #2179 has already landed, I think this is uncontroversial

@AlexWaygood AlexWaygood merged commit 4cd52c1 into python:main Feb 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: conformance tests Issues with the conformance test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants