Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/stdnum/es
diff options
context:
space:
mode:
Diffstat (limited to 'stdnum/es')
-rw-r--r--stdnum/es/ccc.py6
-rw-r--r--stdnum/es/cif.py8
-rw-r--r--stdnum/es/cups.py8
-rw-r--r--stdnum/es/dni.py8
-rw-r--r--stdnum/es/iban.py4
-rw-r--r--stdnum/es/nie.py8
-rw-r--r--stdnum/es/nif.py8
-rw-r--r--stdnum/es/referenciacatastral.py8
8 files changed, 29 insertions, 29 deletions
diff --git a/stdnum/es/ccc.py b/stdnum/es/ccc.py
index 3800bb3..69a4105 100644
--- a/stdnum/es/ccc.py
+++ b/stdnum/es/ccc.py
@@ -73,7 +73,7 @@ def compact(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[0:4],
@@ -99,7 +99,7 @@ def calc_check_digits(number):
def validate(number):
- """Checks to see if the number provided is a valid CCC."""
+ """Check if the number provided is a valid CCC."""
number = compact(number)
if len(number) != 20:
raise InvalidLength()
@@ -111,7 +111,7 @@ def validate(number):
def is_valid(number):
- """Checks to see if the number provided is a valid CCC."""
+ """Check if the number provided is a valid CCC."""
try:
return bool(validate(number))
except ValidationError:
diff --git a/stdnum/es/cif.py b/stdnum/es/cif.py
index eeb0e72..0c87711 100644
--- a/stdnum/es/cif.py
+++ b/stdnum/es/cif.py
@@ -65,8 +65,8 @@ def calc_check_digits(number):
def validate(number):
- """Checks to see if the number provided is a valid DNI number. This
- checks the length, formatting and check digit."""
+ """Check if the number provided is a valid DNI number. This checks the
+ length, formatting and check digit."""
number = compact(number)
if not number[1:-1].isdigit():
raise InvalidFormat()
@@ -92,8 +92,8 @@ def validate(number):
def is_valid(number):
- """Checks to see if the number provided is a valid DNI number. This
- checks the length, formatting and check digit."""
+ """Check if the number provided is a valid DNI number. This checks the
+ length, formatting and check digit."""
try:
return bool(validate(number))
except ValidationError:
diff --git a/stdnum/es/cups.py b/stdnum/es/cups.py
index 5aa847a..a2011e2 100644
--- a/stdnum/es/cups.py
+++ b/stdnum/es/cups.py
@@ -64,7 +64,7 @@ def compact(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[:2],
@@ -85,8 +85,8 @@ def calc_check_digits(number):
def validate(number):
- """Check to see if the number provided is a valid CUPS. This checks
- length, formatting and check digits."""
+ """Check if the number provided is a valid CUPS. This checks length,
+ formatting and check digits."""
number = compact(number)
if len(number) not in (20, 22):
raise InvalidLength()
@@ -106,7 +106,7 @@ def validate(number):
def is_valid(number):
- """Check to see if the number provided is a valid CUPS."""
+ """Check if the number provided is a valid CUPS."""
try:
return bool(validate(number))
except ValidationError:
diff --git a/stdnum/es/dni.py b/stdnum/es/dni.py
index 18d0954..9b529ef 100644
--- a/stdnum/es/dni.py
+++ b/stdnum/es/dni.py
@@ -55,8 +55,8 @@ def calc_check_digit(number):
def validate(number):
- """Checks to see if the number provided is a valid DNI number. This
- checks the length, formatting and check digit."""
+ """Check if the number provided is a valid DNI number. This checks the
+ length, formatting and check digit."""
number = compact(number)
if not number[:-1].isdigit():
raise InvalidFormat()
@@ -68,8 +68,8 @@ def validate(number):
def is_valid(number):
- """Checks to see if the number provided is a valid DNI number. This
- checks the length, formatting and check digit."""
+ """Check if the number provided is a valid DNI number. This checks the
+ length, formatting and check digit."""
try:
return bool(validate(number))
except ValidationError:
diff --git a/stdnum/es/iban.py b/stdnum/es/iban.py
index 5d25774..9c31296 100644
--- a/stdnum/es/iban.py
+++ b/stdnum/es/iban.py
@@ -65,14 +65,14 @@ def to_ccc(number):
def validate(number):
- """Checks to see if the number provided is a valid Spanish IBAN."""
+ """Check if the number provided is a valid Spanish IBAN."""
number = iban.validate(number, check_country=False)
ccc.validate(to_ccc(number))
return number
def is_valid(number):
- """Checks to see if the number provided is a valid Spanish IBAN."""
+ """Check if the number provided is a valid Spanish IBAN."""
try:
return bool(validate(number))
except ValidationError:
diff --git a/stdnum/es/nie.py b/stdnum/es/nie.py
index 01d218d..91c5918 100644
--- a/stdnum/es/nie.py
+++ b/stdnum/es/nie.py
@@ -56,8 +56,8 @@ def calc_check_digit(number):
def validate(number):
- """Checks to see if the number provided is a valid NIE. This checks
- the length, formatting and check digit."""
+ """Check if the number provided is a valid NIE. This checks the length,
+ formatting and check digit."""
number = compact(number)
if not number[1:-1].isdigit() or number[:1] not in 'XYZ':
raise InvalidFormat()
@@ -69,8 +69,8 @@ def validate(number):
def is_valid(number):
- """Checks to see if the number provided is a valid NIE. This checks
- the length, formatting and check digit."""
+ """Check if the number provided is a valid NIE. This checks the length,
+ formatting and check digit."""
try:
return bool(validate(number))
except ValidationError:
diff --git a/stdnum/es/nif.py b/stdnum/es/nif.py
index 7cd689e..b392a3a 100644
--- a/stdnum/es/nif.py
+++ b/stdnum/es/nif.py
@@ -57,8 +57,8 @@ def compact(number):
def validate(number):
- """Checks to see if the number provided is a valid VAT number. This checks
- the length, formatting and check digit."""
+ """Check if the number provided is a valid VAT number. This checks the
+ length, formatting and check digit."""
number = compact(number)
if not number[1:-1].isdigit():
raise InvalidFormat()
@@ -77,8 +77,8 @@ def validate(number):
def is_valid(number):
- """Checks to see if the number provided is a valid VAT number. This checks
- the length, formatting and check digit."""
+ """Check if the number provided is a valid VAT number. This checks the
+ length, formatting and check digit."""
try:
return bool(validate(number))
except ValidationError:
diff --git a/stdnum/es/referenciacatastral.py b/stdnum/es/referenciacatastral.py
index b9882cf..8b32082 100644
--- a/stdnum/es/referenciacatastral.py
+++ b/stdnum/es/referenciacatastral.py
@@ -68,7 +68,7 @@ def compact(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[:7],
@@ -106,8 +106,8 @@ def calc_check_digits(number):
def validate(number):
- """Checks to see if the number provided is a valid Cadastral Reference.
- This checks the length, formatting and check digits."""
+ """Check if the number is a valid Cadastral Reference. This checks the
+ length, formatting and check digits."""
number = compact(number)
n = _force_unicode(number)
if not all(c in alphabet for c in n):
@@ -120,7 +120,7 @@ def validate(number):
def is_valid(number):
- """Checks to see if the number provided is a valid Cadastral Reference."""
+ """Check if the number is a valid Cadastral Reference."""
try:
return bool(validate(number))
except ValidationError: