From 1c276393d695f969f4600cb3adc49af71168d513 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sun, 10 Sep 2017 23:24:08 +0200 Subject: Docstring improvements --- stdnum/iso7064/mod_37_36.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'stdnum/iso7064/mod_37_36.py') diff --git a/stdnum/iso7064/mod_37_36.py b/stdnum/iso7064/mod_37_36.py index 0787e5a..6b3dea5 100644 --- a/stdnum/iso7064/mod_37_36.py +++ b/stdnum/iso7064/mod_37_36.py @@ -51,14 +51,14 @@ def checksum(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'): def calc_check_digit(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'): - """With the provided number, calculate the extra digit that should be - appended to make it a valid number.""" + """Calculate the extra digit that should be appended to the number to + make it a valid number.""" modulus = len(alphabet) return alphabet[(1 - ((checksum(number, alphabet) or modulus) * 2) % (modulus + 1)) % modulus] def validate(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'): - """Checks whether the check digit is valid.""" + """Check whether the check digit is valid.""" try: valid = checksum(number, alphabet) == 1 except Exception: @@ -69,7 +69,7 @@ def validate(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'): def is_valid(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'): - """Checks whether the check digit is valid.""" + """Check whether the check digit is valid.""" try: return bool(validate(number, alphabet)) except ValidationError: -- cgit v1.2.3