ruff/crates/ruff_python_semantic/src
Charlie Marsh 0e89c94947
Run shadowed-variable analyses in deferred handlers (#5181)
## Summary

This PR extracts a bunch of complex logic from `add_binding`, instead
running the the shadowing rules in the deferred handler, thereby
decoupling the binding phase (during which we build up the semantic
model) from the analysis phase, and generally making `add_binding` much
more focused.

This was made possible by improving the semantic model to better handle
deletions -- previously, we'd "lose track" of bindings if they were
deleted, which made this kind of refactor impossible.

## Test Plan

We have good automated coverage for this, but I want to benchmark it
separately.
2023-06-29 00:08:18 +00:00
..
analyze Respect abc decorators when classifying function types (#5315) 2023-06-22 19:52:36 +00:00
binding.rs Restore existing bindings when unbinding caught exceptions (#5256) 2023-06-21 12:53:58 -04:00
context.rs Remove separate ReferenceContext enum (#4631) 2023-05-24 15:12:38 +00:00
definition.rs Run rustfmt on nightly to clean up erroneous comments (#5106) 2023-06-15 00:19:05 +00:00
globals.rs Make some of ruff_python_semantic pub(crate) (#5093) 2023-06-14 17:49:37 +00:00
lib.rs Move StarImport to its own module (#5186) 2023-06-20 13:12:46 -04:00
model.rs Run shadowed-variable analyses in deferred handlers (#5181) 2023-06-29 00:08:18 +00:00
node.rs Make some of ruff_python_semantic pub(crate) (#5093) 2023-06-14 17:49:37 +00:00
reference.rs Make some of ruff_python_semantic pub(crate) (#5093) 2023-06-14 17:49:37 +00:00
scope.rs Run shadowed-variable analyses in deferred handlers (#5181) 2023-06-29 00:08:18 +00:00
star_import.rs Move StarImport to its own module (#5186) 2023-06-20 13:12:46 -04:00