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

Method from_string

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

Source from the content-addressed store, hash-verified

2773 return _validate_bounds(self, obj, value) # type:ignore[no-any-return]
2774
2775 def from_string(self, s: str) -> G:
2776 if self.allow_none and s == "None":
2777 return None # type:ignore[return-value]
2778 return float(s) # type:ignore[return-value]
2779
2780 def subclass_init(self, cls: type[t.Any]) -> None:
2781 pass # fully opt out of instance_init

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected