MCPcopy Index your code
hub / github.com/nodejs/node / compare_params_list

Function compare_params_list

deps/inspector_protocol/check_protocol_compatibility.py:124–138  ·  view source on GitHub ↗
(context, kind, params_1, params_2, types_map_1, types_map_2, depth, errors, reverse)

Source from the content-addressed store, hash-verified

122
123
124def compare_params_list(context, kind, params_1, params_2, types_map_1, types_map_2, depth, errors, reverse):
125 for name in params_1:
126 param_1 = params_1[name]
127 if name not in params_2:
128 if "optional" not in param_1:
129 errors.append("%s.%s: required %s has been %s" % (context, name, kind, removed(reverse)))
130 continue
131
132 param_2 = params_2[name]
133 if param_2 and "optional" in param_2 and "optional" not in param_1:
134 errors.append("%s.%s: %s %s is now %s" % (context, name, required(reverse), kind, required(not reverse)))
135 continue
136 type_1 = extract_type(param_1, types_map_1, errors)
137 type_2 = extract_type(param_2, types_map_2, errors)
138 compare_types(context + "." + name, kind, type_1, type_2, types_map_1, types_map_2, depth, errors, reverse)
139
140
141def compare_types(context, kind, type_1, type_2, types_map_1, types_map_2, depth, errors, reverse):

Callers 3

compare_commandsFunction · 0.70
compare_eventsFunction · 0.70
compare_typesFunction · 0.70

Calls 5

removedFunction · 0.70
requiredFunction · 0.70
extract_typeFunction · 0.70
compare_typesFunction · 0.70
appendMethod · 0.45

Tested by

no test coverage detected