Skip to content

Commit 36bc0bb

Browse files
committed
Fixed docs
1 parent f5e4756 commit 36bc0bb

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

barcode/upc.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,23 @@
1212

1313

1414
class UniversalProductCodeA(Barcode):
15-
"""Initializes new UPC-A barcode.
15+
"""Universal Product Code (UPC) barcode.
1616
17-
:param str upc: The upc number as string.
18-
:param writer: barcode.writer instance. The writer to render the barcode
19-
(default: SVGWriter).
20-
:param bool make_ean: Indicates if a leading zero should be added to the
21-
barcode. This converts the UPC into a valid European Article Number (EAN).
17+
UPC-A consists of 12 numeric digits.
2218
"""
23-
2419
name = 'UPC-A'
2520

2621
digits = 11
2722

2823
def __init__(self, upc, writer=None, make_ean=False):
24+
"""Initializes new UPC-A barcode.
25+
26+
:param str upc: The upc number as string.
27+
:param writer: barcode.writer instance. The writer to render the barcode
28+
(default: SVGWriter).
29+
:param bool make_ean: Indicates if a leading zero should be added to the
30+
barcode. This converts the UPC into a valid European Article Number (EAN).
31+
"""
2932
self.ean = make_ean
3033
upc = upc[:self.digits]
3134
if not upc.isdigit():

0 commit comments

Comments
 (0)