mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-04 19:55:00 +00:00
fix: improve important file matching in is_important function
This commit is contained in:
parent
648d46fdb3
commit
5532893ac9
1 changed files with 2 additions and 1 deletions
|
@ -231,7 +231,8 @@ def is_important(file_path):
|
||||||
# Check if the file_path matches any of the NORMALIZED_IMPORTANT_FILES
|
# Check if the file_path matches any of the NORMALIZED_IMPORTANT_FILES
|
||||||
normalized_path = os.path.normpath(file_path)
|
normalized_path = os.path.normpath(file_path)
|
||||||
return any(
|
return any(
|
||||||
normalized_path.endswith(important_file) for important_file in NORMALIZED_IMPORTANT_FILES
|
normalized_path == important_file or normalized_path.endswith(os.sep + important_file)
|
||||||
|
for important_file in NORMALIZED_IMPORTANT_FILES
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue