Made proposed changes to fix mypy errors

This commit is contained in:
cl3o
2021-12-06 20:23:25 +01:00
parent 061a66e437
commit a0ca6e18c8
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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
View File
@@ -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: