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

Method from_string

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

Source from the content-addressed store, hash-verified

2655 return _validate_bounds(self, obj, value) # type:ignore[no-any-return]
2656
2657 def from_string(self, s: str) -> G:
2658 if self.allow_none and s == "None":
2659 return None # type:ignore[return-value]
2660 return int(s) # type:ignore[return-value]
2661
2662 def subclass_init(self, cls: type[t.Any]) -> None:
2663 pass # fully opt out of instance_init

Callers 7

test_basicMethod · 0.45
from_stringMethod · 0.45
item_from_stringMethod · 0.45
item_from_stringMethod · 0.45
item_from_stringMethod · 0.45
get_valueMethod · 0.45
_exec_config_strMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_basicMethod · 0.36