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

Method _info

traitlets/traitlets.py:3346–3351  ·  view source on GitHub ↗

Returns a description of the trait.

(self, as_rst: bool = False)

Source from the content-addressed store, hash-verified

3344 self.error(obj, value)
3345
3346 def _info(self, as_rst: bool = False) -> str:
3347 """Returns a description of the trait."""
3348 none = " or %s" % ("`None`" if as_rst else "None") if self.allow_none else ""
3349 case = "sensitive" if self.case_sensitive else "insensitive"
3350 substr = "substring" if self.substring_matching else "prefix"
3351 return f"any case-{case} {substr} of {self._choices_str(as_rst)}{none}"
3352
3353 def info(self) -> str:
3354 return self._info(as_rst=False)

Callers 2

infoMethod · 0.95
info_rstMethod · 0.95

Calls 1

_choices_strMethod · 0.45

Tested by

no test coverage detected