From ba57a981946fbe68947ea2fec0b9db3d5924ba22 Mon Sep 17 00:00:00 2001 From: Willi Ballenthin Date: Wed, 22 Apr 2026 20:21:06 +0300 Subject: [PATCH] fix: remove unused imports from capa/ida/plugin/form.py capa.main, capa.render.json, and capa.features.extractors.ida.extractor were imported but never referenced in the file, adding unnecessary startup cost. --- CHANGELOG.md | 1 + capa/ida/plugin/form.py | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a313683..88155009 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ - fix: correct wrong dict key in VMRay _compute_monitor_threads assertion (used thread_id instead of process_id) @williballenthin fix: replace assert with isinstance guard in get_callee for invalid MethodSpec tokens @williballenthin - fix: replace assert with isinstance guard in get_callee for invalid MethodSpec tokens @williballenthin +- fix: remove unused imports of capa.main, capa.render.json, and capa.features.extractors.ida.extractor from form.py @williballenthin (SURF-67) - fix: remove dead trim_function_name function from form.py that was never called @williballenthin (SURF-66) - fix: replace get_file_md5/get_file_sha256 with retrieve_input_file_md5/sha256 shims so all callers use consistent IDA version-aware API @williballenthin (SURF-65) - fix: rename dragEventEnter to dragEnterEvent so Qt dispatches drag-enter events correctly in CapaExplorerRulegenEditor @williballenthin (SURF-64) diff --git a/capa/ida/plugin/form.py b/capa/ida/plugin/form.py index dfed8e70..8af176e0 100644 --- a/capa/ida/plugin/form.py +++ b/capa/ida/plugin/form.py @@ -24,17 +24,14 @@ import idaapi import ida_kernwin import ida_settings -import capa.main import capa.rules import capa.engine import capa.loader import capa.version import capa.ida.helpers -import capa.render.json import capa.features.common import capa.capabilities.common import capa.render.result_document -import capa.features.extractors.ida.extractor from capa.rules import Rule from capa.engine import FeatureSet from capa.rules.cache import compute_ruleset_cache_identifier