From 53d897da09be2bb5bf482dd5bcad1e9aec2c5fa2 Mon Sep 17 00:00:00 2001 From: Yacine Elhamer Date: Wed, 12 Jul 2023 15:39:56 +0100 Subject: [PATCH] ida/plugin/form.py: replace list comprehension in any() with a generator --- capa/ida/plugin/form.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/capa/ida/plugin/form.py b/capa/ida/plugin/form.py index 8259f109..503254d9 100644 --- a/capa/ida/plugin/form.py +++ b/capa/ida/plugin/form.py @@ -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(