From df6de3446c14b1a2231741daf76f08124b867aa2 Mon Sep 17 00:00:00 2001 From: AG <98327736+ggold7046@users.noreply.github.com> Date: Fri, 10 Mar 2023 13:10:02 +0530 Subject: [PATCH] Update file.py Updated with f string for enhanced readability. --- capa/features/extractors/ida/file.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/capa/features/extractors/ida/file.py b/capa/features/extractors/ida/file.py index 532d5a89..a3da4c6a 100644 --- a/capa/features/extractors/ida/file.py +++ b/capa/features/extractors/ida/file.py @@ -106,13 +106,13 @@ def extract_file_import_names() -> Iterator[Tuple[Feature, Address]]: for name in capa.features.extractors.helpers.generate_symbols(info[0], info[1]): yield Import(name), addr dll = info[0] - symbol = "#%d" % (info[2]) + symbol = f"#{info[2]}" elif info[1]: dll = info[0] symbol = info[1] elif info[2]: dll = info[0] - symbol = "#%d" % (info[2]) + symbol = f"#{info[2]}" else: continue @@ -180,7 +180,7 @@ def extract_file_format() -> Iterator[Tuple[Feature, Address]]: # no file type to return when processing a binary file, but we want to continue processing return else: - raise NotImplementedError("unexpected file format: %d" % file_info.filetype) + raise NotImplementedError(f"unexpected file format: {file_info.filetype}") def extract_features() -> Iterator[Tuple[Feature, Address]]: