diff options
Diffstat (limited to 'stdnum/us/itin.py')
-rw-r--r-- | stdnum/us/itin.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/stdnum/us/itin.py b/stdnum/us/itin.py index f8dc544..0d1aa41 100644 --- a/stdnum/us/itin.py +++ b/stdnum/us/itin.py @@ -70,8 +70,8 @@ def compact(number): def validate(number): - """Checks to see if the number provided is a valid ITIN. This checks - the length, groups and formatting if it is present.""" + """Check if the number is a valid ITIN. This checks the length, groups + and formatting if it is present.""" match = _itin_re.search(clean(number, '').strip()) if not match: raise InvalidFormat() @@ -83,8 +83,7 @@ def validate(number): def is_valid(number): - """Checks to see if the number provided is a valid ITIN. This checks - the length, groups and formatting if it is present.""" + """Check if the number is a valid ITIN.""" try: return bool(validate(number)) except ValidationError: @@ -92,7 +91,7 @@ def is_valid(number): def format(number): - """Reformat the passed number to the standard format.""" + """Reformat the number to the standard presentation format.""" if len(number) == 9: number = number[:3] + '-' + number[3:5] + '-' + number[5:] return number |