diff --git a/util/trace/layout_events.py b/util/trace/layout_events.py index 4c6fe65ec9..a17fa504da 100755 --- a/util/trace/layout_events.py +++ b/util/trace/layout_events.py @@ -88,7 +88,7 @@ def main(): expr = row[0] code = compile(expr, "", "eval") tids = eval(code) - if type(tids) == int: + if isinstance(tids, int): tids = [tids] # Iterate hart IDs @@ -108,7 +108,7 @@ def main(): row_idx = tid col_idx = 1 + reg_idx * 2 assert row_idx < df.shape[0], f'Hart ID {row_idx} out of bounds' - assert (col_idx + 1) < df.shape[1],\ + assert (col_idx + 1) < df.shape[1], \ f'Region index {reg_idx} out of bounds' orow.append(int(df.iat[row_idx, col_idx])) orow.append(int(df.iat[row_idx, col_idx + 1]))