Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps-dev): Bump types-openpyxl from 3.1.5.20241114 to 3.1.5.20241126 #623

Merged
merged 2 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions suisa_sendemeldung/suisa_sendemeldung.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from dateutil.relativedelta import relativedelta
from iso3901 import ISRC
from openpyxl import Workbook
from openpyxl.cell.cell import Cell, MergedCell
from openpyxl.styles import Border, Font, PatternFill, Side
from tqdm import tqdm

Expand Down Expand Up @@ -693,9 +694,10 @@ def get_xlsx(data: Any, args: ArgparseNamespace) -> BytesIO: # noqa: ANN401

# Try to approximate the required width by finding the longest values per column
dims: dict[str, int] = {}
for row in worksheet.rows: # type: ignore[assignment]
for cell in row: # type: ignore[assignment]
if cell.value:
calc_row: tuple[Cell | MergedCell, ...]
for calc_row in worksheet.rows:
for cell in calc_row:
if isinstance(cell, Cell) and cell.value:
dims[cell.column_letter] = max(
(dims.get(cell.column_letter, 0), len(str(cell.value))),
)
Expand Down
Loading