Lines Matching refs:source
47 from .source import QAPISourceInfo
58 source: str) -> None:
65 raise QAPISemError(info, "%s requires a string name" % source)
68 def check_name_str(name: str, info: QAPISourceInfo, source: str) -> str:
90 raise QAPISemError(info, "%s has an invalid name" % source)
94 def check_name_upper(name: str, info: QAPISourceInfo, source: str) -> None:
108 stem = check_name_str(name, info, source)
111 info, "name of %s must not use lowercase or '-'" % source)
114 def check_name_lower(name: str, info: QAPISourceInfo, source: str,
132 stem = check_name_str(name, info, source)
136 info, "name of %s must not use uppercase or '_'" % source)
139 def check_name_camel(name: str, info: QAPISourceInfo, source: str) -> None:
152 stem = check_name_str(name, info, source)
154 raise QAPISemError(info, "name of %s must use CamelCase" % source)
188 source: str,
211 % (source, 's' if len(missing) > 1 else '',
219 % (source, 's' if len(unknown) > 1 else '',
251 info: QAPISourceInfo, source: str) -> None:
273 % (cond, source))
279 "'if' condition of %s must be a string or an object" % source)
280 check_keys(cond, info, "'if' condition of %s" % source, [],
285 "'if' condition of %s has conflicting keys" % source)
299 % (operator, source))
302 info, "'if' condition [] of %s is useless" % source)
337 info: QAPISourceInfo, source: str) -> None:
339 raise QAPISemError(info, "%s should be a type name" % source)
343 info: QAPISourceInfo, source: str) -> None:
349 "%s should be a type name or array" % source)
354 source)
358 info: QAPISourceInfo, source: str,
382 "%s should be an object or type name" % source)
387 key_source = "%s member '%s'" % (source, key)
402 info: QAPISourceInfo, source: str,
407 check_type_implicit(value, info, source, parent_name)
435 source = "'features' member"
437 check_keys(feat, info, source, ['name'], ['if'])
438 check_name_is_str(feat['name'], info, source)
439 source = "%s '%s'" % (source, feat['name'])
440 check_name_lower(feat['name'], info, source)
441 check_if(feat, info, source)
468 source = "'data' member"
469 check_keys(member, info, source, ['name'], ['if', 'features'])
471 check_name_is_str(member_name, info, source)
472 source = "%s '%s'" % (source, member_name)
476 check_name_lower(member_name, info, source,
479 check_if(member, info, source)
521 source = "'data' member '%s'" % key
522 check_keys(value, info, source, ['type'], ['if'])
523 check_if(value, info, source)
524 check_type_name(value['type'], info, source)
546 source = "'data' member '%s'" % key
547 check_name_lower(key, info, source)
548 check_keys(value, info, source, ['type'], ['if'])
549 check_if(value, info, source)
550 check_type_name_or_array(value['type'], info, source)