Skip to content

Commit 937764a

Browse files
authored
Merge pull request #104 from labelle-org/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 40e7772 + 493ffb1 commit 937764a

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
args: ['--fix=lf']
2121

2222
- repo: https://github.com/astral-sh/ruff-pre-commit
23-
rev: v0.9.4
23+
rev: v0.11.2
2424
hooks:
2525
- id: ruff
2626
args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix]
@@ -32,7 +32,7 @@ repos:
3232
- id: check-json5
3333

3434
- repo: https://github.com/pre-commit/mirrors-mypy
35-
rev: v1.14.1
35+
rev: v1.15.0
3636
hooks:
3737
- id: mypy
3838
additional_dependencies:

src/labelle/lib/devices/dymo_labeler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def print(
323323
stream: bytes = rotated_bitmap.tobytes()
324324

325325
# Regather the bytes into rows
326-
stream_row_length = int(math.ceil(bitmap.height / 8))
326+
stream_row_length = math.ceil(bitmap.height / 8)
327327
if len(stream) // stream_row_length != bitmap.width:
328328
raise RuntimeError(
329329
"An internal problem was encountered while processing the label bitmap!"

src/labelle/lib/render_engines/picture.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def render(self, context: RenderContext) -> Image.Image:
3939
with Image.open(self.picture_path) as img:
4040
if img.height > height_px:
4141
ratio = height_px / img.height
42-
img = img.resize((int(math.ceil(img.width * ratio)), height_px))
42+
img = img.resize((math.ceil(img.width * ratio), height_px))
4343

4444
img = img.convert("L", palette=Image.AFFINE)
4545
return ImageOps.invert(img).convert("1")

src/labelle/lib/render_engines/text.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __init__(
3636
def render(self, context: RenderContext) -> Image.Image:
3737
height_px = context.height_px
3838
line_height = float(height_px) / len(self.text_lines)
39-
font_size_px = int(round(line_height * self.font_size_ratio))
39+
font_size_px = round(line_height * self.font_size_ratio)
4040

4141
font_offset_px = int((line_height - font_size_px) / 2)
4242
if self.frame_width_px:

0 commit comments

Comments
 (0)