From be5ada26eaf366b251a51398da06c48ff3c366d8 Mon Sep 17 00:00:00 2001 From: Yacine Elhamer Date: Sat, 3 Jun 2023 01:12:56 +0100 Subject: [PATCH] fix code style --- capa/features/extractors/elf.py | 2 +- capa/features/extractors/viv/extractor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/capa/features/extractors/elf.py b/capa/features/extractors/elf.py index 133b50e9..9008d3e9 100644 --- a/capa/features/extractors/elf.py +++ b/capa/features/extractors/elf.py @@ -92,7 +92,7 @@ class Shdr: buf: bytes @classmethod - def from_viv(cls, section, buf: bytes): + def from_viv(cls, section, buf: bytes) -> "Shdr": return cls( section.sh_name, section.sh_type, diff --git a/capa/features/extractors/viv/extractor.py b/capa/features/extractors/viv/extractor.py index ac936142..c73b24a2 100644 --- a/capa/features/extractors/viv/extractor.py +++ b/capa/features/extractors/viv/extractor.py @@ -51,7 +51,7 @@ class VivisectFeatureExtractor(FeatureExtractor): def get_functions(self) -> Iterator[FunctionHandle]: cache = {} for va in sorted(self.vw.getFunctions()): - yield FunctionHandle(address=AbsoluteVirtualAddress(va), inner=viv_utils.Function(self.vw, va), ctx={"cache": cache}) + yield FunctionHandle(address=AbsoluteVirtualAddress(va), inner=viv_utils.Function(self.vw, va), ctx={"cache":cache}) def extract_function_features(self, fh: FunctionHandle) -> Iterator[Tuple[Feature, Address]]: yield from capa.features.extractors.viv.function.extract_features(fh)