Make mypy happy

This commit is contained in:
Théophile Bastian 2023-03-04 11:45:06 +01:00
parent 0b6c1993d2
commit fabc94c062
2 changed files with 3 additions and 1 deletions

2
mypy.ini Normal file
View file

@ -0,0 +1,2 @@
[mypy]
check_untyped_defs = True

View file

@ -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):