MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / substitute

Method substitute

tools/api.py:647–653  ·  view source on GitHub ↗
(self, s: Union[string.Template, str], **kwargs)

Source from the content-addressed store, hash-verified

645 [m.generate_constructor(self.name) for m in self.constructors])
646
647 def substitute(self, s: Union[string.Template, str], **kwargs) -> str:
648 t = string.Template(s) if isinstance(s, str) else s
649 destroy = self.ctype + '_destroy'
650 return t.safe_substitute(name=self.name,
651 ctype=self.ctype,
652 destroy=destroy,
653 **kwargs)
654
655 def generate(self) -> str:
656 return self.substitute(

Callers 1

generateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected