Commit 00ae4889 by stv

Fix PEP8: E225 missing whitespace around operator

parent 41390f02
......@@ -69,9 +69,9 @@ STATICFILES_DIRS += [
# If we don't add these settings, then Django templates that can't
# find pipelined assets will raise a ValueError.
# http://stackoverflow.com/questions/12816941/unit-testing-with-django-pipeline
STATICFILES_STORAGE='pipeline.storage.NonPackagingPipelineStorage'
STATICFILES_STORAGE = 'pipeline.storage.NonPackagingPipelineStorage'
STATIC_URL = "/static/"
PIPELINE_ENABLED=False
PIPELINE_ENABLED = False
# Update module store settings per defaults for tests
update_module_store_settings(
......
......@@ -45,7 +45,7 @@ class StudentState(object):
@property
def num_pending(self):
return max(self.INITIAL_ESSAYS_AVAILABLE- self.num_graded, 0)
return max(self.INITIAL_ESSAYS_AVAILABLE - self.num_graded, 0)
@property
def num_required(self):
......
......@@ -21,7 +21,7 @@ random.Random = random_module.Random
sys.modules['random'] = random
"""
ASSUMED_IMPORTS=[
ASSUMED_IMPORTS = [
("numpy", "numpy"),
("math", "math"),
("scipy", "scipy"),
......
......@@ -236,7 +236,7 @@ class CombinedOpenEndedRubric(object):
rubric_categories[i]['options'][j]['grader_types'].append(grader_type)
#Grab the score and add it to the actual scores. J will be the score for the selected
#grader type
if len(actual_scores)<=i:
if len(actual_scores) <= i:
#Initialize a new list in the list of lists
actual_scores.append([j])
else:
......@@ -249,7 +249,7 @@ class CombinedOpenEndedRubric(object):
for (i, a) in enumerate(actual_scores):
if int(a) == max_scores[i]:
correct.append(1)
elif int(a)==0:
elif int(a) == 0:
correct.append(0)
else:
correct.append(.5)
......
......@@ -566,7 +566,7 @@ class VideoCdnTest(unittest.TestCase):
original_video_url = "http://www.original_video.com/original_video.mp4"
cdn_response_video_url = "http://www.cdn_video.com/cdn_video.mp4"
cdn_response_content = '{{"sources":["{cdn_url}"]}}'.format(cdn_url=cdn_response_video_url)
cdn_response.return_value=Mock(status_code=200, content=cdn_response_content)
cdn_response.return_value = Mock(status_code=200, content=cdn_response_content)
fake_cdn_url = 'http://fake_cdn.com/'
self.assertEqual(
get_video_from_cdn(fake_cdn_url, original_video_url),
......@@ -579,6 +579,6 @@ class VideoCdnTest(unittest.TestCase):
Test if no alternative video in CDN exists.
"""
original_video_url = "http://www.original_video.com/original_video.mp4"
cdn_response.return_value=Mock(status_code=404)
cdn_response.return_value = Mock(status_code=404)
fake_cdn_url = 'http://fake_cdn.com/'
self.assertIsNone(get_video_from_cdn(fake_cdn_url, original_video_url))
......@@ -62,4 +62,4 @@ def is_masquerading_as_student(user):
Return True if user is masquerading as a student, False otherwise
'''
masq = getattr(user, 'masquerade_as_student', False)
return masq==True
return masq is True
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