fix: cleanup linting errors

This commit is contained in:
Marvin Gaube 2023-11-25 17:43:54 +01:00
parent d7d4500bf5
commit e51d579a83
2 changed files with 6 additions and 8 deletions

View file

@ -1,11 +1,7 @@
import os
from dataclasses import dataclass, KW_ONLY
from collections.abc import Iterator
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import LETTER, A4
from reportlab.lib.units import inch
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.lib.units import mm
# Usage:
@ -116,9 +112,9 @@ class AveryLabel:
self.canvas.setLineCap(1)
def topLeft(self, x=None, y=None):
if x == None:
if x is None:
x = self.position
if y == None:
if y is None:
if self.topDown:
x, y = divmod(x, self.down)
else:

View file

@ -1,6 +1,6 @@
import argparse
from reportlab.lib.units import mm, cm
from reportlab.lib.units import mm
from reportlab_qrcode import QRCodeImage
from paperless_asn_qr_codes import avery_labels
@ -27,7 +27,9 @@ def main():
"--format", choices=avery_labels.labelInfo.keys(), default="averyL4731"
)
parser.add_argument(
"--border", action='store_true', help="Display borders around labels, useful for debugging the printer alignment"
"--border",
action="store_true",
help="Display borders around labels, useful for debugging the printer alignment",
)
args = parser.parse_args()
global startASN