MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / resolve_canonical

Method resolve_canonical

compiler/tests/common.rs:176–186  ·  view source on GitHub ↗
(&self, spec: &str)

Source from the content-addressed store, hash-verified

174 }
175
176 fn resolve_canonical(&self, spec: &str) -> Result<Resolved, String> {
177 let s = self.state.borrow();
178 if s.in_flight.contains(spec) {
179 return Err(format!("circular import: '{}'", spec));
180 }
181 match s.modules.get(spec) {
182 // Clone so the same module can be re-imported under multiple aliases.
183 Some(r) => Ok(r.clone()),
184 None => Err(format!("module '{}' not found in TestResolver", spec)),
185 }
186 }
187}
188
189// Fixture functions. Third arg is the kwargs slot (`None` for positional calls); these fixtures ignore it.

Callers 2

resolveMethod · 0.45
resolve_bareMethod · 0.45

Calls 3

borrowMethod · 0.80
containsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected