MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / from_dict

Method from_dict

core/strategy_tracker.py:105–113  ·  view source on GitHub ↗
(cls, data: Dict)

Source from the content-addressed store, hash-verified

103
104 @classmethod
105 def from_dict(cls, data: Dict) -> "StrategyStats":
106 stats = cls(data["strategy"])
107 stats.total_attempts = data["total_attempts"]
108 stats.successes = data["successes"]
109 stats.failures = data["failures"]
110 stats.total_duration = data.get("total_duration", 0.0)
111 stats.last_used = data.get("last_used")
112 stats.error_breakdown = defaultdict(int, data.get("error_breakdown", {}))
113 return stats
114
115
116class StrategyTracker:

Callers 1

_load_trackerMethod · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected