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

Method from_string

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

Source from the content-addressed store, hash-verified

2474 return Union([*self.trait_types, other])
2475
2476 def from_string(self, s: str) -> t.Any:
2477 for trait_type in self.trait_types:
2478 try:
2479 v = trait_type.from_string(s)
2480 return trait_type.validate(None, v)
2481 except (TraitError, ValueError):
2482 continue
2483 return super().from_string(s)
2484
2485
2486# -----------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 2

from_stringMethod · 0.45
validateMethod · 0.45

Tested by

no test coverage detected