Skip to content

Commit 4048000

Browse files
style: Apply Ruff formatting to test_schema_helpers.py
Co-Authored-By: unknown <>
1 parent 5f1d743 commit 4048000

File tree

1 file changed

+9
-28
lines changed

1 file changed

+9
-28
lines changed

unit_tests/sources/utils/test_schema_helpers.py

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -215,48 +215,29 @@ def test_internal_config(limit, record_count, expected):
215215
def test_expand_refs_handles_circular_references():
216216
schema = {
217217
"definitions": {
218-
"A": {
219-
"type": "object",
220-
"properties": {
221-
"b": {"$ref": "#/definitions/B"}
222-
}
223-
},
224-
"B": {
225-
"type": "object",
226-
"properties": {
227-
"a": {"$ref": "#/definitions/A"}
228-
}
229-
}
218+
"A": {"type": "object", "properties": {"b": {"$ref": "#/definitions/B"}}},
219+
"B": {"type": "object", "properties": {"a": {"$ref": "#/definitions/A"}}},
230220
},
231221
"type": "object",
232-
"properties": {
233-
"root": {"$ref": "#/definitions/A"}
234-
}
222+
"properties": {"root": {"$ref": "#/definitions/A"}},
235223
}
236-
224+
237225
expand_refs(schema)
238-
226+
239227
assert "root" in schema["properties"]
240228
assert schema["properties"]["root"]["type"] == "object"
241229
assert "definitions" not in schema
242230

243231

244232
def test_expand_refs_expands_simple_refs():
245233
schema = {
246-
"definitions": {
247-
"StringType": {
248-
"type": "string",
249-
"minLength": 1
250-
}
251-
},
234+
"definitions": {"StringType": {"type": "string", "minLength": 1}},
252235
"type": "object",
253-
"properties": {
254-
"name": {"$ref": "#/definitions/StringType"}
255-
}
236+
"properties": {"name": {"$ref": "#/definitions/StringType"}},
256237
}
257-
238+
258239
expand_refs(schema)
259-
240+
260241
assert schema["properties"]["name"]["type"] == "string"
261242
assert schema["properties"]["name"]["minLength"] == 1
262243
assert "definitions" not in schema

0 commit comments

Comments
 (0)