Fix PEP8: E125 continuation line
does not distinguish itself from next logical line
This commit is contained in:
@@ -694,7 +694,7 @@ class LoncapaProblem(object):
|
||||
return
|
||||
|
||||
if (problemtree.tag == 'script' and problemtree.get('type')
|
||||
and 'javascript' in problemtree.get('type')):
|
||||
and 'javascript' in problemtree.get('type')):
|
||||
# leave javascript intact.
|
||||
return deepcopy(problemtree)
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ class PositionsCompare(list):
|
||||
return False
|
||||
|
||||
if (isinstance(self[0], (list, int, float)) and
|
||||
isinstance(other[0], (list, int, float))):
|
||||
isinstance(other[0], (list, int, float))):
|
||||
return self.coordinate_positions_compare(other)
|
||||
|
||||
elif (isinstance(self[0], (unicode, str)) and
|
||||
|
||||
@@ -39,7 +39,7 @@ def make_error_tracker():
|
||||
|
||||
# don't display irrelevant gunicorn sync error
|
||||
if (('python2.7/site-packages/gunicorn/workers/sync.py' in exc_str) and
|
||||
('[Errno 11] Resource temporarily unavailable' in exc_str)):
|
||||
('[Errno 11] Resource temporarily unavailable' in exc_str)):
|
||||
exc_str = ''
|
||||
|
||||
errors.append((msg, exc_str))
|
||||
|
||||
@@ -202,7 +202,7 @@ class XModuleMixin(XBlockMixin):
|
||||
# an XModule context, not an XModuleDescriptor context,
|
||||
# so we should use the xmodule_runtime (ModuleSystem) as the runtime.
|
||||
if (not isinstance(self, (XModule, XModuleDescriptor)) and
|
||||
self.xmodule_runtime is not None):
|
||||
self.xmodule_runtime is not None):
|
||||
return PureSystem(self.xmodule_runtime, self._runtime)
|
||||
else:
|
||||
return self._runtime
|
||||
|
||||
@@ -76,7 +76,7 @@ def cleanup(filepath, remove_meta):
|
||||
print "WARNING: {0} has both slug and url_name".format(node)
|
||||
|
||||
if ('url_name' in attrs and 'filename' in attrs and
|
||||
len(attrs) == 2 and attrs['url_name'] == attrs['filename']):
|
||||
len(attrs) == 2 and attrs['url_name'] == attrs['filename']):
|
||||
# This is a pointer tag in disguise. Get rid of the filename.
|
||||
print 'turning {0}.{1} into a pointer tag'.format(node.tag, attrs['url_name'])
|
||||
del attrs['filename']
|
||||
|
||||
@@ -154,7 +154,7 @@ def _has_access_course_desc(user, action, course):
|
||||
# if using registration method to restrict (say shibboleth)
|
||||
if settings.FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
|
||||
if user is not None and user.is_authenticated() and \
|
||||
ExternalAuthMap.objects.filter(user=user, external_domain=course.enrollment_domain):
|
||||
ExternalAuthMap.objects.filter(user=user, external_domain=course.enrollment_domain):
|
||||
debug("Allow: external_auth of " + course.enrollment_domain)
|
||||
reg_method_ok = True
|
||||
else:
|
||||
|
||||
@@ -162,7 +162,7 @@ def combined_notifications(course, user):
|
||||
last_time_viewed)
|
||||
if notifications.get('success'):
|
||||
if (notifications.get('staff_needs_to_grade') or
|
||||
notifications.get('student_needs_to_peer_grade')):
|
||||
notifications.get('student_needs_to_peer_grade')):
|
||||
pending_grading = True
|
||||
except:
|
||||
#Non catastrophic error, so no real action
|
||||
|
||||
Reference in New Issue
Block a user