Skip to content

Commit

Permalink
ida/plugin/form.py: replace list comprehension in any() with a generator
Browse files Browse the repository at this point in the history
  • Loading branch information
yelhamer committed Jul 12, 2023
1 parent 1703039 commit 53d897d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions capa/ida/plugin/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -1193,14 +1193,12 @@ def update_rule_status(self, rule_text: str):

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(
Expand Down

0 comments on commit 53d897d

Please sign in to comment.