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/co/nit.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'stdnum/co') diff --git a/stdnum/co/nit.py b/stdnum/co/nit.py index 6cb2fc9..fe3dd48 100644 --- a/stdnum/co/nit.py +++ b/stdnum/co/nit.py @@ -54,8 +54,8 @@ def calc_check_digit(number): def validate(number): - """Checks to see if the number provided is a valid number. This checks - the length, formatting and check digit.""" + """Check if the number is a valid NIT. This checks the length, formatting + and check digit.""" number = compact(number) if not 8 <= len(number) <= 16: raise InvalidLength() @@ -67,8 +67,7 @@ def validate(number): def is_valid(number): - """Checks to see if the number provided is a valid number. This - checks the length, formatting and check digit.""" + """Check if the number is a valid NIT.""" try: return bool(validate(number)) except ValidationError: @@ -76,7 +75,7 @@ def is_valid(number): def format(number): - """Reformat the passed number to the standard format.""" + """Reformat the number to the standard presentation format.""" number = compact(number) return '.'.join( number[i - 3:i] for i in reversed(range(-1, -len(number), -3)) -- cgit v1.2.3