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

Method get

src/specify_cli/extensions/__init__.py:586–605  ·  view source on GitHub ↗

Get extension metadata from registry. Returns a deep copy to prevent callers from accidentally mutating nested internal registry state without going through the write path. Args: extension_id: Extension ID Returns: Deep copy of extension met

(self, extension_id: str)

Source from the content-addressed store, hash-verified

584 self._save()
585
586 def get(self, extension_id: str) -> Optional[dict]:
587 """Get extension metadata from registry.
588
589 Returns a deep copy to prevent callers from accidentally mutating
590 nested internal registry state without going through the write path.
591
592 Args:
593 extension_id: Extension ID
594
595 Returns:
596 Deep copy of extension metadata, or None if not found or corrupted
597 """
598 extensions = self.data.get("extensions")
599 if not isinstance(extensions, dict):
600 return None
601 entry = extensions.get(extension_id)
602 # Return None for missing or corrupted (non-dict) entries
603 if entry is None or not isinstance(entry, dict):
604 return None
605 return copy.deepcopy(entry)
606
607 def list(self) -> Dict[str, dict]:
608 """Get all installed extensions with valid metadata.

Calls

no outgoing calls