mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
only take fuzzy matches that match a single valid fname
This commit is contained in:
parent
e17a1fff3a
commit
5b672e9bfd
1 changed files with 1 additions and 1 deletions
|
@ -554,7 +554,7 @@ def find_filename(lines, fence, valid_fnames):
|
|||
# Perform fuzzy matching with valid_fnames
|
||||
for fname in filenames:
|
||||
close_matches = difflib.get_close_matches(fname, valid_fnames, n=1, cutoff=0.6)
|
||||
if close_matches:
|
||||
if len(close_matches) == 1:
|
||||
return close_matches[0]
|
||||
|
||||
# If no fuzzy match, look for a file w/extension
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue