From 1682fcae57343cc9f997b57a7423563f643e4fd0 Mon Sep 17 00:00:00 2001 From: Alexander Song Date: Tue, 14 May 2024 12:41:12 -0700 Subject: [PATCH 1/2] fix: remove unused type ignores from langchain tests --- .../instrumentation/langchain/test_instrumentor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/instrumentation/openinference-instrumentation-langchain/tests/openinference/instrumentation/langchain/test_instrumentor.py b/python/instrumentation/openinference-instrumentation-langchain/tests/openinference/instrumentation/langchain/test_instrumentor.py index 99cd733f4..1e9780458 100644 --- a/python/instrumentation/openinference-instrumentation-langchain/tests/openinference/instrumentation/langchain/test_instrumentor.py +++ b/python/instrumentation/openinference-instrumentation-langchain/tests/openinference/instrumentation/langchain/test_instrumentor.py @@ -533,9 +533,9 @@ def test_chain_metadata( # We will test that these variables do not overwrite the passed variables prompt_template_variables=prompt_template_variables, ): - llm.predict(**langchain_prompt_variables) # type: ignore + llm.predict(**langchain_prompt_variables) else: - llm.predict(**langchain_prompt_variables) # type: ignore + llm.predict(**langchain_prompt_variables) spans = in_memory_span_exporter.get_finished_spans() spans_by_name = {span.name: span for span in spans} @@ -658,9 +658,9 @@ def test_read_session_from_metadata( # We will test that these variables do not overwrite the passed variables prompt_template_variables=prompt_template_variables, ): - llm.predict(**langchain_prompt_variables) # type: ignore + llm.predict(**langchain_prompt_variables) else: - llm.predict(**langchain_prompt_variables) # type: ignore + llm.predict(**langchain_prompt_variables) spans = in_memory_span_exporter.get_finished_spans() spans_by_name = {span.name: span for span in spans} From 341c190b0ed361866ba0c6838b718ddf2dff6107 Mon Sep 17 00:00:00 2001 From: Alexander Song Date: Tue, 14 May 2024 13:12:08 -0700 Subject: [PATCH 2/2] cover all versions --- .../instrumentation/langchain/test_instrumentor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/instrumentation/openinference-instrumentation-langchain/tests/openinference/instrumentation/langchain/test_instrumentor.py b/python/instrumentation/openinference-instrumentation-langchain/tests/openinference/instrumentation/langchain/test_instrumentor.py index 1e9780458..0a2ba1ca1 100644 --- a/python/instrumentation/openinference-instrumentation-langchain/tests/openinference/instrumentation/langchain/test_instrumentor.py +++ b/python/instrumentation/openinference-instrumentation-langchain/tests/openinference/instrumentation/langchain/test_instrumentor.py @@ -533,9 +533,9 @@ def test_chain_metadata( # We will test that these variables do not overwrite the passed variables prompt_template_variables=prompt_template_variables, ): - llm.predict(**langchain_prompt_variables) + llm.predict(**langchain_prompt_variables) # type: ignore[arg-type,unused-ignore] else: - llm.predict(**langchain_prompt_variables) + llm.predict(**langchain_prompt_variables) # type: ignore[arg-type,unused-ignore] spans = in_memory_span_exporter.get_finished_spans() spans_by_name = {span.name: span for span in spans} @@ -658,9 +658,9 @@ def test_read_session_from_metadata( # We will test that these variables do not overwrite the passed variables prompt_template_variables=prompt_template_variables, ): - llm.predict(**langchain_prompt_variables) + llm.predict(**langchain_prompt_variables) # type: ignore[arg-type,unused-ignore] else: - llm.predict(**langchain_prompt_variables) + llm.predict(**langchain_prompt_variables) # type: ignore[arg-type,unused-ignore] spans = in_memory_span_exporter.get_finished_spans() spans_by_name = {span.name: span for span in spans}