Skip to content

[red-knot] Minor fix in MRO tests#14652

Merged
sharkdp merged 1 commit intomainfrom
david/fix-mro-test
Nov 28, 2024
Merged

[red-knot] Minor fix in MRO tests#14652
sharkdp merged 1 commit intomainfrom
david/fix-mro-test

Conversation

@sharkdp
Copy link
Contributor

@sharkdp sharkdp commented Nov 28, 2024

Summary

It looks like we want to use returns_bool() here. bool() is equal to False, and we infer Literal[False] for it. Which means that the test here will fail as soon as we treat the body of this if as unreachable.

@sharkdp sharkdp added the ty Multi-file analysis & type inference label Nov 28, 2024
It looks like we want to use `returns_bool()` here. `bool()` is equal to
`False`, and we infer `Literal[False]` for it. Which means that the test
here will fail as soon as we treat the body of this `if` as unreachable.
@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@sharkdp sharkdp merged commit 6f1cf5b into main Nov 28, 2024
@sharkdp sharkdp deleted the david/fix-mro-test branch November 28, 2024 09:17
sharkdp added a commit that referenced this pull request Nov 28, 2024
## Summary

Similar to #14652, but now with conditions that are `Literal[True]`
(instead of `Literal[False]`), where we want them to be `bool`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants