ruff/crates/ruff_python_semantic
Charlie Marsh 1a9536c4e2
Remove SemanticModel#find_binding (#6546)
## Summary

This method is almost never what you actually want, because it doesn't
respect Python's scoping semantics. For example, if you call this within
a class method, it will return class attributes, whereas Python actually
_skips_ symbols in classes unless the load occurs within the class
itself. I also want to move away from these kinds of dynamic lookups and
more towards `resolve_name`, which performs a lookup based on the stored
`BindingId` at the time of symbol resolution, and will make it much
easier for us to separate model building from linting in the near
future.

## Test Plan

`cargo test`
2023-08-14 00:09:05 -04:00
..
src Remove SemanticModel#find_binding (#6546) 2023-08-14 00:09:05 -04:00
Cargo.toml Add support for unions to our Python builtins type system (#6541) 2023-08-13 18:00:50 -04:00