Convert table column contents to string

Offen
#48 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

@hiyouwhatsapp arbeitet bereits daran.

Seit 18.10.2026.

  • #548 von @hiyouwhatsapp — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
cli

Rechercherichtung

Start in cleo/helpers/table.py, specifically _build_table_rows() around the reported line, and reproduce the failure with None or an object such as pendulum or a money value. The work is done when table cells containing these values render through string conversion without the TypeError; the custom-formatter alternative remains an unresolved scope question.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug requires confirmation

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

Vorherrschende Sprache
Python
Sterne
1.4k
Forks
108
Ø Merge
15 Min.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus python-poetry/cleo

Alle Issues in python-poetry/cleo

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.