MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / snapshotVersionMatchesPython

Function snapshotVersionMatchesPython

skills/persistence.go:421–439  ·  view source on GitHub ↗
(value any)

Source from the content-addressed store, hash-verified

419}
420
421func snapshotVersionMatchesPython(value any) bool {
422 switch v := value.(type) {
423 case int:
424 return v == SkillRecoverySnapshotVersion
425 case int64:
426 return v == SkillRecoverySnapshotVersion
427 case float64:
428 return v == SkillRecoverySnapshotVersion
429 case float32:
430 return v == SkillRecoverySnapshotVersion
431 case bool:
432 if v {
433 return SkillRecoverySnapshotVersion == 1
434 }
435 return SkillRecoverySnapshotVersion == 0
436 default:
437 return false
438 }
439}
440
441func floatFromSnapshot(value any) (float64, bool) {
442 if !snapshotTruthy(value) {

Callers 1

ImportSnapshotMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected