Skip to content

Commit 73331f2

Browse files
committed
Use anyOf
1 parent 6531b6b commit 73331f2

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

tljh/config_schema.py

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,23 +79,16 @@
7979
"description": "User CPU and memory limits.",
8080
"type": "object",
8181
"additionalProperties": False,
82-
"properties": {"memory": {"type": "string"}, "cpu": {
83-
"oneOf": [
84-
{
85-
"type": "integer",
86-
"minimum": 0
87-
},
88-
{
89-
"type": "number",
90-
"minimum": 0
82+
"properties": {
83+
"memory": {"type": "string"},
84+
"cpu": {
85+
"anyOf": [
86+
{"type": "integer", "minimum": 0},
87+
{"type": "number", "minimum": 0},
88+
{"type": "string", "enum": ["None"]},
89+
]
9190
},
92-
{
93-
"type": "string",
94-
"enum": ["None"]
95-
}
96-
]
97-
}
98-
},
91+
},
9992
},
10093
"UserEnvironment": {
10194
"type": "object",

0 commit comments

Comments
 (0)