From 1fb015b3129b3de45bb0f785bd422dc6d12c84dc Mon Sep 17 00:00:00 2001 From: stefandesouza Date: Wed, 10 Jan 2024 13:05:27 +0100 Subject: [PATCH] Formatting before PR --- osaca/parser/parser_AArch64.py | 5 +++-- osaca/parser/register.py | 2 +- tests/test_parser_AArch64.py | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/osaca/parser/parser_AArch64.py b/osaca/parser/parser_AArch64.py index 714192d..35cc85d 100644 --- a/osaca/parser/parser_AArch64.py +++ b/osaca/parser/parser_AArch64.py @@ -433,9 +433,10 @@ class ParserAArch64(BaseParser): scale = 2 ** int(memory_address["index"]["shift"][0]["value"]) if index is not None: index = RegisterOperand( - name=index["name"], prefix_id=index["prefix"] if "prefix" in index else None, + name=index["name"], + prefix_id=index["prefix"] if "prefix" in index else None, shift=index["shift"] if "shift" in index else None, - shift_op=index["shift_op"] if "shift_op" in index else None + shift_op=index["shift_op"] if "shift_op" in index else None, ) new_dict = MemoryOperand( offset_ID=offset, diff --git a/osaca/parser/register.py b/osaca/parser/register.py index ad84b5c..aacf2e5 100644 --- a/osaca/parser/register.py +++ b/osaca/parser/register.py @@ -22,7 +22,7 @@ class RegisterOperand(Operand): pre_indexed=False, post_indexed=False, shift=False, - shift_op=False + shift_op=False, ): super().__init__(name, source, destination) self._width_id = width_id diff --git a/tests/test_parser_AArch64.py b/tests/test_parser_AArch64.py index 7fe8afb..95f45ca 100755 --- a/tests/test_parser_AArch64.py +++ b/tests/test_parser_AArch64.py @@ -216,7 +216,9 @@ class TestParserAArch64(unittest.TestCase): MemoryOperand( offset_ID=None, base_id=RegisterOperand(prefix_id="x", name="11"), - index_id=RegisterOperand(prefix_id="w", name="10", shift_op="sxtw", shift=[{"value": "2"}]), + index_id=RegisterOperand( + prefix_id="w", name="10", shift_op="sxtw", shift=[{"value": "2"}] + ), scale_id=4, ), ],