MCPcopy
hub / github.com/Textualize/rich / iter_rich_args

Function iter_rich_args

rich/pretty.py:633–647  ·  view source on GitHub ↗
(rich_args: Any)

Source from the content-addressed store, hash-verified

631 reached_max_depth = max_depth is not None and depth >= max_depth
632
633 def iter_rich_args(rich_args: Any) -> Iterable[Union[Any, Tuple[str, Any]]]:
634 for arg in rich_args:
635 if _safe_isinstance(arg, tuple):
636 if len(arg) == 3:
637 key, child, default = arg
638 if default == child:
639 continue
640 yield key, child
641 elif len(arg) == 2:
642 key, child = arg
643 yield key, child
644 elif len(arg) == 1:
645 yield arg[0]
646 else:
647 yield arg
648
649 try:
650 fake_attributes = hasattr(

Callers 1

_traverseFunction · 0.85

Calls 1

_safe_isinstanceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…