scripts: Fixed typo hiding zero-sized results in table renderer

This should either have checked diff_result==None, or we should be
mapping diff_result=None => diff_result_=None. To be safe I've done
both.

This was a nasty typo and I only noticed because ctx.py stopped printing
"cycle detected" for our linked-lists (which are expected to be cyclic).
This commit is contained in:
Christopher Haster
2025-02-28 20:42:40 -06:00
parent 5811b11131
commit e851c654c5
9 changed files with 19 additions and 18 deletions

View File

@@ -1084,7 +1084,7 @@ def table(Result, results, diff_results=None, *,
for r in diff_results_ or []}
names_ = [n
for n in table_.keys() | diff_table_.keys()
if diff_results_ is None
if diff_results is None
or all_
or any(
types[k].ratio(
@@ -1152,7 +1152,7 @@ def table(Result, results, diff_results=None, *,
if name in table_ and depth_ > 1:
table_recurse(
getattr(r, Result._children),
getattr(diff_r, Result._children, None) or [],
getattr(diff_r, Result._children, None),
depth_-1,
(prefixes[2+(i==len(names_)-1)] + "|-> ",
prefixes[2+(i==len(names_)-1)] + "'-> ",