Skip to content

Commit

Permalink
Fix formatting and return type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
insolor committed Aug 16, 2024
1 parent 50b67b4 commit bac7da0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions search_offsets/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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")


Expand Down

0 comments on commit bac7da0

Please sign in to comment.