Projet

Général

Profil

0003-visualization-use-formatting-instead-of-unicode-3890.patch

Benjamin Dauvergne, 15 janvier 2020 23:43

Télécharger (1,81 ko)

Voir les différences:

Subject: [PATCH 3/3] visualization: use formatting instead of unicode()
 (#38908)

 bijoe/visualization/utils.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
bijoe/visualization/utils.py
248 248
                table[-1].append(_('Total'))
249 249
            for y in y_axis:
250 250
                table.append([y.label])
251
                table[-1].extend(unicode(grid[(x.id, y.id)]) for x in x_axis)
251
                table[-1].extend('%s' % (grid[(x.id, y.id)],) for x in x_axis)
252 252
                # line sums
253 253
                if compute_lines_sums:
254 254
                    table[-1].append(sums_lines[y.id])
......
263 263
            table.append([self.measure.label])
264 264
            for x in x_axis:
265 265
                table[0].append(x.label)
266
                table[1].append(unicode(grid[x.id])),
266
                table[1].append('%s' % (grid[x.id],)),
267 267
        elif self.drilldown_y:
268 268
            y_axis, grid = self.table_1d()
269 269
            table.append([self.drilldown_y.label, self.measure.label])
270 270
            for y in y_axis:
271 271
                table.append([
272 272
                    y.label,
273
                    unicode(grid[y.id]),
273
                    '%s' % (grid[y.id],),
274 274
                ])
275 275
        else:
276
            table.append([self.measure.label, unicode(self.data()[0].measures[0])])
276
            table.append([self.measure.label, '%s' % (self.data()[0].measures[0],)])
277 277

  
278 278
        for row in table:
279 279
            for cell in row:
280
-