From 6f1cf5b686e67fb74383641fcbbe98e33481a271 Mon Sep 17 00:00:00 2001 From: David Peter Date: Thu, 28 Nov 2024 10:17:15 +0100 Subject: [PATCH] [red-knot] Minor fix in MRO tests (#14652) ## 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. --- crates/red_knot_python_semantic/resources/mdtest/mro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/red_knot_python_semantic/resources/mdtest/mro.md b/crates/red_knot_python_semantic/resources/mdtest/mro.md index 2dc5ff0d5d561..dc0abf9e263ce 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/mro.md +++ b/crates/red_knot_python_semantic/resources/mdtest/mro.md @@ -256,7 +256,7 @@ class O: ... class X(O): ... class Y(O): ... -if bool(): +if returns_bool(): foo = Y else: foo = object