Type hints fixed for backwards compatibility for python 3.9

This commit is contained in:
Nicolas 2026-02-28 21:24:10 +01:00
parent a8139e3739
commit 2be97956ab
1 changed files with 2 additions and 1 deletions

View File

@ -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'),