mirror of
https://github.com/mandiant/capa.git
synced 2026-07-08 05:17:31 -07:00
Made proposed changes to fix mypy errors
This commit is contained in:
+1
-1
@@ -34,4 +34,4 @@ def is_runtime_ida():
|
||||
|
||||
|
||||
def assert_never(value: NoReturn) -> NoReturn:
|
||||
assert False, f'Unhandled value: {value} ({type(value).__name__})'
|
||||
assert False, f"Unhandled value: {value} ({type(value).__name__})"
|
||||
|
||||
+3
-3
@@ -1187,13 +1187,13 @@ class RuleSet:
|
||||
this routine should act just like `capa.engine.match`,
|
||||
except that it may be more performant.
|
||||
"""
|
||||
if scope == scope.FILE:
|
||||
if scope is Scope.FILE:
|
||||
easy_rules_by_feature = self._easy_file_rules_by_feature
|
||||
hard_rule_names = self._hard_file_rules
|
||||
elif scope == scope.FUNCTION:
|
||||
elif scope is Scope.FUNCTION:
|
||||
easy_rules_by_feature = self._easy_function_rules_by_feature
|
||||
hard_rule_names = self._hard_function_rules
|
||||
elif scope == scope.BASIC_BLOCK:
|
||||
elif scope is Scope.BASIC_BLOCK:
|
||||
easy_rules_by_feature = self._easy_basic_block_rules_by_feature
|
||||
hard_rule_names = self._hard_basic_block_rules
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user