From 2be97956abd091dc9503588808741b9b89abe802 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Sat, 28 Feb 2026 21:24:10 +0100 Subject: [PATCH] Type hints fixed for backwards compatibility for python 3.9 --- tests/test_thumb_addend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_thumb_addend.py b/tests/test_thumb_addend.py index a31f276..342cac7 100644 --- a/tests/test_thumb_addend.py +++ b/tests/test_thumb_addend.py @@ -1,5 +1,6 @@ import pelfy._main as _main import os +from typing import Union def test_thumb_addend_extraction() -> None: @@ -14,7 +15,7 @@ def test_thumb_addend_extraction() -> None: reloc_addends.append((reloc.type, reloc['r_offset'], reloc['r_addend'], reloc.symbol.name)) # Reference values from the .asm file (addend = 0 for all Thumb relocations) - reference: list[tuple[str, int | None, int, str]] = [ + reference: list[tuple[str, Union[int, None], int, str]] = [ ('R_ARM_THM_MOVW_ABS_NC', None, 0, 'dummy_int'), ('R_ARM_THM_MOVT_ABS', None, 0, 'dummy_int'), ('R_ARM_THM_MOVW_ABS_NC', None, 0, 'dummy_float'),