mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-18 17:41:12 +00:00
Remove some unused pub
functions (#11576)
## Summary I left anything in `red-knot`, any `with_` methods, etc.
This commit is contained in:
parent
3989cb8b56
commit
16acd4913f
14 changed files with 7 additions and 495 deletions
|
@ -107,14 +107,6 @@ impl<'a> Scope<'a> {
|
|||
})
|
||||
}
|
||||
|
||||
/// Like [`Scope::binding_ids`], but returns all bindings that were added to the scope,
|
||||
/// including those that were shadowed by later bindings.
|
||||
pub fn all_binding_ids(&self) -> impl Iterator<Item = BindingId> + '_ {
|
||||
self.bindings.values().copied().flat_map(|id| {
|
||||
std::iter::successors(Some(id), |id| self.shadowed_bindings.get(id).copied())
|
||||
})
|
||||
}
|
||||
|
||||
/// Like [`Scope::bindings`], but returns all bindings added to the scope, including those that
|
||||
/// were shadowed by later bindings.
|
||||
pub fn all_bindings(&self) -> impl Iterator<Item = (&str, BindingId)> + '_ {
|
||||
|
@ -144,11 +136,6 @@ impl<'a> Scope<'a> {
|
|||
!self.star_imports.is_empty()
|
||||
}
|
||||
|
||||
/// Returns an iterator over all star imports (e.g., `from sys import *`) in this scope.
|
||||
pub fn star_imports(&self) -> impl Iterator<Item = &StarImport<'a>> {
|
||||
self.star_imports.iter()
|
||||
}
|
||||
|
||||
/// Set the globals pointer for this scope.
|
||||
pub(crate) fn set_globals_id(&mut self, globals: GlobalsId) {
|
||||
self.globals_id = Some(globals);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue