MCPcopy Index your code
hub / github.com/SkyworkAI/DeepResearchAgent / is_same_method

Function is_same_method

src/utils/utils.py:235–247  ·  view source on GitHub ↗

Compare two methods by their source code.

(method1, method2)

Source from the content-addressed store, hash-verified

233
234
235def is_same_method(method1, method2):
236 """Compare two methods by their source code."""
237 try:
238 source1 = get_method_source(method1)
239 source2 = get_method_source(method2)
240
241 # Remove method decorators if any
242 source1 = "\n".join(line for line in source1.split("\n") if not line.strip().startswith("@"))
243 source2 = "\n".join(line for line in source2.split("\n") if not line.strip().startswith("@"))
244
245 return source1 == source2
246 except (TypeError, OSError):
247 return False
248
249
250def is_same_item(item1, item2):

Callers 1

is_same_itemFunction · 0.85

Calls 2

get_method_sourceFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected