ruff/crates/red_knot_python_semantic/resources/mdtest
TomerBin 66c3aaa307
[red-knot] - Flow-control for boolean operations (#13940)
## Summary

As python uses short-circuiting boolean operations in runtime, we should
mimic that logic in redknot as well.
For example, we should detect that in the following code `x` might be
undefined inside the block:

```py
if flag or (x := 1):
    print(x) 
```

## Test Plan

Added mdtest suit for boolean expressions.

---------

Co-authored-by: Carl Meyer <carl@astral.sh>
2024-10-27 03:33:01 +00:00
..
assignment [red-knot] Remove lint-phase (#13922) 2024-10-25 18:40:52 +00:00
binary [red-knot] Format mdtest Python snippets more concisely (#13905) 2024-10-24 11:09:31 +00:00
boolean [red-knot] - Flow-control for boolean operations (#13940) 2024-10-27 03:33:01 +00:00
call [red-knot] Remove lint-phase (#13922) 2024-10-25 18:40:52 +00:00
comparison [red-knot] Type inference for comparisons between arbitrary instances (#13903) 2024-10-26 18:19:56 +00:00
conditional [red-knot] Remove lint-phase (#13922) 2024-10-25 18:40:52 +00:00
declaration [red-knot] Remove lint-phase (#13922) 2024-10-25 18:40:52 +00:00
exception [red-knot] Remove lint-phase (#13922) 2024-10-25 18:40:52 +00:00
expression [red-knot] Format mdtest Python snippets more concisely (#13905) 2024-10-24 11:09:31 +00:00
import [red-knot] Remove lint-phase (#13922) 2024-10-25 18:40:52 +00:00
literal [red-knot] Infer subscript expression types for bytes literals (#13901) 2024-10-24 12:07:41 +02:00
loops [red-knot] Remove lint-phase (#13922) 2024-10-25 18:40:52 +00:00
narrow [red-knot] Type narrow in else clause (#13918) 2024-10-26 16:22:57 +00:00
scopes [red-knot] Format mdtest Python snippets more concisely (#13905) 2024-10-24 11:09:31 +00:00
shadowing [red-knot] Remove lint-phase (#13922) 2024-10-25 18:40:52 +00:00
stubs [red-knot] Format mdtest Python snippets more concisely (#13905) 2024-10-24 11:09:31 +00:00
subscript [red-knot] Type narrow in else clause (#13918) 2024-10-26 16:22:57 +00:00
unary [red-knot] Remove lint-phase (#13922) 2024-10-25 18:40:52 +00:00
attributes.md [red-knot] Remove lint-phase (#13922) 2024-10-25 18:40:52 +00:00
generics.md [red-knot] Remove lint-phase (#13922) 2024-10-25 18:40:52 +00:00
unpacking.md [red-knot] Format mdtest Python snippets more concisely (#13905) 2024-10-24 11:09:31 +00:00