Commit d33e2e60 by David Ormsbee Committed by Nimisha Asthagiri

Fix PEP8 violations.

parent 830e55d3
...@@ -13,6 +13,7 @@ from monkey_patch import django_utils_translation ...@@ -13,6 +13,7 @@ from monkey_patch import django_utils_translation
import xmodule.x_module import xmodule.x_module
import cms.lib.xblock.runtime import cms.lib.xblock.runtime
def run(): def run():
""" """
Executed during django startup Executed during django startup
......
...@@ -71,7 +71,7 @@ class HtmlBlock(object): ...@@ -71,7 +71,7 @@ class HtmlBlock(object):
""" """
if self.system.anonymous_student_id: if self.system.anonymous_student_id:
return self.data.replace("%%USER_ID%%", self.system.anonymous_student_id) return self.data.replace("%%USER_ID%%", self.system.anonymous_student_id)
return self.data return self.data
class HtmlModuleMixin(HtmlBlock, XModule): class HtmlModuleMixin(HtmlBlock, XModule):
...@@ -99,6 +99,7 @@ class HtmlModule(HtmlModuleMixin): ...@@ -99,6 +99,7 @@ class HtmlModule(HtmlModuleMixin):
Module for putting raw html in a course Module for putting raw html in a course
""" """
class HtmlDescriptor(HtmlBlock, XmlDescriptor, EditingDescriptor): # pylint: disable=abstract-method class HtmlDescriptor(HtmlBlock, XmlDescriptor, EditingDescriptor): # pylint: disable=abstract-method
""" """
Module for putting raw html in a course Module for putting raw html in a course
......
...@@ -1216,6 +1216,7 @@ def descriptor_global_handler_url(block, handler_name, suffix='', query='', thir ...@@ -1216,6 +1216,7 @@ def descriptor_global_handler_url(block, handler_name, suffix='', query='', thir
""" """
raise NotImplementedError("Applications must monkey-patch this function before using handler_url for studio_view") raise NotImplementedError("Applications must monkey-patch this function before using handler_url for studio_view")
# This function exists to give applications (LMS/CMS) a place to monkey-patch until # This function exists to give applications (LMS/CMS) a place to monkey-patch until
# we can refactor modulestore to split out the FieldData half of its interface from # we can refactor modulestore to split out the FieldData half of its interface from
# the Runtime part of its interface. This function matches the Runtime.local_resource_url interface # the Runtime part of its interface. This function matches the Runtime.local_resource_url interface
......
...@@ -21,7 +21,7 @@ class StudentViewTransformer(BlockStructureTransformer): ...@@ -21,7 +21,7 @@ class StudentViewTransformer(BlockStructureTransformer):
block = block_structure.get_xblock(block_key) block = block_structure.get_xblock(block_key)
# We're iterating through descriptors (not bound to a user) that are # We're iterating through descriptors (not bound to a user) that are
# given to us by the modulestore. The reason we look at # given to us by the modulestore. The reason we look at
# block.__class__ is to avoid the XModuleDescriptor -> XModule # block.__class__ is to avoid the XModuleDescriptor -> XModule
# proxying that would happen if we just examined block directly, # proxying that would happen if we just examined block directly,
# since it's likely that student_view() is going to be defined on # since it's likely that student_view() is going to be defined on
......
...@@ -6,7 +6,7 @@ from ..student_view import StudentViewTransformer ...@@ -6,7 +6,7 @@ from ..student_view import StudentViewTransformer
class TestStudentViewTransformer(ModuleStoreTestCase): class TestStudentViewTransformer(ModuleStoreTestCase):
def setUp(self): def setUp(self):
super(TestStudentViewTransformer, self).setUp() super(TestStudentViewTransformer, self).setUp()
self.course_key = self.create_toy_course() self.course_key = self.create_toy_course()
......
...@@ -118,6 +118,7 @@ def handler_url(block, handler_name, suffix='', query='', thirdparty=False): ...@@ -118,6 +118,7 @@ def handler_url(block, handler_name, suffix='', query='', thirdparty=False):
return url return url
def local_resource_url(block, uri): def local_resource_url(block, uri):
""" """
local_resource_url for Studio local_resource_url for Studio
......
...@@ -237,6 +237,6 @@ FEATURES['ENABLE_RENDER_XBLOCK_API'] = True ...@@ -237,6 +237,6 @@ FEATURES['ENABLE_RENDER_XBLOCK_API'] = True
CACHES['lms.course_blocks'] = { CACHES['lms.course_blocks'] = {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'KEY_FUNCTION': 'util.memcache.safe_key', 'KEY_FUNCTION': 'util.memcache.safe_key',
} }
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