mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
refactor: move is_important function to top level
This commit is contained in:
parent
3191e85857
commit
496525c6c2
1 changed files with 25 additions and 25 deletions
|
@ -158,15 +158,7 @@ IMPORTANT_FILES = [
|
|||
]
|
||||
|
||||
|
||||
def filter_important_files(file_paths):
|
||||
"""
|
||||
Filter a list of file paths to return only those that are commonly important in codebases.
|
||||
|
||||
:param file_paths: List of file paths to check
|
||||
:return: List of file paths that match important file patterns
|
||||
"""
|
||||
|
||||
def is_important(file_path):
|
||||
def is_important(file_path):
|
||||
file_name = os.path.basename(file_path)
|
||||
dir_name = os.path.dirname(file_path)
|
||||
|
||||
|
@ -190,4 +182,12 @@ def filter_important_files(file_paths):
|
|||
file_path.endswith(f"/{name}") for name in IMPORTANT_FILES
|
||||
)
|
||||
|
||||
|
||||
def filter_important_files(file_paths):
|
||||
"""
|
||||
Filter a list of file paths to return only those that are commonly important in codebases.
|
||||
|
||||
:param file_paths: List of file paths to check
|
||||
:return: List of file paths that match important file patterns
|
||||
"""
|
||||
return list(filter(is_important, file_paths))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue