From c3d577157d64439634c12c25cd9067a26d1c3ea2 Mon Sep 17 00:00:00 2001 From: Luca Colagrande Date: Sun, 11 Aug 2024 15:53:53 +0200 Subject: [PATCH] Correct linting --- util/trace/a2l.py | 2 +- util/trace/annotate.py | 3 ++- util/trace/tracevis.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/util/trace/a2l.py b/util/trace/a2l.py index ee04957914..69e221ac31 100644 --- a/util/trace/a2l.py +++ b/util/trace/a2l.py @@ -53,7 +53,7 @@ def function_stack(self): # Find all matches and organize them into a list of dictionaries stack = [match.groupdict() for match in pattern.finditer(self.raw)] - + # Format stack entries def format_stack_entry(entry): func, line, col = [entry.get(key, None) for key in ['func', 'line', 'col']] diff --git a/util/trace/annotate.py b/util/trace/annotate.py index 7d0601076e..dac037832c 100755 --- a/util/trace/annotate.py +++ b/util/trace/annotate.py @@ -268,7 +268,8 @@ def parse_line(line, fmt='snitch'): if diff: # Compare current and previous call stacks if a2l_output: - funs, files, lines = zip(*[level.values() for level in a2l_output.function_stack()]) + funs, files, lines = zip( + *[level.values() for level in a2l_output.function_stack()]) else: funs = files = lines = [] next_call_stack = assemble_call_stack(funs, files, lines) diff --git a/util/trace/tracevis.py b/util/trace/tracevis.py index 7c21f0ba2d..e31f0bff8d 100755 --- a/util/trace/tracevis.py +++ b/util/trace/tracevis.py @@ -252,7 +252,7 @@ def parse_trace(filename, kwargs): events += flush(lah, buf, **kwargs) print(f' parsed {lines-fails} of {lines} lines', file=sys.stderr) - + # Assign a per-trace unique TID or PID to all events for event in events: if kwargs['collapse_call_stack']: