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

Method default_value_repr

traitlets/traitlets.py:3720–3725  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3718 return super().set(obj, value)
3719
3720 def default_value_repr(self) -> str:
3721 # Ensure default value is sorted for a reproducible build
3722 list_repr = repr(sorted(self.make_dynamic_default() or []))
3723 if list_repr == "[]":
3724 return "set()"
3725 return "{" + list_repr[1:-1] + "}"
3726
3727
3728class Tuple(Container[t.Tuple[t.Any, ...]]):

Callers 5

test_default_value_reprFunction · 0.45
class_get_trait_helpMethod · 0.45
class_config_sectionMethod · 0.45
class_config_rst_docMethod · 0.45
class_config_rst_docFunction · 0.45

Calls 1

make_dynamic_defaultMethod · 0.80

Tested by 1

test_default_value_reprFunction · 0.36