File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 6
6
"""
7
7
8
8
import math
9
+ from typing import Sequence , cast
9
10
10
11
import pytest
11
12
@@ -380,10 +381,12 @@ def test_worst_precompile_fixed_cost(
380
381
381
382
concatenated_bytes : bytes
382
383
if all (isinstance (p , str ) for p in parameters ):
383
- concatenated_hex_string = "" .join (parameters )
384
+ parameters_str = cast (list [str ], parameters )
385
+ concatenated_hex_string = "" .join (parameters_str )
384
386
concatenated_bytes = bytes .fromhex (concatenated_hex_string )
385
387
elif all (isinstance (p , (bytes , BytesConcatenation )) for p in parameters ):
386
- concatenated_bytes = b"" .join (bytes (p ) for p in parameters )
388
+ parameters_bytes_list = [bytes (p ) for p in parameters ]
389
+ concatenated_bytes = b"" .join (parameters_bytes_list )
387
390
else :
388
391
raise TypeError (
389
392
"parameters must be a list of strings (hex) "
You can’t perform that action at this time.
0 commit comments