From 9a1e337069da2e50870309b0920d3a38b33821fe Mon Sep 17 00:00:00 2001 From: Joran Honig Date: Tue, 23 Oct 2018 13:04:10 +0200 Subject: [PATCH] Remove incompatible signature --- mythril/disassembler/asm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mythril/disassembler/asm.py b/mythril/disassembler/asm.py index af76d5df..506d779c 100644 --- a/mythril/disassembler/asm.py +++ b/mythril/disassembler/asm.py @@ -42,7 +42,7 @@ def get_opcode_from_name(operation_name): raise RuntimeError("Unknown opcode") -def find_op_code_sequence(pattern, instruction_list): +def find_op_code_sequence(pattern: list, instruction_list: list): """ Returns all indices in instruction_list that point to instruction sequences following a pattern :param pattern: The pattern to look for. @@ -55,7 +55,7 @@ def find_op_code_sequence(pattern, instruction_list): yield i -def is_sequence_match(pattern: list, instruction_list, index: int) -> bool: +def is_sequence_match(pattern: list, instruction_list: list, index: int) -> bool: """ Checks if the instructions starting at index follow a pattern :param pattern: List of lists describing a pattern. @@ -95,7 +95,7 @@ def disassemble(bytecode: str) -> list: match = re.search(regex_PUSH, op_code_name) if match: - argument_bytes: bytes = bytecode[address + 1: address + 1 + int(match.group(1))] + argument_bytes = bytecode[address + 1: address + 1 + int(match.group(1))] current_instruction.argument = "0x" + argument_bytes.hex() address += int(match.group(1))