Skip to content

Commit

Permalink
Fix type annotation for older Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
maresb committed Nov 5, 2023
1 parent b94c883 commit 8cc8781
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dymoprint/labeler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# this notice are preserved.
# === END LICENSE STATEMENT ===
import array
from typing import Optional
from typing import List, Optional

import usb

Expand Down Expand Up @@ -48,7 +48,7 @@ def __init__(self, devout, devin, synwait=None, tape_size_mm=12):
"""Initialize the LabelManager object. (HLF)"""

self.tape_size_mm = tape_size_mm
self.cmd: list[int] = []
self.cmd: List[int] = []
self.response = False
self.bytesPerLine_ = None
self.dotTab_ = 0
Expand Down Expand Up @@ -203,7 +203,7 @@ def getStatus(self):
response = self.sendCommand()
print(response)

def printLabel(self, lines: list[list[int]], margin_px=DEFAULT_MARGIN_PX):
def printLabel(self, lines: List[List[int]], margin_px=DEFAULT_MARGIN_PX):
"""Print the label described by lines. (Automatically split label if
larger than maxLines)"""

Expand All @@ -212,7 +212,7 @@ def printLabel(self, lines: list[list[int]], margin_px=DEFAULT_MARGIN_PX):
del lines[0 : self.maxLines]
self.rawPrintLabel(lines, margin_px=margin_px)

def rawPrintLabel(self, lines: list[list[int]], margin_px=DEFAULT_MARGIN_PX):
def rawPrintLabel(self, lines: List[List[int]], margin_px=DEFAULT_MARGIN_PX):
"""Print the label described by lines. (HLF)"""

# optimize the matrix for the dymo label printer
Expand Down

0 comments on commit 8cc8781

Please sign in to comment.