fix: add missing explicit submodule imports for Pyright attribute resolution

This commit is contained in:
Willi Ballenthin
2026-04-22 16:46:22 +03:00
committed by Willi Ballenthin
parent 25edb58fdd
commit d16a85bdba
7 changed files with 13 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ import collections
from dataclasses import dataclass
import capa.perf
import capa.engine
import capa.helpers
import capa.features.freeze as frz
import capa.render.result_document as rdoc

View File

@@ -16,6 +16,7 @@
import logging
from typing import Union, Iterator
import capa.helpers
import capa.features.extractors.cape.call
import capa.features.extractors.cape.file
import capa.features.extractors.cape.thread

View File

@@ -17,8 +17,8 @@ import io
from typing import Union, Iterator, Optional
import rich.console
from rich.text import Text
from rich.markup import escape
from rich.progress import Text
import capa.render.result_document as rd

View File

@@ -38,6 +38,7 @@ import capa.rules
import capa.helpers
import capa.render.utils as rutils
import capa.features.freeze as frz
import capa.features.address
import capa.render.result_document as rd
from capa.rules import RuleSet
from capa.engine import MatchResults

View File

@@ -180,9 +180,9 @@ def generate_rule_cache(rules_dir: Path, cache_dir: Path) -> bool:
logger.error("%s", str(e))
return False
content = capa.rules.cache.get_ruleset_content(rules)
id = capa.rules.cache.compute_cache_identifier(content)
path = capa.rules.cache.get_cache_path(cache_dir, id)
content = get_ruleset_content(rules)
id = compute_cache_identifier(content)
path = get_cache_path(cache_dir, id)
assert path.exists()
logger.info("rules cache saved to: %s", path)

View File

@@ -14,6 +14,7 @@
import textwrap
import capa.rules
import capa.capabilities.common
from capa.features.extractors.base_extractor import FunctionFilter

View File

@@ -18,7 +18,12 @@ import pytest
import fixtures
import capa
import capa.rules
import capa.engine as ceng
import capa.features.file
import capa.features.insn
import capa.features.common
import capa.features.basicblock
import capa.render.result_document as rdoc
import capa.features.freeze.features as frzf
from capa.capabilities.common import Capabilities