Commit d5032dd7 by Sven Marnach

Make pep8 tool happy.

parent 4b9a5a15
......@@ -12,6 +12,10 @@ Install the test prerequisites:
pip install -r test-requirements
Run pep8:
pep8 --max-line-length=100 activetable
Run pylint:
pylint activetable
......
......@@ -33,9 +33,8 @@ class NumericCell(Cell):
is_static = False
placeholder = 'numeric response'
def __init__(
self, answer, tolerance=None, min_significant_digits=None, max_significant_digits=None
):
def __init__(self, answer, tolerance=None,
min_significant_digits=None, max_significant_digits=None):
"""Set the correct answer and the allowed relative tolerance in percent."""
self.answer = answer
self.abs_tolerance = None
......@@ -55,7 +54,9 @@ class NumericCell(Cell):
except ValueError:
return False
if self.min_significant_digits or self.max_significant_digits:
digits = len(decimal.Decimal(student_response).as_tuple().digits) # pylint: disable=no-member
# pylint: disable=no-member
digits = len(decimal.Decimal(student_response).as_tuple().digits)
# pylint: enable=no-member
if self.min_significant_digits and digits < self.min_significant_digits:
return False
if self.max_significant_digits and digits > self.max_significant_digits:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment