mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-02 20:00:41 +08:00
Performance improvement: Filter out bad files before getting their head and original source code and diff
This commit is contained in:
@ -64,7 +64,11 @@ bad_extensions = [
|
||||
|
||||
|
||||
def filter_bad_extensions(files):
|
||||
return [f for f in files if f.filename.split('.')[-1] not in bad_extensions]
|
||||
return [f for f in files if is_valid_file(f.filename)]
|
||||
|
||||
|
||||
def is_valid_file(filename):
|
||||
return filename.split('.')[-1] not in bad_extensions
|
||||
|
||||
|
||||
def sort_files_by_main_languages(languages: Dict, files: list):
|
||||
|
Reference in New Issue
Block a user