Commit aba9b3b9 by stv

Fix PEP8: E124 closing bracket does not match

visual indentation
parent 5a69fead
...@@ -24,7 +24,8 @@ def i_export_the_course(step): ...@@ -24,7 +24,8 @@ def i_export_the_course(step):
@step('I edit and enter bad XML$') @step('I edit and enter bad XML$')
def i_enter_bad_xml(step): def i_enter_bad_xml(step):
enter_xml_in_advanced_problem(step, enter_xml_in_advanced_problem(
step,
"""<problem><h1>Smallest Canvas</h1> """<problem><h1>Smallest Canvas</h1>
<p>You want to make the smallest canvas you can.</p> <p>You want to make the smallest canvas you can.</p>
<multiplechoiceresponse> <multiplechoiceresponse>
......
...@@ -14,7 +14,8 @@ class CourseMetadata(object): ...@@ -14,7 +14,8 @@ class CourseMetadata(object):
# The list of fields that wouldn't be shown in Advanced Settings. # The list of fields that wouldn't be shown in Advanced Settings.
# Should not be used directly. Instead the filtered_list method should be used if the field needs to be filtered # Should not be used directly. Instead the filtered_list method should be used if the field needs to be filtered
# depending on the feature flag. # depending on the feature flag.
FILTERED_LIST = ['xml_attributes', FILTERED_LIST = [
'xml_attributes',
'start', 'start',
'end', 'end',
'enrollment_start', 'enrollment_start',
...@@ -30,7 +31,7 @@ class CourseMetadata(object): ...@@ -30,7 +31,7 @@ class CourseMetadata(object):
'user_partitions', 'user_partitions',
'name', # from xblock 'name', # from xblock
'tags', # from xblock 'tags', # from xblock
'visible_to_staff_only' 'visible_to_staff_only',
] ]
@classmethod @classmethod
......
...@@ -2120,8 +2120,10 @@ class CodeResponse(LoncapaResponse): ...@@ -2120,8 +2120,10 @@ class CodeResponse(LoncapaResponse):
parsed = False parsed = False
if not parsed: if not parsed:
log.error("Unable to parse external grader message as valid" log.error(
" XML: score_msg['msg']=%s", msg "Unable to parse external grader message as valid"
" XML: score_msg['msg']=%s",
msg,
) )
return fail return fail
......
...@@ -152,16 +152,21 @@ class MongoConnection(object): ...@@ -152,16 +152,21 @@ class MongoConnection(object):
original_version (str or ObjectID): The id of a structure original_version (str or ObjectID): The id of a structure
block_key (BlockKey): The id of the block in question block_key (BlockKey): The id of the block in question
""" """
return [structure_from_mongo(structure) for structure in self.structures.find({ return [
structure_from_mongo(structure)
for structure in self.structures.find({
'original_version': original_version, 'original_version': original_version,
'blocks': { 'blocks': {
'$elemMatch': { '$elemMatch': {
'block_id': block_key.id, 'block_id': block_key.id,
'block_type': block_key.type, 'block_type': block_key.type,
'edit_info.update_version': {'$exists': True}, 'edit_info.update_version': {
} '$exists': True,
} },
})] },
},
})
]
def insert_structure(self, structure): def insert_structure(self, structure):
""" """
......
...@@ -54,7 +54,8 @@ class StudentModule(models.Model): ...@@ -54,7 +54,8 @@ class StudentModule(models.Model):
## Grade, and are we done? ## Grade, and are we done?
grade = models.FloatField(null=True, blank=True, db_index=True) grade = models.FloatField(null=True, blank=True, db_index=True)
max_grade = models.FloatField(null=True, blank=True) max_grade = models.FloatField(null=True, blank=True)
DONE_TYPES = (('na', 'NOT_APPLICABLE'), DONE_TYPES = (
('na', 'NOT_APPLICABLE'),
('f', 'FINISHED'), ('f', 'FINISHED'),
('i', 'INCOMPLETE'), ('i', 'INCOMPLETE'),
) )
......
...@@ -115,7 +115,8 @@ class Command(BaseCommand): ...@@ -115,7 +115,8 @@ class Command(BaseCommand):
if make_eamap: if make_eamap:
credentials = "/C=US/ST=Massachusetts/O=Massachusetts Institute of Technology/OU=Client CA v1/CN=%s/emailAddress=%s" % (name, email) credentials = "/C=US/ST=Massachusetts/O=Massachusetts Institute of Technology/OU=Client CA v1/CN=%s/emailAddress=%s" % (name, email)
eamap = ExternalAuthMap(external_id=email, eamap = ExternalAuthMap(
external_id=email,
external_email=email, external_email=email,
external_domain=mit_domain, external_domain=mit_domain,
external_name=name, external_name=name,
......
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