Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-activetable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
xblock-activetable
Commits
d5032dd7
Commit
d5032dd7
authored
Oct 22, 2015
by
Sven Marnach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make pep8 tool happy.
parent
4b9a5a15
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
README.md
+4
-0
activetable/cells.py
+5
-4
test-requirements.txt
+1
-0
No files found.
README.md
View file @
d5032dd7
...
@@ -12,6 +12,10 @@ Install the test prerequisites:
...
@@ -12,6 +12,10 @@ Install the test prerequisites:
pip install -r test-requirements
pip install -r test-requirements
Run pep8:
pep8 --max-line-length=100 activetable
Run pylint:
Run pylint:
pylint activetable
pylint activetable
...
...
activetable/cells.py
View file @
d5032dd7
...
@@ -33,9 +33,8 @@ class NumericCell(Cell):
...
@@ -33,9 +33,8 @@ class NumericCell(Cell):
is_static
=
False
is_static
=
False
placeholder
=
'numeric response'
placeholder
=
'numeric response'
def
__init__
(
def
__init__
(
self
,
answer
,
tolerance
=
None
,
self
,
answer
,
tolerance
=
None
,
min_significant_digits
=
None
,
max_significant_digits
=
None
min_significant_digits
=
None
,
max_significant_digits
=
None
):
):
"""Set the correct answer and the allowed relative tolerance in percent."""
"""Set the correct answer and the allowed relative tolerance in percent."""
self
.
answer
=
answer
self
.
answer
=
answer
self
.
abs_tolerance
=
None
self
.
abs_tolerance
=
None
...
@@ -55,7 +54,9 @@ class NumericCell(Cell):
...
@@ -55,7 +54,9 @@ class NumericCell(Cell):
except
ValueError
:
except
ValueError
:
return
False
return
False
if
self
.
min_significant_digits
or
self
.
max_significant_digits
:
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
:
if
self
.
min_significant_digits
and
digits
<
self
.
min_significant_digits
:
return
False
return
False
if
self
.
max_significant_digits
and
digits
>
self
.
max_significant_digits
:
if
self
.
max_significant_digits
and
digits
>
self
.
max_significant_digits
:
...
...
test-requirements.txt
View file @
d5032dd7
coverage
coverage
ddt
ddt
nose
nose
pep8
pylint
pylint
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment