(cls, fmt, data, extra)
| 1284 | |
| 1285 | @classmethod |
| 1286 | def _format_data(cls, fmt, data, extra): |
| 1287 | if fmt in ('line', 'brief'): |
| 1288 | yield repr(data) |
| 1289 | elif fmt == 'full': |
| 1290 | for enumerator in data: |
| 1291 | yield f'{enumerator}' |
| 1292 | elif fmt == 'row': |
| 1293 | # XXX This won't work with CSV... |
| 1294 | yield ','.join(data) |
| 1295 | else: |
| 1296 | raise NotImplementedError(fmt) |
| 1297 | |
| 1298 | @classmethod |
| 1299 | def _unformat_data(cls, datastr, fmt=None): |
no test coverage detected