MCPcopy Index your code
hub / github.com/RustPython/RustPython / row

Method row

extra_tests/custom_text_test_runner.py:92–104  ·  view source on GitHub ↗
(self, data, separation_character=False)

Source from the content-addressed store, hash-verified

90 )
91
92 def row(self, data, separation_character=False):
93 if separation_character:
94 return self.fmt.format(
95 **{k: str(data.get(k, ""))[:w] for k, w in self.width.items()}
96 )
97 else:
98 data = {
99 k: str(data.get(k, ""))
100 if len(str(data.get(k, ""))) <= w
101 else "%s..." % str(data.get(k, ""))[: (w - 3)]
102 for k, w in self.width.items()
103 }
104 return self.fmt.format(**data)
105
106 def __call__(self, data_list, totals=None):
107 _r = self.row

Callers

nothing calls this directly

Calls 5

strFunction · 0.85
lenFunction · 0.85
formatMethod · 0.45
getMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected