ruff/crates/ty_python_semantic/src/semantic_index
Shunsuke Shibayama 351121c5c5
[ty] fix incorrect lazy scope narrowing (#19744)
## Summary

This is a follow-up to #19321.

Narrowing constraints introduced in a class scope were not applied even
when they can be applied in lazy nested scopes. This PR fixes so that
they are now applied.
Conversely, there were cases where narrowing constraints were being
applied in places where they should not, so it is also fixed.

## Test Plan

Some TODOs in `narrow/conditionals/nested.md` are now work correctly.
2025-08-04 20:32:08 -07:00
..
builder Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
use_def [ty] improve lazy scope place lookup (#19321) 2025-07-25 07:11:11 +00:00
ast_ids.rs [ty] Split ScopedPlaceId into ScopedSymbolId and ScopedMemberId (#19497) 2025-07-25 13:54:33 +02:00
builder.rs [ty] fix incorrect lazy scope narrowing (#19744) 2025-08-04 20:32:08 -07:00
definition.rs [ty] Track different uses of legacy typevars, including context when rendering typevars (#19604) 2025-08-01 12:20:32 -04:00
expression.rs [ty] Split ScopedPlaceId into ScopedSymbolId and ScopedMemberId (#19497) 2025-07-25 13:54:33 +02:00
member.rs [ty] Split ScopedPlaceId into ScopedSymbolId and ScopedMemberId (#19497) 2025-07-25 13:54:33 +02:00
narrowing_constraints.rs [ty] Split ScopedPlaceId into ScopedSymbolId and ScopedMemberId (#19497) 2025-07-25 13:54:33 +02:00
place.rs [ty] Split ScopedPlaceId into ScopedSymbolId and ScopedMemberId (#19497) 2025-07-25 13:54:33 +02:00
predicate.rs [ty] Support as-patterns in reachability analysis (#19728) 2025-08-04 20:13:50 +02:00
re_exports.rs Simplify get_size2 usage (#19643) 2025-07-30 15:31:37 -04:00
reachability_constraints.rs [ty] Support as-patterns in reachability analysis (#19728) 2025-08-04 20:13:50 +02:00
scope.rs [ty] fix incorrect lazy scope narrowing (#19744) 2025-08-04 20:32:08 -07:00
symbol.rs [ty] fix incorrect lazy scope narrowing (#19744) 2025-08-04 20:32:08 -07:00
use_def.rs [ty] Split ScopedPlaceId into ScopedSymbolId and ScopedMemberId (#19497) 2025-07-25 13:54:33 +02:00