We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59c6f3c commit b54a1b3Copy full SHA for b54a1b3
1 file changed
src/dirplot/render.py
@@ -289,7 +289,7 @@ def _draw_legend(
289
bb = draw.textbbox((0, 0), "Ag", font=font)
290
text_h = bb[3] - bb[1]
291
row_h = max(SWATCH_PX, text_h) + LEG_PAD
292
- rows_that_fit = max(1, (height_px - 2 * margin - LEG_PAD * 2 - row_h) // row_h)
+ rows_that_fit = max(1, int((height_px - 2 * margin - LEG_PAD * 2 - row_h) // row_h))
293
limit = min(max_rows, rows_that_fit)
294
295
ranked = sorted(ext_counts, key=lambda e: (-ext_counts[e], e))
0 commit comments