Skip to content

Commit

Permalink
chore(deps-dev): Bump types-openpyxl from 3.1.5.20241114 to 3.1.5.202…
Browse files Browse the repository at this point in the history
…41126 (#623)

* chore(deps-dev): Bump types-openpyxl

Bumps [types-openpyxl](https://github.com/python/typeshed) from 3.1.5.20241114 to 3.1.5.20241126.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-openpyxl
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: type safety

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lucas <[email protected]>
  • Loading branch information
dependabot[bot] and hairmare authored Dec 8, 2024
1 parent 68529cb commit 810d1bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
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

0 comments on commit 810d1bf

Please sign in to comment.