Skip to content

Commit fcd62a9

Browse files
committed
fix type annotations
1 parent 50c144d commit fcd62a9

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

asv/contrib/lightspeed/process_code.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import sqlite3
1010
import hashlib
1111
from pathlib import Path
12-
from typing import Optional, Union
12+
from typing import List, Optional, Union
1313
from array import array
1414
from subprocess import run, CalledProcessError
1515

@@ -35,15 +35,15 @@ def debug_blob_to_code(blob):
3535
return blob.split(";\n")
3636

3737

38-
def methods_to_checksums(blocks) -> [int]:
38+
def methods_to_checksums(blocks) -> List[int]:
3939
checksums = []
4040
for block in blocks:
4141
checksums.append(to_signed(zlib.crc32(block.encode("UTF-8"))))
4242

4343
return checksums
4444

4545

46-
def checksums_to_blob(checksums: [int]) -> sqlite3.Binary:
46+
def checksums_to_blob(checksums: List[int]) -> sqlite3.Binary:
4747
blob = array(CHECKUMS_ARRAY_TYPE, checksums)
4848
data = blob.tobytes()
4949
return sqlite3.Binary(data)
@@ -293,8 +293,8 @@ def create_fingerprint_source(source_code, lines, ext="py"):
293293
return create_fingerprint(module, lines)
294294

295295

296-
def create_fingerprint(module: Module, covered_lines: list[int]) -> list[int]:
297-
blocks: list[Block] = module.blocks
296+
def create_fingerprint(module: Module, covered_lines: List[int]) -> List[int]:
297+
blocks: List[Block] = module.blocks
298298
method_reprs = []
299299
line_index = 0
300300
sorted_lines = sorted(covered_lines)

0 commit comments

Comments
 (0)