ruff/crates/ruff_python_semantic
David Salvisberg 6d61c8aa16
Fixes minor bug in SemanticModel::lookup_symbol (#14643)
## Summary

This came up as part of #12927 when implementing
`SemanticModel::simulate_runtime_load`.

Should be fairly self-explanatory, if the scope returns a binding with
`BindingKind::Annotation` the bottom part of the loop gets skipped, so
there's no chance for `seen_function` to have been updated. So unless
there's something subtle going on here, like function scopes never
containing bindings with `BindingKind::Annotation`, this seems like a
bug.

## Test Plan

`cargo nextest run`
2024-11-27 16:50:19 -05:00
..
src Fixes minor bug in SemanticModel::lookup_symbol (#14643) 2024-11-27 16:50:19 -05:00
Cargo.toml Extract LineIndex independent methods from Locator (#13938) 2024-10-28 07:53:41 +00:00