Skip to content

Commit d47dd6a

Browse files
committed
Fix SIM108
1 parent f824d00 commit d47dd6a

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

barcode/writer.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,7 @@ def render(self, code):
261261
if not text["start"]:
262262
# If we don't have any start value, print the entire ean
263263
ypos += self.text_distance
264-
if self.center_text:
265-
# better center position for text
266-
xpos = bxs + ((bxe - bxs) / 2.0)
267-
else:
268-
xpos = bxs
264+
xpos = bxs + (bxe - bxs) / 2.0 if self.center_text else bxs
269265
self._callbacks["paint_text"](xpos, ypos)
270266
else:
271267
# Else, divide the ean into blocks and print each block

0 commit comments

Comments
 (0)