Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
r37r05p3C7 committed Feb 12, 2024
1 parent e8f59aa commit 6cf6122
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ def popup_content():
if (start_dir / clean_dir).is_dir():
start_dir /= clean_dir
else:
similarity = lambda a, b: difflib.SequenceMatcher(None, a.lower(), b.lower()).quick_ratio()
ratio = lambda a, b: difflib.SequenceMatcher(None, a.lower(), b.lower()).quick_ratio()
dirs = [node for node in os.listdir(start_dir) if os.path.isdir(start_dir / node)]
similarity = {d: similarity(d, game.name) for d in dirs}
similarity = {d: ratio(d, game.name) for d in dirs}
best_match = max(similarity, key=similarity.get)
if similarity[best_match] > 0.85:
start_dir /= best_match
Expand Down

0 comments on commit 6cf6122

Please sign in to comment.