Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@deprecated("1.0.0", "1.2.0", BTColumnCollection.padding_left.fget)
def left_padding_widths(self): # pragma: no cover
return self.columns.padding_left
@deprecated("1.0.0", "1.2.0", BTColumnCollection.padding.fget)
def set_padding_widths(self, pad_width): # pragma: no cover
self.columns.padding_left = pad_width
self.columns.padding_right = pad_width
BTColumnCollection.__getitem__,
details="Use 'BeautifulTable.{columns|rows}[key]' instead.",
)
def __getitem__(self, key): # pragma: no cover
if isinstance(key, basestring):
return self.columns[key]
return self.rows[key]
@deprecated("1.0.0", "1.2.0", BTColumnCollection.default_padding.fget)
def default_padding(self): # pragma: no cover
return self.columns.default_padding
@deprecated("1.0.0", "1.2.0", BTColumnCollection.width.fget)
def column_widths(self): # pragma: no cover
return self.columns.width
BTColumnCollection.__contains__,
details="Use ''value' in BeautifulTable.{columns|rows}' instead.",
)
def __contains__(self, key): # pragma: no cover
if isinstance(key, basestring):
return key in self.columns
elif isinstance(key, Iterable):
return key in self.rows
else:
raise TypeError(
("'key' must be str or Iterable, " "not {}").format(
type(key).__name__
)
@deprecated("1.0.0", "1.2.0", BTColumnCollection.default_alignment.fget)
def default_alignment(self): # pragma: no cover
return self.columns.default_alignment
if kwargs["sign_mode"] is not None:
sign = kwargs["sign_mode"]
self.precision = precision
self._serialno = serialno
self._serialno_header = serialno_header
self.detect_numerics = detect_numerics
self._sign = sign
self.maxwidth = maxwidth
self._ncol = 0
self._data = BTTableData(self)
self.rows = BTRowCollection(self)
self.columns = BTColumnCollection(
self, default_alignment, default_padding
)
self._header_separator = ""
self._header_junction = ""
self._column_separator = ""
self._row_separator = ""
self.border = ""
self.set_style(enums.STYLE_DEFAULT)
@deprecated("1.0.0", "1.2.0", BTColumnCollection.header.fget)
def column_headers(self): # pragma: no cover
return self.columns.header