From bac7da0878d4c3b522000e2400cda2fdf60b3536 Mon Sep 17 00:00:00 2001 From: insolor <2442833+insolor@users.noreply.github.com> Date: Fri, 16 Aug 2024 21:01:13 +0300 Subject: [PATCH] Fix formatting and return type annotation --- search_offsets/search.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/search_offsets/search.py b/search_offsets/search.py index 00202ec..9317d9f 100644 --- a/search_offsets/search.py +++ b/search_offsets/search.py @@ -36,7 +36,11 @@ def search(path: str, patterns: list[Pattern]) -> Mapping[str, list[int]]: return found -def process_found(section_table: SectionTable, pattern_names: Iterable[Pattern], found: Mapping[str, int]) -> dict[str, int]: +def process_found( + section_table: SectionTable, + pattern_names: Iterable[Pattern], + found: Mapping[str, int], +) -> Iterable[tuple[str, int]]: """ Print offsets of the found patterns. """ @@ -85,7 +89,7 @@ def main(config: DictConfig) -> None: if config.get("version_name", None): result = render_template(processed, checksum=pe.file_header.timedate_stamp, version_name=config.version_name) - file_name = f"offsets_{config.version_name.replace(' ', '_')}.toml" + file_name = f"offsets_{config.version_name.replace(' ', '_')}.toml" (root_dir / file_name).write_text(result, encoding="utf-8")