ruff/crates/ty_python_semantic/resources/mdtest/narrow/conditionals
David Peter 689797a984
[ty] Type narrowing in comprehensions (#18934)
## Summary

Add type narrowing inside comprehensions:

```py
def _(xs: list[int | None]):
    [reveal_type(x) for x in xs if x is not None]  # revealed: int
```

closes https://github.com/astral-sh/ty/issues/680

## Test Plan

* New Markdown tests
* Made sure the example from https://github.com/astral-sh/ty/issues/680
now checks without errors
* Made sure that all removed ecosystem diagnostics were actually false
positives
2025-06-25 11:30:28 +02:00
..
boolean.md [ty] Reachability constraints (#18621) 2025-06-17 09:24:28 +02:00
elif_else.md [ty] Improve disjointness inference for NominalInstanceTypes and SubclassOfTypes (#18864) 2025-06-24 20:27:37 +00:00
eq.md Update class literal display to use <class 'Foo'> style (#17889) 2025-05-06 20:11:25 -04:00
in.md
is.md
is_not.md
nested.md [ty] Type narrowing in comprehensions (#18934) 2025-06-25 11:30:28 +02:00
not.md