ida/plugin/form.py: replace list comprehension in any() with a generator

This commit is contained in:
Yacine Elhamer
2023-07-12 15:39:56 +01:00
parent 17030395c6
commit 53d897da09

View File

@@ -1193,14 +1193,12 @@ class CapaExplorerForm(idaapi.PluginForm):
is_match: bool = False
if self.rulegen_current_function is not None and any(
[
s in rule.scopes
for s in (
capa.rules.Scope.FUNCTION,
capa.rules.Scope.BASIC_BLOCK,
capa.rules.Scope.INSTRUCTION,
)
]
s in rule.scopes
for s in (
capa.rules.Scope.FUNCTION,
capa.rules.Scope.BASIC_BLOCK,
capa.rules.Scope.INSTRUCTION,
)
):
try:
_, func_matches, bb_matches, insn_matches = self.rulegen_feature_cache.find_code_capabilities(