Skip to content

Commit 9a5d688

Browse files
committed
Tidy up docstring format
1 parent 32b658b commit 9a5d688

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

barcode/ean.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@
3232
class EuropeanArticleNumber13(Barcode):
3333
"""Initializes EAN13 object.
3434
35-
:parameters:
36-
ean : String
37-
The ean number as string.
38-
writer : barcode.writer Instance
39-
The writer to render the barcode (default: SVGWriter).
35+
:param ean: The ean number as string.
36+
:param writer: The writer to render the barcode (default: SVGWriter).
37+
:param no_checksum: Don't calculate the checksum. Use the provided input instead.
4038
"""
4139

4240
name = "EAN-13"
4341

4442
digits = 12
4543

46-
def __init__(self, ean, writer=None, no_checksum=False, guardbar=False) -> None:
44+
def __init__(
45+
self, ean: str, writer=None, no_checksum=False, guardbar=False
46+
) -> None:
4747
ean = ean[: self.digits]
4848
if not ean.isdigit():
4949
raise IllegalCharacterError("EAN code can only contain numbers.")
@@ -202,11 +202,9 @@ def __init__(self, ean, writer=None, no_checksum=False, guardbar=True) -> None:
202202
class EuropeanArticleNumber14(EuropeanArticleNumber13):
203203
"""Represents an EAN-14 barcode. See EAN13's __init__ for details.
204204
205-
:parameters:
206-
ean : String
207-
The ean number as string.
208-
writer : barcode.writer Instance
209-
The writer to render the barcode (default: SVGWriter).
205+
:param ean: The ean number as string.
206+
:param writer: The writer to render the barcode (default: SVGWriter).
207+
:param no_checksum: Don't calculate the checksum. Use the provided input instead.
210208
"""
211209

212210
name = "EAN-14"

0 commit comments

Comments
 (0)