mirror of
https://github.com/mandiant/capa.git
synced 2026-04-28 11:53:20 -07:00
fix: add missing submodule imports for Pyright attribute access
This commit is contained in:
committed by
Willi Ballenthin
parent
0655263ed3
commit
295ae3ee4b
@@ -23,9 +23,11 @@ from rich.console import Console
|
||||
from typing_extensions import assert_never
|
||||
|
||||
import capa.rules
|
||||
import capa.helpers
|
||||
import capa.version
|
||||
import capa.features.common
|
||||
import capa.features.freeze as frz
|
||||
import capa.features.address
|
||||
import capa.features.extractors
|
||||
import capa.render.result_document as rdoc
|
||||
import capa.features.extractors.common
|
||||
|
||||
@@ -2157,7 +2157,7 @@ class RuleSet:
|
||||
|
||||
if paranoid:
|
||||
rules: list[Rule] = self.rules_by_scope[scope]
|
||||
paranoid_features, paranoid_matches = capa.engine.match(rules, features, addr)
|
||||
paranoid_features, paranoid_matches = ceng.match(rules, features, addr)
|
||||
|
||||
if features != paranoid_features:
|
||||
logger.warning("paranoid: %s: %s", scope, addr)
|
||||
@@ -2242,6 +2242,8 @@ def get_rules(
|
||||
on_load_rule: callback to invoke before a rule is loaded, use for progress or cancellation
|
||||
enable_cache: enable loading of a cached ruleset (default: True)
|
||||
"""
|
||||
import capa.rules.cache # local import to avoid circular dependency (cache.py imports capa.rules)
|
||||
|
||||
if cache_dir is None:
|
||||
cache_dir = capa.rules.cache.get_default_cache_directory()
|
||||
# rule_paths may contain directory paths,
|
||||
|
||||
Reference in New Issue
Block a user