MCPcopy Index your code
hub / github.com/github/spec-kit / list

Method list

src/specify_cli/presets/__init__.py:464–481  ·  view source on GitHub ↗

Get all installed presets with valid metadata. Returns a deep copy of presets with dict metadata only. Corrupted entries (non-dict values) are filtered out. Returns: Dictionary of pack_id -> metadata (deep copies), empty dict if corrupted

(self)

Source from the content-addressed store, hash-verified

462 return copy.deepcopy(entry)
463
464 def list(self) -> Dict[str, dict]:
465 """Get all installed presets with valid metadata.
466
467 Returns a deep copy of presets with dict metadata only.
468 Corrupted entries (non-dict values) are filtered out.
469
470 Returns:
471 Dictionary of pack_id -> metadata (deep copies), empty dict if corrupted
472 """
473 packs = self.data.get("presets", {}) or {}
474 if not isinstance(packs, dict):
475 return {}
476 # Filter to only valid dict entries to match type contract
477 return {
478 pack_id: copy.deepcopy(meta)
479 for pack_id, meta in packs.items()
480 if isinstance(meta, dict)
481 }
482
483 def keys(self) -> set:
484 """Get all preset IDs including corrupted entries.

Calls 1

getMethod · 0.45