mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-12-07 16:12:47 +00:00
scripts: Improved cycle detection notes in scripts
- Prevented childrenof memoization from hiding the source of a detected cycle. - Deduplicated multiple cycle detected notes. - Fixed note rendering when last column does not have a notes list. Currently this only happens when entry is None (no results).
This commit is contained in:
@@ -889,8 +889,13 @@ def table(Result, results, diff_results=None, *,
|
||||
getattr(r, k, None),
|
||||
getattr(diff_r, k, None)))))
|
||||
# append any notes
|
||||
if hasattr(Result, '_notes'):
|
||||
entry[-1][1].extend(getattr(r, Result._notes))
|
||||
if hasattr(Result, '_notes') and r is not None:
|
||||
notes = getattr(r, Result._notes)
|
||||
if isinstance(entry[-1], tuple):
|
||||
entry[-1] = (entry[-1][0], entry[-1][1] + notes)
|
||||
else:
|
||||
entry[-1] = (entry[-1], notes)
|
||||
|
||||
return entry
|
||||
|
||||
# recursive entry helper, only used by some scripts
|
||||
|
||||
Reference in New Issue
Block a user