(self)
| 346 | |
| 347 | class CommandsList(List[Callable[..., Any]]): |
| 348 | def __repr__(self): |
| 349 | # type: () -> str |
| 350 | s = [] |
| 351 | for li in sorted(self, key=lambda x: x.__name__): |
| 352 | doc = li.__doc__ if li.__doc__ else "--" |
| 353 | doc = doc.lstrip().split('\n', 1)[0] |
| 354 | s.append("%-22s: %s" % (li.__name__, doc)) |
| 355 | return "\n".join(s) |
| 356 | |
| 357 | def register(self, cmd): |
| 358 | # type: (DecoratorCallable) -> DecoratorCallable |