| 1680 | return "" |
| 1681 | |
| 1682 | def _do_summary(self): |
| 1683 | # type: () -> Tuple[int, str, List[Any]] |
| 1684 | found, s, needed = self.payload._do_summary() |
| 1685 | ret = "" |
| 1686 | if not found or self.__class__ in needed: |
| 1687 | ret = self.mysummary() |
| 1688 | if isinstance(ret, tuple): |
| 1689 | ret, n = ret |
| 1690 | needed += n |
| 1691 | if ret or needed: |
| 1692 | found = 1 |
| 1693 | if not ret: |
| 1694 | ret = self.__class__.__name__ if self.show_summary else "" |
| 1695 | if self.__class__ in conf.emph: |
| 1696 | impf = [] |
| 1697 | for f in self.fields_desc: |
| 1698 | if f in conf.emph: |
| 1699 | impf.append("%s=%s" % (f.name, f.i2repr(self, self.getfieldval(f.name)))) # noqa: E501 |
| 1700 | ret = "%s [%s]" % (ret, " ".join(impf)) |
| 1701 | if ret and s: |
| 1702 | ret = "%s / %s" % (ret, s) |
| 1703 | else: |
| 1704 | ret = "%s%s" % (ret, s) |
| 1705 | return found, ret, needed |
| 1706 | |
| 1707 | def summary(self, intern=0): |
| 1708 | # type: (int) -> str |