From fabc94c0627c60ca94ab9faf0920f457e19414db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Sat, 4 Mar 2023 11:45:06 +0100 Subject: [PATCH] Make mypy happy --- mypy.ini | 2 ++ repartir_taches/util.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 mypy.ini diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 0000000..31671bd --- /dev/null +++ b/mypy.ini @@ -0,0 +1,2 @@ +[mypy] +check_untyped_defs = True diff --git a/repartir_taches/util.py b/repartir_taches/util.py index 0fa51fe..8aa2fc8 100644 --- a/repartir_taches/util.py +++ b/repartir_taches/util.py @@ -29,7 +29,7 @@ def levenshtein_distance(s1, s2): if len(s1) > len(s2): s1, s2 = s2, s1 - distances = range(len(s1) + 1) + distances: list[int] = list(range(len(s1) + 1)) for i2, c2 in enumerate(s2): distances_ = [i2 + 1] for i1, c1 in enumerate(s1):