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

Method _init_double_width

tabview/tabview.py:128–140  ·  view source on GitHub ↗

Initialize self._cell_len to determine if double width characters are taken into account when calculating cell widths.

(self, dw)

Source from the content-addressed store, hash-verified

126 return False
127
128 def _init_double_width(self, dw):
129 """Initialize self._cell_len to determine if double width characters
130 are taken into account when calculating cell widths.
131
132 """
133 self.double_width = dw
134 # Enable double with character processing for small files
135 if self.double_width is False:
136 self.double_width = len(self.data) * self.num_data_columns < 65000
137 if self.double_width is True:
138 self._cell_len = self.__cell_len_dw
139 else:
140 self._cell_len = len
141
142 def _init_column_widths(self, cw, cws):
143 """Initialize column widths

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected