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/us/ssn.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'stdnum/us/ssn.py') diff --git a/stdnum/us/ssn.py b/stdnum/us/ssn.py index d08bd9a..78d538e 100644 --- a/stdnum/us/ssn.py +++ b/stdnum/us/ssn.py @@ -81,8 +81,8 @@ def compact(number): def validate(number): - """Checks to see if the number provided is a valid SSN. This checks - the length, groups and formatting if it is present.""" + """Check if the number is a valid SSN. This checks the length, groups and + formatting if it is present.""" match = _ssn_re.search(clean(number, '').strip()) if not match: raise InvalidFormat() @@ -101,8 +101,7 @@ def validate(number): def is_valid(number): - """Checks to see if the number provided is a valid SSN. This checks - the length, groups and formatting if it is present.""" + """Check if the number is a valid SSN.""" try: return bool(validate(number)) except ValidationError: @@ -110,7 +109,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 -- cgit v1.2.3