You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test-data/unit/check-errorcodes.test
+6
Original file line number
Diff line number
Diff line change
@@ -892,6 +892,12 @@ if a:
892
892
any_or_object: Union[object, Any]
893
893
if any_or_object:
894
894
pass
895
+
896
+
if (my_foo := Foo()): # E: "__main__.my_foo" has type "Foo" which does not implement __bool__ or __len__ so it could always be true in boolean context [truthy-bool]
897
+
pass
898
+
899
+
if my_a := (a or Foo()): # E: "__main__.Foo" returns "Foo" which does not implement __bool__ or __len__ so it could always be true in boolean context [truthy-bool]
0 commit comments