Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
else:
self._column_widths = [
(width - self._num_borders * border_width) // layout[1]
for _ in range(layout[1])
]
for k in range((width - self._num_borders * border_width) % layout[1]):
self._column_widths[k] += 1
else:
assert (
width is None
), "At most one of `width` and `column_widths` can be specified."
assert len(column_widths) == layout[1]
self._column_widths = column_widths
self._subfigures = [
[Figure(self._column_widths[j], padding=padding) for j in range(layout[1])]
for _ in range(layout[0])
]
return
def figure(*args, **kwargs):
return Figure(*args, **kwargs)