MCPcopy Index your code
hub / github.com/ipython/ipython / _coerce_path_to_tuples

Function _coerce_path_to_tuples

IPython/core/guarded_eval.py:226–233  ·  view source on GitHub ↗

Replace dotted paths on the provided allow-list with tuples.

(
    allow_list: set[tuple[str, ...] | str],
)

Source from the content-addressed store, hash-verified

224
225
226def _coerce_path_to_tuples(
227 allow_list: set[tuple[str, ...] | str],
228) -> set[tuple[str, ...]]:
229 """Replace dotted paths on the provided allow-list with tuples."""
230 return {
231 path if isinstance(path, tuple) else tuple(path.split("."))
232 for path in allow_list
233 }
234
235
236@undoc

Callers 3

can_get_attrMethod · 0.85
can_get_itemMethod · 0.85
can_operateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…