MCPcopy Create free account
hub / github.com/astanin/python-tabulate / _build_line

Function _build_line

tabulate/__init__.py:2623–2632  ·  view source on GitHub ↗

Return a string which represents a horizontal line.

(colwidths, colaligns, linefmt)

Source from the content-addressed store, hash-verified

2621
2622
2623def _build_line(colwidths, colaligns, linefmt):
2624 "Return a string which represents a horizontal line."
2625 if not linefmt:
2626 return None
2627 if callable(linefmt):
2628 return linefmt(colwidths, colaligns)
2629 else:
2630 begin, fill, sep, end = linefmt
2631 cells = [fill * w for w in colwidths]
2632 return _build_simple_row(cells, (begin, sep, end))
2633
2634
2635def _append_line(lines, colwidths, colaligns, linefmt):

Callers 1

_append_lineFunction · 0.85

Calls 1

_build_simple_rowFunction · 0.85

Tested by

no test coverage detected