From 04fb45270148f3f4f3e556484b1b1535d5157b13 Mon Sep 17 00:00:00 2001 From: "joxeankoret@yahoo.es" Date: Tue, 9 Apr 2024 09:29:18 +0200 Subject: [PATCH] Added workaround for an error with annotations using old Python versions --- ml/model.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ml/model.py b/ml/model.py index 9ead13e..4405965 100644 --- a/ml/model.py +++ b/ml/model.py @@ -30,6 +30,8 @@ except ImportError: from difflib import SequenceMatcher +from typing import List + #------------------------------------------------------------------------------- try: import numpy as np @@ -113,7 +115,7 @@ def count_callers_callees(db_name : str, func_id : int): return callers, callees #------------------------------------------------------------------------------- -def compare_rows(row1 : list, row2 : list) -> list[float]: +def compare_rows(row1 : list, row2 : list) -> List[float]: """ Compare two function rows and calculate a similarity ratio for it. """