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

Method _info

traitlets/traitlets.py:4301–4304  ·  view source on GitHub ↗

Returns a description of the trait.

(self, as_rst: bool = False)

Source from the content-addressed store, hash-verified

4299 return repr(list(choices)) # Listify because py3.4- prints odict-class
4300
4301 def _info(self, as_rst: bool = False) -> str:
4302 """Returns a description of the trait."""
4303 none = " or %s" % ("`None`" if as_rst else "None") if self.allow_none else ""
4304 return f"any of {self._choices_str(as_rst)}{none}"
4305
4306 def info(self) -> str:
4307 return self._info(as_rst=False)

Callers 2

infoMethod · 0.95
info_rstMethod · 0.95

Calls 1

_choices_strMethod · 0.95

Tested by

no test coverage detected