Commit ab5834fb by cahrens

Pylint cleanup.

parent e6dfa8e8
...@@ -69,7 +69,7 @@ class CapaFields(object): ...@@ -69,7 +69,7 @@ class CapaFields(object):
max_attempts = StringyInteger( max_attempts = StringyInteger(
display_name="Maximum Attempts", display_name="Maximum Attempts",
help="Defines the number of times a student can try to answer this problem. If the value is not set, infinite attempts are allowed.", help="Defines the number of times a student can try to answer this problem. If the value is not set, infinite attempts are allowed.",
values = {"min" : 1 }, scope=Scope.settings values={"min": 1}, scope=Scope.settings
) )
due = Date(help="Date that this problem is due by", scope=Scope.settings) due = Date(help="Date that this problem is due by", scope=Scope.settings)
graceperiod = Timedelta(help="Amount of time after the due date that submissions will be accepted", scope=Scope.settings) graceperiod = Timedelta(help="Amount of time after the due date that submissions will be accepted", scope=Scope.settings)
...@@ -103,7 +103,7 @@ class CapaFields(object): ...@@ -103,7 +103,7 @@ class CapaFields(object):
weight = StringyFloat( weight = StringyFloat(
display_name="Problem Weight", display_name="Problem Weight",
help="Defines the number of points each problem is worth. If the value is not set, each response field in the problem is worth one point.", help="Defines the number of points each problem is worth. If the value is not set, each response field in the problem is worth one point.",
values = {"min" : 0 , "step": .1}, values={"min": 0, "step": .1},
scope=Scope.settings scope=Scope.settings
) )
markdown = String(help="Markdown source of this module", scope=Scope.settings) markdown = String(help="Markdown source of this module", scope=Scope.settings)
......
...@@ -37,14 +37,14 @@ class WordCloudFields(object): ...@@ -37,14 +37,14 @@ class WordCloudFields(object):
help="Number of text boxes available for students to input words/sentences.", help="Number of text boxes available for students to input words/sentences.",
scope=Scope.settings, scope=Scope.settings,
default=5, default=5,
values = {"min" : 1 } values={"min": 1}
) )
num_top_words = StringyInteger( num_top_words = StringyInteger(
display_name="Maximum Words", display_name="Maximum Words",
help="Maximum number of words to be displayed in generated word cloud.", help="Maximum number of words to be displayed in generated word cloud.",
scope=Scope.settings, scope=Scope.settings,
default=250, default=250,
values = {"min" : 1 } values={"min": 1}
) )
display_student_percents = StringyBoolean( display_student_percents = StringyBoolean(
display_name="Show Percents", display_name="Show Percents",
......
...@@ -460,7 +460,6 @@ class XModuleDescriptor(XModuleFields, HTMLSnippet, ResourceTemplates, XBlock): ...@@ -460,7 +460,6 @@ class XModuleDescriptor(XModuleFields, HTMLSnippet, ResourceTemplates, XBlock):
""" """
return False return False
# ================================= JSON PARSING =========================== # ================================= JSON PARSING ===========================
@staticmethod @staticmethod
def load_from_json(json_data, system, default_class=None): def load_from_json(json_data, system, default_class=None):
...@@ -665,11 +664,11 @@ class XModuleDescriptor(XModuleFields, HTMLSnippet, ResourceTemplates, XBlock): ...@@ -665,11 +664,11 @@ class XModuleDescriptor(XModuleFields, HTMLSnippet, ResourceTemplates, XBlock):
type = "Integer" type = "Integer"
elif isinstance(field, Float): elif isinstance(field, Float):
type = "Float" type = "Float"
metadata_fields[field.name] = {'field_name' : field.name, metadata_fields[field.name] = {'field_name': field.name,
'type' : type, 'type': type,
'display_name' : field.display_name, 'display_name': field.display_name,
'value': field.to_json(value), 'value': field.to_json(value),
'options' : values, 'options': values,
'default_value': field.to_json(default_value), 'default_value': field.to_json(default_value),
'inheritable': inheritable, 'inheritable': inheritable,
'explicitly_set': explicitly_set, 'explicitly_set': explicitly_set,
......
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