Skip to content

Commit 4230a71

Browse files
committed
fix github action error due to PLW0108
1 parent fc53828 commit 4230a71

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

bibcat/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ def retrieve(batchid, verbose):
588588
)
589589
@click.option("-e", "--eval-batch", is_flag=True, show_default=True, help="Evaulate individual chunk results")
590590
@click.option("-g", "--merge", is_flag=True, show_default=True, help="Merge chunks into final single output file")
591-
def process(filename, batch_file, model, test, retrieve_batch, check, eval_batch, merge):
591+
def process(filename, batch_file, model, test, retrieve_batch, check, eval_batch, merge): # noqa: C901
592592
"""Process a batch of papers using the OpenAI Batch API
593593
594594
Process a large batch of papers, with proper file chunking, for

bibcat/tests/llm/test_eval.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,10 @@ def test_build_eval_data_for_run_in_memory(mocker):
201201
SOURCE_PAPER_WITHOUT_MISSIONS["bibcode"]: SOURCE_PAPER_WITHOUT_MISSIONS,
202202
}
203203

204-
mocker.patch("bibcat.llm.evaluate.get_source", side_effect=lambda bibcode: source_papers_by_bibcode.get(bibcode))
204+
def get_source_for_bibcode(*, bibcode, **kwargs):
205+
return source_papers_by_bibcode.get(bibcode)
206+
207+
mocker.patch("bibcat.llm.evaluate.get_source", side_effect=get_source_for_bibcode)
205208
mocker.patch("bibcat.llm.evaluate.identify_missions_in_text", return_value=[True])
206209

207210
eval_data = build_eval_data_for_run(

0 commit comments

Comments
 (0)