Skip to content

Commit 98231dd

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

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

libs/core/langchain_core/prompts/string.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _get_jinja2_variables_from_template(template: str) -> set[str]:
9898
raise ImportError(msg) from e
9999
env = Environment() # noqa: S701
100100
ast = env.parse(template)
101-
return meta.find_undeclared_variables(ast)
101+
return meta.find_undeclared_variables(ast) # type: ignore[no-untyped-call]
102102

103103

104104
def mustache_formatter(template: str, /, **kwargs: Any) -> str:

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[arg-type,call-arg,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

+10-2
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:

0 commit comments

Comments
 (0)