From c121e9219c0996fb99bf3e75b9bf3153504035ab Mon Sep 17 00:00:00 2001 From: William Ballenthin Date: Mon, 13 Sep 2021 13:32:09 -0600 Subject: [PATCH] elffile: fix mypy --- capa/features/extractors/elffile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/capa/features/extractors/elffile.py b/capa/features/extractors/elffile.py index 097128a2..4fa23d1f 100644 --- a/capa/features/extractors/elffile.py +++ b/capa/features/extractors/elffile.py @@ -8,7 +8,7 @@ import io import logging import contextlib -from typing import Tuple +from typing import Tuple, Iterator from elftools.elf.elffile import ELFFile, SymbolTableSection @@ -79,9 +79,9 @@ def extract_file_arch(elf, **kwargs): logger.warning("unsupported architecture: %s", arch) -def extract_file_features(elf: ELFFile, buf: bytes) -> Tuple[Feature, int]: +def extract_file_features(elf: ELFFile, buf: bytes) -> Iterator[Tuple[Feature, int]]: for file_handler in FILE_HANDLERS: - for feature, va in file_handler(elf=elf, buf=buf): + for feature, va in file_handler(elf=elf, buf=buf): # type: ignore yield feature, va