MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / get_path_from_dict

Method get_path_from_dict

codeclash/viewer/app.py:307–315  ·  view source on GitHub ↗

Static method to get value from any dictionary using dot notation

(data: dict[str, Any], path: str, default: Any = None)

Source from the content-addressed store, hash-verified

305
306 @staticmethod
307 def get_path_from_dict(data: dict[str, Any], path: str, default: Any = None) -> Any:
308 """Static method to get value from any dictionary using dot notation"""
309 current = data
310 for key in path.split("."):
311 if isinstance(current, dict) and key in current:
312 current = current[key]
313 else:
314 return default
315 return current
316
317
318# Global variable to store the directory to search for logs

Callers 1

modelsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected