Skip to content

Commit

Permalink
[red-knot] Minor fix in MRO tests (#14652)
Browse files Browse the repository at this point in the history
## Summary

`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.
  • Loading branch information
sharkdp authored Nov 28, 2024
1 parent 8639f8c commit 6f1cf5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/red_knot_python_semantic/resources/mdtest/mro.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class O: ...
class X(O): ...
class Y(O): ...

if bool():
if returns_bool():
foo = Y
else:
foo = object
Expand Down

0 comments on commit 6f1cf5b

Please sign in to comment.