Compare commits

..

No commits in common. "e51d579a83d979a942783864e1bbf1a26ded5966" and "9d3aa8416b8a7beee9f836de5f2a33c8f3f70a6f" have entirely different histories.

4 changed files with 8 additions and 31 deletions

View file

@ -1,15 +0,0 @@
---
name: Lint
on:
push:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: pipx install hatch
- run: hatch run ci:check
# temporary allow failures on pylint until we've fixed all issues
- run: hatch run ci:lint || exit 0

View file

@ -1,7 +1,11 @@
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:
@ -112,9 +116,9 @@ class AveryLabel:
self.canvas.setLineCap(1)
def topLeft(self, x=None, y=None):
if x is None:
if x == None:
x = self.position
if y is None:
if y == 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
from reportlab.lib.units import mm, cm
from reportlab_qrcode import QRCodeImage
from paperless_asn_qr_codes import avery_labels
@ -27,9 +27,7 @@ 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

View file

@ -38,13 +38,3 @@ paperless-asn-qr-codes = "paperless_asn_qr_codes.main:main"
[tool.hatch.version]
source = "vcs"
[tool.hatch.envs.ci]
dependencies = [
"pylint",
"ruff",
]
[tool.hatch.envs.ci.scripts]
check = "ruff check paperless_asn_qr_codes"
lint = "pylint paperless_asn_qr_codes"