MCPcopy Create free account
hub / github.com/apache/storm / __init__

Method __init__

dev-tools/report/formatter.py:16–26  ·  view source on GitHub ↗
(self, fields_tuple=(), row_tuple=(), min_width_tuple=None)

Source from the content-addressed store, hash-verified

14
15class 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):

Callers

nothing calls this directly

Calls 2

_build_format_tuplesMethod · 0.95
_assertMethod · 0.80

Tested by

no test coverage detected