@@ -133,8 +133,8 @@ def check_defn_name_str(name: str, info: QAPISourceInfo, meta: str) -> None:
def check_keys(value: _JSObject,
info: QAPISourceInfo,
source: str,
- required: List[str],
- optional: List[str]) -> None:
+ required: Iterable[str] = (),
+ optional: Iterable[str] = ()) -> None:
"""
Ensures an object has a specific set of keys. [Const]
@@ -155,7 +155,7 @@ def pprint(elems: Iterable[str]) -> str:
"%s misses key%s %s"
% (source, 's' if len(missing) > 1 else '',
pprint(missing)))
- allowed = set(required + optional)
+ allowed = set(required) | set(optional)
unknown = set(value) - allowed
if unknown:
raise QAPISemError(