Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 493ffb1

Browse files
committedMar 24, 2025·
Fix lints
1 parent adcb12c commit 493ffb1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎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)
Please sign in to comment.