Skip to content

Commit 649c594

Browse files
committed
Arm backend: Fix mypy warnings in arm_vela.py
In arm_vela.py, function vela_compile() there is a reuse of the variable block_length that was of different type between uses and mypy complained. Change name of block_length that is used inside the loop to block_length_bytes since its not a int. Change-Id: If44e46269f777df903641f1cd4c30af4c60d5bbc
1 parent ce93291 commit 649c594

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backends/arm/arm_vela.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ def vela_compile(tosa_graph, args: List[str], shape_order=None):
9696
block_name = block_name + b"\x00" * (16 - len(block_name))
9797

9898
# We need the acual unpadded block lengths for hw setup
99-
block_length = struct.pack("<iiii", len(bin_blocks[key]), 0, 0, 0) # type: ignore[assignment]
99+
block_length_bytes = struct.pack("<iiii", len(bin_blocks[key]), 0, 0, 0)
100100

101101
# Pad block data to multiple of 16 bytes
102102
block_data = bin_blocks[key]
103103
block_data = block_data + b"\x00" * (15 - (len(block_data) - 1) % 16)
104104

105-
block = block_name + block_length + block_data # type: ignore[operator]
105+
block = block_name + block_length_bytes + block_data
106106
blocks = blocks + block
107107

108108
return blocks

0 commit comments

Comments
 (0)