MCPcopy Index your code
hub / github.com/RustPython/RustPython / _generate_suggestions

Function _generate_suggestions

crates/stdlib/src/suggestions.rs:10–19  ·  view source on GitHub ↗
(
        candidates: Vec<PyObjectRef>,
        name: PyObjectRef,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

8
9 #[pyfunction]
10 fn _generate_suggestions(
11 candidates: Vec<PyObjectRef>,
12 name: PyObjectRef,
13 vm: &VirtualMachine,
14 ) -> PyObjectRef {
15 match crate::vm::suggestion::calculate_suggestions(candidates.iter(), &name) {
16 Some(suggestion) => suggestion.into(),
17 None => vm.ctx.none(),
18 }
19 }
20}

Callers

nothing calls this directly

Calls 3

calculate_suggestionsFunction · 0.85
noneMethod · 0.80
iterMethod · 0.45

Tested by

no test coverage detected