Skip to content

Commit

Permalink
Revert changes to pretty to account for None
Browse files Browse the repository at this point in the history
  • Loading branch information
saulshanabrook committed Jul 11, 2022
1 parent 28e5b52 commit 4ae2be6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions rich/pretty.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,14 +680,15 @@ def iter_rich_args(rich_args: Any) -> Iterable[Union[Any, Tuple[str, Any]]]:
for last, arg in loop_last(args):
if _safe_isinstance(arg, tuple):
key, child = arg
else:
key, child = None, arg
child_node = _traverse(child, depth=depth + 1)
child_node.last = last
if key is not None:
child_node = _traverse(child, depth=depth + 1)
child_node.last = last
child_node.key_repr = key
child_node.key_separator = "="
append(child_node)
append(child_node)
else:
child_node = _traverse(arg, depth=depth + 1)
child_node.last = last
append(child_node)
else:
node = Node(
value_repr=f"<{class_name}>" if angular else f"{class_name}()",
Expand Down

0 comments on commit 4ae2be6

Please sign in to comment.