ruff/crates/ty_python_semantic/resources/mdtest/loops
Alex Waygood bc6ea68733
[ty] Add precise iteration and unpacking inference for string literals and bytes literals (#20023)
## Summary

Previously we held off from doing this because we weren't sure that it
was worth the added complexity cost. But our code has changed in the
months since we made that initial decision, and I think the structure of
the code is such that it no longer really leads to much added complexity
to add precise inference when unpacking a string literal or a bytes
literal.

The improved inference we gain from this has real benefits to users (see
the mypy_primer report), and this PR doesn't appear to have a
performance impact.

## Test plan

mdtests
2025-08-22 19:33:08 +01:00
..
async_for.md [ty] Async for loops and async iterables (#19634) 2025-07-30 17:40:24 +02:00
for.md [ty] Add precise iteration and unpacking inference for string literals and bytes literals (#20023) 2025-08-22 19:33:08 +01:00
iterators.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
while_loop.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00