Skip to content

Commit

Permalink
Fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
YoannQDQ authored and nyalldawson committed Mar 17, 2023
1 parent 8db1026 commit 5040a3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/console/console_editor.py
Expand Up @@ -65,7 +65,9 @@ def findMinimalDistanceIndex(source, target):
from Levenshtein import distance
except ImportError:
from difflib import SequenceMatcher
def distance(s, t): return 1 - SequenceMatcher(None, s, t).ratio()

def distance(s, t):
return 1 - SequenceMatcher(None, s, t).ratio()

d0 = distance(source[:index], target)
if d0 == 0:
Expand Down

0 comments on commit 5040a3b

Please sign in to comment.