From 1446a25b30cd3b144c917fc68570de0d287d9ccc Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 2 Jul 2024 16:26:21 +0100 Subject: [PATCH] Nit: Add a sort to the JSON schema generation for test consistency --- tests/utils/test_chat_template_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/utils/test_chat_template_utils.py b/tests/utils/test_chat_template_utils.py index cff31c1f8a3483..1816ddd9512693 100644 --- a/tests/utils/test_chat_template_utils.py +++ b/tests/utils/test_chat_template_utils.py @@ -137,7 +137,7 @@ def fn(x: List[List[Union[str, int]]]): "properties": { "x": { "type": "array", - "items": {"type": "array", "items": {"type": ["string", "integer"]}}, + "items": {"type": "array", "items": {"type": ["integer", "string"]}}, "description": "The input", } }, @@ -455,13 +455,13 @@ def fn( }, "y": { "type": "array", - "items": {"type": ["string", "integer"]}, + "items": {"type": ["integer", "string"]}, "nullable": True, "description": "The second input. It's a big list with a single-line description.", }, "z": { "type": "array", - "prefixItems": [{"type": ["string", "integer"]}, {"type": "string"}], + "prefixItems": [{"type": ["integer", "string"]}, {"type": "string"}], "description": "The third input. It's some kind of tuple with a default arg.", }, },