From daaf9e080576077ca9d17d3ba1019f0813e7f400 Mon Sep 17 00:00:00 2001 From: Chao Song Date: Thu, 7 Sep 2023 11:18:19 +0800 Subject: [PATCH] sof_perf_analyzer: remove type annotation for skip_to_first_trace() The skip_to_first_trace() function either return a value or raise an exception. Currently there is no good way to do type annotation for such function, so remove its type annotation. Signed-off-by: Chao Song --- tools/sof_perf_analyzer.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/sof_perf_analyzer.py b/tools/sof_perf_analyzer.py index 4641503f..33703d56 100755 --- a/tools/sof_perf_analyzer.py +++ b/tools/sof_perf_analyzer.py @@ -26,7 +26,6 @@ import pathlib import argparse from typing import TextIO -from typing import Optional from typing import Generator from dataclasses import dataclass @@ -115,7 +114,7 @@ def dispatch_trace_item(trace_item: TraceItem): if trace_item.func == 'comp_copy': collect_perf_info(trace_item) -def skip_to_first_trace(trace_item_gen: TraceItemGenerator) -> Optional[TraceItem]: +def skip_to_first_trace(trace_item_gen: TraceItemGenerator): '''The current sof-test test case may collect some traces belonging to previous test case due to mtrace is configured in deferred mode. This function consumes those traces from the generator, and return the first trace item of current test.