Skip to content

Commit c95f8d4

Browse files
committed
Add pytest ids to test__convert_typed_dict_to_openai_function
1 parent 7ce5680 commit c95f8d4

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

libs/core/langchain_core/runnables/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def coro_with_context(
141141
The coroutine with the context.
142142
"""
143143
if asyncio_accepts_context():
144-
return asyncio.create_task(coro, context=context) # type: ignore[arg-type]
144+
return asyncio.create_task(coro, context=context) # type: ignore[call-arg,arg-type,unused-ignore]
145145
if create_task:
146146
return asyncio.create_task(coro) # type: ignore[arg-type]
147147
return coro

libs/core/tests/unit_tests/utils/test_function_calling.py

+11-3
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,16 @@ def test_tool_outputs() -> None:
736736
assert not response.tool_calls
737737

738738

739-
@pytest.mark.parametrize("typed_dict", [ExtensionsTypedDict, TypingTypedDict])
740-
@pytest.mark.parametrize("annotated", [ExtensionsAnnotated, TypingAnnotated])
739+
@pytest.mark.parametrize(
740+
"typed_dict",
741+
[ExtensionsTypedDict, TypingTypedDict],
742+
ids=["typing_extensions.TypedDict", "typing.TypedDict"],
743+
)
744+
@pytest.mark.parametrize(
745+
"annotated",
746+
[ExtensionsAnnotated, TypingAnnotated],
747+
ids=["typing_extensions.Annotated", "typing.Annotated"],
748+
)
741749
def test__convert_typed_dict_to_openai_function(
742750
typed_dict: TypeAlias, annotated: TypeAlias
743751
) -> None:
@@ -989,7 +997,7 @@ class Tool(typed_dict): # type: ignore[misc]
989997
)
990998
def test_convert_union_type_py_39() -> None:
991999
@tool
992-
def magic_function(value: int | str) -> str: # type: ignore[syntax,unused-ignore] # noqa: ARG001,FA102
1000+
def magic_function(value: int | str) -> str: # noqa: ARG001,FA102
9931001
"""Compute a magic function."""
9941002
return ""
9951003

0 commit comments

Comments
 (0)