mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-08 14:50:40 +08:00
1. Move deployment_type to configuration.toml
2. Lint 3. Inject GitHub app installation ID into GitHub provider using the settings mechanism.
This commit is contained in:
@ -1,15 +1,15 @@
|
||||
|
||||
# Generated by CodiumAI
|
||||
|
||||
from pr_agent.algo.language_handler import sort_files_by_main_languages
|
||||
|
||||
|
||||
import pytest
|
||||
|
||||
"""
|
||||
Code Analysis
|
||||
|
||||
Objective:
|
||||
The objective of the function is to sort a list of files by their main language, putting the files that are in the main language first and the rest of the files after. It takes in a dictionary of languages and their sizes, and a list of files.
|
||||
The objective of the function is to sort a list of files by their main language, putting the files that are in the main
|
||||
language first and the rest of the files after. It takes in a dictionary of languages and their sizes, and a list of
|
||||
files.
|
||||
|
||||
Inputs:
|
||||
- languages: a dictionary containing the languages and their sizes
|
||||
@ -33,6 +33,8 @@ Additional aspects:
|
||||
- The function uses the filter_bad_extensions function to filter out files with bad extensions
|
||||
- The function uses a rest_files dictionary to store the files that do not belong to any of the main extensions
|
||||
"""
|
||||
|
||||
|
||||
class TestSortFilesByMainLanguages:
|
||||
# Tests that files are sorted by main language, with files in main language first and the rest after
|
||||
def test_happy_path_sort_files_by_main_languages(self):
|
||||
@ -118,4 +120,4 @@ class TestSortFilesByMainLanguages:
|
||||
{'language': 'C++', 'files': [files[2], files[7]]},
|
||||
{'language': 'Other', 'files': []}
|
||||
]
|
||||
assert sort_files_by_main_languages(languages, files) == expected_output
|
||||
assert sort_files_by_main_languages(languages, files) == expected_output
|
||||
|
Reference in New Issue
Block a user