From 90ebf74f68b01cc2bed01f12c55e142779340158 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 25 Feb 2026 17:41:37 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Auto=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test_file/test_nullable_and_defaults.py | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/tests/test_request_params/test_file/test_nullable_and_defaults.py b/tests/test_request_params/test_file/test_nullable_and_defaults.py index 7be333de2..4134fae1a 100644 --- a/tests/test_request_params/test_file/test_nullable_and_defaults.py +++ b/tests/test_request_params/test_file/test_nullable_and_defaults.py @@ -76,14 +76,23 @@ def test_nullable_required_schema(path: str): "properties": { "file": { "title": "File", - "anyOf": [{"type": "string", "contentMediaType": "application/octet-stream"}, {"type": "null"}], + "anyOf": [ + { + "type": "string", + "contentMediaType": "application/octet-stream", + }, + {"type": "null"}, + ], }, "files": { "title": "Files", "anyOf": [ { "type": "array", - "items": {"type": "string", "contentMediaType": "application/octet-stream"}, + "items": { + "type": "string", + "contentMediaType": "application/octet-stream", + }, }, {"type": "null"}, ], @@ -255,7 +264,13 @@ def test_nullable_non_required_schema(path: str): "properties": { "file": { "title": "File", - "anyOf": [{"type": "string", "contentMediaType": "application/octet-stream"}, {"type": "null"}], + "anyOf": [ + { + "type": "string", + "contentMediaType": "application/octet-stream", + }, + {"type": "null"}, + ], # "default": None, # `None` values are omitted in OpenAPI schema }, "files": { @@ -263,7 +278,10 @@ def test_nullable_non_required_schema(path: str): "anyOf": [ { "type": "array", - "items": {"type": "string", "contentMediaType": "application/octet-stream"}, + "items": { + "type": "string", + "contentMediaType": "application/octet-stream", + }, }, {"type": "null"}, ], @@ -399,7 +417,10 @@ def test_nullable_with_non_null_default_schema(path: str): "file": { "title": "File", "anyOf": [ - {"type": "string", "contentMediaType": "application/octet-stream"}, + { + "type": "string", + "contentMediaType": "application/octet-stream", + }, {"type": "null"}, ], "default": "default", # <= Default value here looks strange to me @@ -409,7 +430,10 @@ def test_nullable_with_non_null_default_schema(path: str): "anyOf": [ { "type": "array", - "items": {"type": "string", "contentMediaType": "application/octet-stream"}, + "items": { + "type": "string", + "contentMediaType": "application/octet-stream", + }, }, {"type": "null"}, ],