(self, fields_tuple=(), row_tuple=(), min_width_tuple=None)
| 14 | |
| 15 | class Formatter: |
| 16 | def __init__(self, fields_tuple=(), row_tuple=(), min_width_tuple=None): |
| 17 | # Format to pass as first argument to the print function, e.g. '%s%s%s' |
| 18 | self.format = "" |
| 19 | # data_format will be of the form ['{!s:43}'],'{!s:39}','{!s:11}','{!s:25}'] |
| 20 | # the widths are determined from the data in order to print output with nice format |
| 21 | # Each entry of the data_format list will be used by the advanced string formatter: |
| 22 | # "{!s:43}".format("Text") |
| 23 | # Advanced string formatter as detailed in here: https://www.python.org/dev/peps/pep-3101/ |
| 24 | self.data_format = [] |
| 25 | Formatter._assert(fields_tuple, row_tuple, min_width_tuple) |
| 26 | self._build_format_tuples(fields_tuple, row_tuple, min_width_tuple) |
| 27 | |
| 28 | @staticmethod |
| 29 | def _assert(o1, o2, o3): |
nothing calls this directly
no test coverage detected