Skip to content

Commit

Permalink
Improve doc strings
Browse files Browse the repository at this point in the history
fixing #411
  • Loading branch information
typemytype committed Mar 24, 2021
1 parent 0bd8c59 commit b3eac26
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drawBot/context/tools/imageObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,7 @@ def aztecCodeGenerator(self, size, message=None, correctionLevel=None, layers=No
"""
Generates an Aztec code (two-dimensional barcode) from input data.
Attributes: `message` a string, `correctionLevel` a float, `layers` a float, `compactStyle` a bool.
Attributes: `message` as bytes, `correctionLevel` a float, `layers` a float, `compactStyle` a bool.
"""
attr = dict()
if message:
Expand All @@ -1275,12 +1275,14 @@ def QRCodeGenerator(self, size, message=None, correctionLevel=None):
"""
Generates a Quick Response code (two-dimensional barcode) from input data.
Attributes: `message` a string, `correctionLevel` a float.
Attributes: `message` as bytes, `correctionLevel` a single letter string,
options are: `'L'` (7%), `'M'` (15%), `'Q'` (25%) or `'H'` (30%).
"""
attr = dict()
if message:
attr["inputMessage"] = AppKit.NSData.dataWithBytes_length_(message, len(message))
if correctionLevel:
assert correctionLevel in "LMQH", "'correctionLevel' must be either 'L', 'M', 'Q', 'H'"
attr["inputCorrectionLevel"] = correctionLevel
filterDict = dict(name="CIQRCodeGenerator", attributes=attr)
filterDict["size"] = size
Expand All @@ -1291,7 +1293,7 @@ def code128BarcodeGenerator(self, size, message=None, quietSpace=None):
"""
Generates a Code 128 one-dimensional barcode from input data.
Attributes: `message` a string, `quietSpace` a float.
Attributes: `message` a bytes, `quietSpace` a float.
"""
attr = dict()
if message:
Expand Down

0 comments on commit b3eac26

Please sign in to comment.