MCPcopy Create free account
hub / github.com/nodejs/node / resolve_or_missing

Method resolve_or_missing

tools/inspector_protocol/jinja2/runtime.py:208–217  ·  view source on GitHub ↗

Resolves a variable like :meth:`resolve` but returns the special `missing` value if it cannot be found.

(self, key)

Source from the content-addressed store, hash-verified

206 return rv
207
208 def resolve_or_missing(self, key):
209 """Resolves a variable like :meth:`resolve` but returns the
210 special `missing` value if it cannot be found.
211 """
212 if self._legacy_resolve_mode:
213 rv = self.resolve(key)
214 if isinstance(rv, Undefined):
215 rv = missing
216 return rv
217 return resolve_or_missing(self, key)
218
219 def get_exported(self):
220 """Get a new dict with the exported variables."""

Callers 2

resolveMethod · 0.95
__getitem__Method · 0.95

Calls 2

resolveMethod · 0.95
resolve_or_missingFunction · 0.85

Tested by

no test coverage detected