Skip to content

Commit 772cfcb

Browse files
committed
bump deps
1 parent 1122584 commit 772cfcb

File tree

3 files changed

+243
-262
lines changed

3 files changed

+243
-262
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ fail_fast: true
22

33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.6.0
5+
rev: v5.0.0
66
hooks:
77
- id: check-added-large-files
88
- id: check-case-conflict
@@ -19,7 +19,7 @@ repos:
1919
^.*.md$
2020
2121
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: v0.6.2
22+
rev: v0.7.0
2323
hooks:
2424
- id: ruff-format
2525
- id: ruff

src/cogs/images/ocr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,10 +433,10 @@ def _draw_trocr(src: PilImage.Image, fields: Sequence[TextField]) -> BytesIO:
433433
for field in fields:
434434
# TODO: figure out how to fit text into boxes with Pillow without creating
435435
# extra images
436-
font = FONT.font_variant(size=field.font_size) # type: ignore[no-untyped-call]
436+
font = FONT.font_variant(size=field.font_size)
437437

438438
left, top, right, bottom = font.getbbox(field.text, stroke_width=field.stroke_width)
439-
text_im = PilImage.new("RGBA", size=(right - left, bottom - top))
439+
text_im = PilImage.new("RGBA", size=(int(right - left), int(bottom - top)))
440440

441441
ImageDraw.Draw(text_im).text(
442442
(0, 0),

0 commit comments

Comments
 (0)