Skip to content

Convert table column contents to string #48

Open

Description

@flokli

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)?

Activity

  1. changed the title [-]Convert column contents to string[/-] [+]Convert table column contents to string[/+] on Sep 29, 2016
  2. added this to the Future milestone on Jul 7, 2023
  3. modified the milestones: Future, 3.0 on Nov 28, 2024
  4. added
    bugSomething isn't working as expected
    on Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as expectedrequires confirmationA possible bug that need to be confirmed

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions