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

Function compare_commands

deps/inspector_protocol/check_protocol_compatibility.py:104–114  ·  view source on GitHub ↗
(domain_name, command_1, command_2, types_map_1, types_map_2, errors, reverse)

Source from the content-addressed store, hash-verified

102
103
104def compare_commands(domain_name, command_1, command_2, types_map_1, types_map_2, errors, reverse):
105 context = domain_name + "." + command_1["name"]
106
107 params_1 = named_list_to_map(command_1, "parameters", "name")
108 params_2 = named_list_to_map(command_2, "parameters", "name")
109 # Note the reversed order: we allow removing but forbid adding parameters.
110 compare_params_list(context, "parameter", params_2, params_1, types_map_2, types_map_1, 0, errors, not reverse)
111
112 returns_1 = named_list_to_map(command_1, "returns", "name")
113 returns_2 = named_list_to_map(command_2, "returns", "name")
114 compare_params_list(context, "response parameter", returns_1, returns_2, types_map_1, types_map_2, 0, errors, reverse)
115
116
117def compare_events(domain_name, event_1, event_2, types_map_1, types_map_2, errors, reverse):

Callers 1

compare_domainsFunction · 0.70

Calls 2

named_list_to_mapFunction · 0.70
compare_params_listFunction · 0.70

Tested by

no test coverage detected