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

Method get_path

codeclash/viewer/app.py:222–238  ·  view source on GitHub ↗

Get value from nested dictionary using dot notation path Args: path: Dot-separated path like "config.tournament.rounds" default: Default value if path doesn't exist Returns: Value at path or default

(self, path: str, default: Any = None)

Source from the content-addressed store, hash-verified

220 self._data = data or {}
221
222 def get_path(self, path: str, default: Any = None) -> Any:
223 """Get value from nested dictionary using dot notation path
224
225 Args:
226 path: Dot-separated path like "config.tournament.rounds"
227 default: Default value if path doesn't exist
228
229 Returns:
230 Value at path or default
231 """
232 current = self._data
233 for key in path.split("."):
234 if isinstance(current, dict) and key in current:
235 current = current[key]
236 else:
237 return default
238 return current
239
240 @property
241 def is_valid(self) -> bool:

Callers 8

total_roundsMethod · 0.95
completed_roundsMethod · 0.95
modelsMethod · 0.95
game_nameMethod · 0.95
players_configMethod · 0.95
round_statsMethod · 0.95
_load_game_metadataFunction · 0.80
guess_config_namesFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected