Skip to content

Commit

Permalink
Merge branch 'main' into fix/on_comment
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinYe1234 authored Jun 5, 2024
2 parents b37fe08 + f083858 commit ad3b741
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sweepai/utils/ticket_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
".spec.ts", ".spec.js", ".test.ts", ".test.js",
"_test.py", "_test.ts", "_test.js", "_test.go",
"Test.java", "Tests.java", "Spec.java", "Specs.java",
"_spec.rb", "_specs.rb", ".feature",
"_spec.rb", "_specs.rb", ".feature", "cy.ts", "cy.js"
],
"substring": ["tests/", "test/", "/test", "_test", "rspec", ".test"],
},
Expand Down Expand Up @@ -342,7 +342,10 @@ def multi_prep_snippets(
# Fallback to sequential processing
logger.warning(e)
for type_name, snippets_subset in separated_snippets:
new_content_to_lexical_score_by_type[type_name] = process_snippets(type_name, queries[0], snippets_subset, content_to_lexical_score, NUM_SNIPPETS_TO_KEEP, rerank_count[type_name], {})[1]
if snippets_subset:
new_content_to_lexical_score_by_type[type_name] = process_snippets(type_name, queries[0], snippets_subset, content_to_lexical_score, NUM_SNIPPETS_TO_KEEP, rerank_count[type_name], {})[1]
else:
new_content_to_lexical_score_by_type[type_name] = {}
logger.info(f"Reranked snippets took {timer.time_elapsed} seconds")

for type_name, snippets_subset in separated_snippets:
Expand Down

0 comments on commit ad3b741

Please sign in to comment.