MCPcopy Create free account
hub / github.com/ipython/traitlets / from_string

Method from_string

traitlets/traitlets.py:3263–3267  ·  view source on GitHub ↗
(self, s: str)

Source from the content-addressed store, hash-verified

3261 return self._info(as_rst=True)
3262
3263 def from_string(self, s: str) -> G:
3264 try:
3265 return self.validate(None, s)
3266 except TraitError:
3267 return _safe_literal_eval(s) # type:ignore[no-any-return]
3268
3269 def subclass_init(self, cls: type[t.Any]) -> None:
3270 pass # fully opt out of instance_init

Callers

nothing calls this directly

Calls 2

validateMethod · 0.95
_safe_literal_evalFunction · 0.85

Tested by

no test coverage detected