mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-15 22:44:36 +00:00
core: Add ruff rules PYI (#29335)
See https://docs.astral.sh/ruff/rules/#flake8-pyi-pyi --------- Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
This commit is contained in:
committed by
GitHub
parent
d8e3b7667f
commit
6650b94627
@@ -994,12 +994,12 @@ def test__convert_typed_dict_to_openai_function_fail(typed_dict: type) -> None:
|
||||
)
|
||||
def test_convert_union_type_py_39() -> None:
|
||||
@tool
|
||||
def magic_function(input: int | float) -> str: # noqa: FA102
|
||||
def magic_function(input: int | str) -> str: # noqa: FA102
|
||||
"""Compute a magic function."""
|
||||
|
||||
result = convert_to_openai_function(magic_function)
|
||||
assert result["parameters"]["properties"]["input"] == {
|
||||
"anyOf": [{"type": "integer"}, {"type": "number"}]
|
||||
"anyOf": [{"type": "integer"}, {"type": "string"}]
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user