From ad41178263105b50f4207e99e3f3bcb7a8c310e7 Mon Sep 17 00:00:00 2001 From: Michael Skarlinski Date: Fri, 14 Jun 2024 15:27:57 -0700 Subject: [PATCH] use outputs.append correctly after bad merge --- tests/test_paperqa.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/test_paperqa.py b/tests/test_paperqa.py index 8dad59719..9b4ecc7f1 100644 --- a/tests/test_paperqa.py +++ b/tests/test_paperqa.py @@ -579,7 +579,7 @@ async def test_anyscale_chain(): "The {animal} says", skip_system=True, ) - outputs = [] + outputs = [] # type: ignore[var-annotated] completion = await call({"animal": "duck"}, callbacks=[outputs.append]) # type: ignore[call-arg] assert completion.seconds_to_first_token > 0 assert completion.prompt_count > 0 @@ -590,11 +590,7 @@ async def test_anyscale_chain(): assert completion.seconds_to_first_token == 0 assert completion.seconds_to_last_token > 0 - # check with mixed callbacks - async def ac(x): # noqa: ARG001 - pass - - completion = await call({"animal": "duck"}, callbacks=[accum, ac]) # type: ignore[call-arg] + completion = await call({"animal": "duck"}, callbacks=[outputs.append]) # type: ignore[call-arg] def test_docs():