mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
Fix CSV reader adding empty lists in rendering summary (#3430)
* Fix CSV reader adding empty files Fixes issue #3311 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
b7a8a2d4d8
commit
5d73525836
1 changed files with 3 additions and 0 deletions
|
|
@ -343,6 +343,9 @@ def _log_rendering_times(*args):
|
|||
|
||||
print("\nRendering Summary\n-----------------\n")
|
||||
|
||||
# filter out empty lists caused by csv reader
|
||||
data = [row for row in data if row]
|
||||
|
||||
max_file_length = max(len(row[0]) for row in data)
|
||||
for key, group in it.groupby(data, key=lambda row: row[0]):
|
||||
key = key.ljust(max_file_length + 1, ".")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue