diff --git a/src/software/thunderscope/replay/bookmark_marker.py b/src/software/thunderscope/replay/bookmark_marker.py index 77fa955f55..111a815d8e 100644 --- a/src/software/thunderscope/replay/bookmark_marker.py +++ b/src/software/thunderscope/replay/bookmark_marker.py @@ -42,7 +42,7 @@ def __init__( self.update() - def update(self): + def update(self) -> None: """Update bookmark visuals display""" super().update() # Re-calculate the position of the visuals diff --git a/src/software/thunderscope/replay/proto_player.py b/src/software/thunderscope/replay/proto_player.py index 681f78c405..8326705e39 100644 --- a/src/software/thunderscope/replay/proto_player.py +++ b/src/software/thunderscope/replay/proto_player.py @@ -142,7 +142,7 @@ def is_log_entry_corrupt(log_entry: bytes, version: int) -> bool: except Exception: return True - def handle_log_line_for_chunk(self, **kwargs): + def handle_log_line_for_chunk(self, **kwargs) -> None: """Find the time stamp of the first proto event in the replay file. :param kwargs: a dictionary contains all the information about a line in the replay log. e.g. { @@ -172,7 +172,7 @@ def handle_log_line_for_bookmark(self, **kwargs) -> None: if kwargs["protobuf_type"] == ReplayBookmark: self.bookmark_indices.append(kwargs["timestamp"]) - def finish_preprocess_replay_file(self): + def finish_preprocess_replay_file(self) -> None: """Finish off pre-processing and save all the pre-processing result to disk""" # save chunk indices if self.chunks_indices: @@ -212,7 +212,7 @@ def finish_preprocess_replay_file(self): f"Failed to build bookmark index for {self.log_folder_path} : No bookmark data found." ) - def preprocess_replay_file(self, handlers: List[Callable[[...], None]]): + def preprocess_replay_file(self, handlers: List[Callable[[...], None]]) -> None: """Start preprocessing replay files and build index according to the provided handlers :param handlers: handler functions that will be applied to each line of the replay log. @@ -257,7 +257,7 @@ def is_bookmark_indexed(self) -> bool: os.path.join(self.log_folder_path, ProtoPlayer.BOOKMARK_INDEX_FILENAME) ) - def load_chunk_index(self): + def load_chunk_index(self) -> None: """Loads the chunk index file.""" try: with open( @@ -276,7 +276,7 @@ def load_chunk_index(self): except Exception as e: logging.warning(f"An Exception occurred when loading chunk index file {e}") - def load_bookmark_index(self): + def load_bookmark_index(self) -> None: """Loads the bookmark file""" try: with open(