cleo icon indicating copy to clipboard operation
cleo copied to clipboard

Convert table column contents to string

Open flokli opened this issue 9 years ago • 0 comments

When adding columns with None or more complex contents (pendulum, money objects), they should automatically be converted using str(…), as this currently breaks in weird ways:

~/.virtualenvs/buchhaltung/lib/python3.5/site-packages/cleo/helpers/table.py in _build_table_rows() at line 301
   if '\n' not in cell:
[TypeError]                                  
  argument of type 'NoneType' is not iterable

Another possibility might be to specify custom formatters (probably somewhere next to defining table headers)?

flokli avatar Sep 29 '16 15:09 flokli