mirror of
https://github.com/mandiant/capa.git
synced 2025-12-22 07:10:29 -08:00
fix TypeAlias importing: import from typing_extensions to support Python 3.9 and lower
This commit is contained in:
@@ -46,7 +46,7 @@ import capa.helpers
|
||||
import capa.features
|
||||
import capa.features.common
|
||||
import capa.features.freeze
|
||||
from capa.features.extractors.base_extractor import FeatureExtractor
|
||||
from capa.features.extractors.base_extractor import StaticFeatureExtractor
|
||||
|
||||
logger = logging.getLogger("capa.profile")
|
||||
|
||||
@@ -105,8 +105,9 @@ def main(argv=None):
|
||||
):
|
||||
with open(args.sample, "rb") as f:
|
||||
extractor = capa.features.freeze.load(f.read())
|
||||
assert isinstance(extractor, StaticFeatureExtractor)
|
||||
else:
|
||||
extractor: FeatureExtractor = capa.main.get_extractor(
|
||||
extractor = capa.main.get_extractor(
|
||||
args.sample, args.format, args.os, capa.main.BACKEND_VIV, sig_paths, should_save_workspace=False
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user