Show all selected stats with section, full name, nick, and prio
(self, ostr: TextIO = sys.stdout)
| 413 | return |
| 414 | |
| 415 | def list(self, ostr: TextIO = sys.stdout) -> None: |
| 416 | """ |
| 417 | Show all selected stats with section, full name, nick, and prio |
| 418 | """ |
| 419 | table = PrettyTable(('section', 'name', 'nick', 'prio')) |
| 420 | table.align['section'] = 'l' |
| 421 | table.align['name'] = 'l' |
| 422 | table.align['nick'] = 'l' |
| 423 | table.align['prio'] = 'r' |
| 424 | self._load_schema() |
| 425 | assert self._stats is not None |
| 426 | assert self._schema is not None |
| 427 | for section_name, section_stats in self._stats.items(): |
| 428 | for name, nick in section_stats.items(): |
| 429 | prio = self._schema[section_name][name].get('priority') or 0 |
| 430 | table.add_row((section_name, name, nick, prio)) |
| 431 | ostr.write(table.get_string(hrules=HEADER) + '\n') |
nothing calls this directly
no test coverage detected