MCPcopy
hub / github.com/marimo-team/marimo / only_scoped_refs

Function only_scoped_refs

marimo/_runtime/primitives.py:310–324  ·  view source on GitHub ↗
(ref: Name, data: VariableData)

Source from the content-addressed store, hash-verified

308 )
309
310 def only_scoped_refs(ref: Name, data: VariableData) -> bool:
311 # TODO: Other common types could be added here, like numpy arrays that
312 # are not dtype=object, etc.. that are known not to be dependent on the
313 # functions that created them.
314
315 # This errs on the side of including too much, but that's a better user
316 # experience than not having definitions available.
317 return (
318 ref in glbls
319 and not isinstance(glbls[ref], primitives)
320 and (
321 "_lambda" in data.required_refs
322 or any(map(check_ref, data.required_refs | {ref}))
323 )
324 )
325
326 return only_scoped_refs

Callers

nothing calls this directly

Calls 1

mapFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…