MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / print_path

Function print_path

lib/matplotlib/cbook.py:758–779  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

756 import gc
757
758 def print_path(path):
759 for i, step in enumerate(path):
760 # next "wraps around"
761 next = path[(i + 1) % len(path)]
762
763 outstream.write(" %s -- " % type(step))
764 if isinstance(step, dict):
765 for key, val in step.items():
766 if val is next:
767 outstream.write(f"[{key!r}]")
768 break
769 if key is next:
770 outstream.write(f"[key] = {val!r}")
771 break
772 elif isinstance(step, list):
773 outstream.write("[%d]" % step.index(next))
774 elif isinstance(step, tuple):
775 outstream.write("( tuple )")
776 else:
777 outstream.write(repr(step))
778 outstream.write(" ->\n")
779 outstream.write("\n")
780
781 def recurse(obj, start, all, current_path):
782 if show_progress:

Callers 1

recurseFunction · 0.85

Calls 2

indexMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…