Returns a description of the trait.
(self, as_rst: bool = False)
| 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) |
no test coverage detected