mirror of
https://github.com/vee1e/capa.git
synced 2026-09-01 10:48:51 +00:00
fix mypy and codestyle issues
This commit is contained in:
parent
a99ff813cb
commit
06aea6b97c
3 changed files with 3 additions and 2 deletions
|
|
@ -26,6 +26,7 @@ class CapeExtractor(DynamicFeatureExtractor):
|
|||
self.behavior = behavior
|
||||
|
||||
self.global_features = capa.features.extractors.cape.global_.extract_features(self.static)
|
||||
|
||||
def extract_global_features(self) -> Iterator[Tuple[Feature, Address]]:
|
||||
yield from self.global_features
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import textwrap
|
|||
import itertools
|
||||
import contextlib
|
||||
import collections
|
||||
from typing import Any, Dict, List, Tuple, Callable, cast, Union
|
||||
from typing import Any, Dict, List, Tuple, Union, Callable, cast
|
||||
|
||||
import halo
|
||||
import tqdm
|
||||
|
|
@ -786,6 +786,7 @@ def collect_metadata(
|
|||
sha1 = hashlib.sha1()
|
||||
sha256 = hashlib.sha256()
|
||||
|
||||
assert isinstance(extractor, StaticFeatureExtractor)
|
||||
with open(sample_path, "rb") as f:
|
||||
buf = f.read()
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@ from capa.helpers import get_auto_format, log_unsupported_runtime_error
|
|||
from capa.features.common import FORMAT_AUTO, FORMAT_FREEZE, DYNAMIC_FORMATS, is_global_feature
|
||||
from capa.features.extractors.base_extractor import FeatureExtractor, StaticFeatureExtractor, DynamicFeatureExtractor
|
||||
|
||||
|
||||
logger = logging.getLogger("capa.show-features")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue