MCPcopy Create free account
hub / github.com/TabViewer/tabview / _get_column_widths_mode

Method _get_column_widths_mode

tabview/tabview.py:972–981  ·  view source on GitHub ↗

Given a list of lists, return a list of the variable column width for each column using the arithmetic mode. Args: d - list of lists with x columns Returns: list of ints [len_1, len_2...len_x]

(self, d)

Source from the content-addressed store, hash-verified

970 return max(max(1, self.column_gap), max_len)
971
972 def _get_column_widths_mode(self, d):
973 """Given a list of lists, return a list of the variable column width
974 for each column using the arithmetic mode.
975
976 Args: d - list of lists with x columns
977 Returns: list of ints [len_1, len_2...len_x]
978
979 """
980 d = zip(*d)
981 return [self._mode_len(i) for i in d]
982
983 def _get_column_widths_max(self, d):
984 """Given a list of lists, return a list of the variable column width

Callers 1

_get_column_widthsMethod · 0.95

Calls 1

_mode_lenMethod · 0.95

Tested by

no test coverage detected