Commit 569edd21 by Nimisha Asthagiri

fixup! fix quality issues.

parent c2cf9ae0
...@@ -905,7 +905,6 @@ class ModuleStoreRead(ModuleStoreAssetBase): ...@@ -905,7 +905,6 @@ class ModuleStoreRead(ModuleStoreAssetBase):
""" """
pass pass
@abstractmethod @abstractmethod
def make_course_usage_key(self, course_key): def make_course_usage_key(self, course_key):
""" """
......
...@@ -15,6 +15,7 @@ from opaque_keys.edx.keys import UsageKey ...@@ -15,6 +15,7 @@ from opaque_keys.edx.keys import UsageKey
from transformers.student_view import StudentViewTransformer from transformers.student_view import StudentViewTransformer
from transformers.block_counts import BlockCountsTransformer from transformers.block_counts import BlockCountsTransformer
class ListField(Field): class ListField(Field):
""" """
Field for a list of strings Field for a list of strings
...@@ -59,7 +60,6 @@ class BlockListGetForm(Form): ...@@ -59,7 +60,6 @@ class BlockListGetForm(Form):
return usage_key return usage_key
def clean(self): def clean(self):
cleaned_data = super(BlockListGetForm, self).clean() cleaned_data = super(BlockListGetForm, self).clean()
......
...@@ -156,7 +156,7 @@ class SplitTestTransformerTestCase(CourseStructureTestCase): ...@@ -156,7 +156,7 @@ class SplitTestTransformerTestCase(CourseStructureTestCase):
{ {
'#type': 'vertical', '#type': 'vertical',
'#ref': 'L', '#ref': 'L',
'#children': [{'#type': 'vertical', '#ref': 'P',},], '#children': [{'#type': 'vertical', '#ref': 'P'}],
}, },
], ],
}, },
......
...@@ -173,7 +173,7 @@ class UserPartitionTransformerTestCase(CourseStructureTestCase): ...@@ -173,7 +173,7 @@ class UserPartitionTransformerTestCase(CourseStructureTestCase):
Test when user is assigned to group in user partition. Test when user is assigned to group in user partition.
""" """
if group_id: if group_id:
add_user_to_cohort(self.cohorts[group_id-1], self.user.username) add_user_to_cohort(self.cohorts[group_id - 1], self.user.username)
trans_block_structure = get_course_blocks( trans_block_structure = get_course_blocks(
self.user, self.user,
......
...@@ -6,6 +6,7 @@ from openedx.core.lib.block_cache.transformer import BlockStructureTransformer ...@@ -6,6 +6,7 @@ from openedx.core.lib.block_cache.transformer import BlockStructureTransformer
from .split_test import SplitTestTransformer from .split_test import SplitTestTransformer
from .utils import get_field_on_block from .utils import get_field_on_block
class MergedGroupAccess(object): class MergedGroupAccess(object):
""" """
... ...
......
...@@ -129,7 +129,7 @@ def traverse_post_order(start_node, get_children, get_result=None, predicate=Non ...@@ -129,7 +129,7 @@ def traverse_post_order(start_node, get_children, get_result=None, predicate=Non
while stack: while stack:
# peek at the next item in the stack # peek at the next item in the stack
current_stack_item = stack[len(stack)-1] current_stack_item = stack[len(stack) - 1]
# verify the block wasn't already visited and the block satisfies the predicate # verify the block wasn't already visited and the block satisfies the predicate
if current_stack_item.block in visited or not predicate(current_stack_item.block): if current_stack_item.block in visited or not predicate(current_stack_item.block):
......
...@@ -68,7 +68,7 @@ class TestBlockStructureData(TestCase, ChildrenMapTestMixin): ...@@ -68,7 +68,7 @@ class TestBlockStructureData(TestCase, ChildrenMapTestMixin):
transformers_info = [ transformers_info = [
TransformerInfo( TransformerInfo(
transformer=MockTransformer(), transformer=MockTransformer(),
structure_wide_data=[("t1.global1", "t1.g.val1"), ("t1.global2", "t1.g.val2"),], structure_wide_data=[("t1.global1", "t1.g.val1"), ("t1.global2", "t1.g.val2")],
block_specific_data={ block_specific_data={
"B1": [("t1.key1", "t1.b1.val1"), ("t1.key2", "t1.b1.val2")], "B1": [("t1.key1", "t1.b1.val1"), ("t1.key2", "t1.b1.val2")],
"B2": [("t1.key1", "t1.b2.val1"), ("t1.key2", "t1.b2.val2")], "B2": [("t1.key1", "t1.b2.val1"), ("t1.key2", "t1.b2.val2")],
...@@ -78,7 +78,7 @@ class TestBlockStructureData(TestCase, ChildrenMapTestMixin): ...@@ -78,7 +78,7 @@ class TestBlockStructureData(TestCase, ChildrenMapTestMixin):
), ),
TransformerInfo( TransformerInfo(
transformer=MockTransformer(), transformer=MockTransformer(),
structure_wide_data=[("t2.global1", "t2.g.val1"), ("t2.global2", "t2.g.val2"),], structure_wide_data=[("t2.global1", "t2.g.val1"), ("t2.global2", "t2.g.val2")],
block_specific_data={ block_specific_data={
"B1": [("t2.key1", "t2.b1.val1"), ("t2.key2", "t2.b1.val2")], "B1": [("t2.key1", "t2.b1.val1"), ("t2.key2", "t2.b1.val2")],
"B2": [("t2.key1", "t2.b2.val1"), ("t2.key2", "t2.b2.val2")], "B2": [("t2.key1", "t2.b2.val1"), ("t2.key2", "t2.b2.val2")],
......
...@@ -74,6 +74,7 @@ class MockUserInfo(object): ...@@ -74,6 +74,7 @@ class MockUserInfo(object):
class MockTransformer(BlockStructureTransformer): class MockTransformer(BlockStructureTransformer):
VERSION = 1 VERSION = 1
def transform(self, user_info, block_structure): def transform(self, user_info, block_structure):
pass pass
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
""" """
from abc import abstractproperty from abc import abstractproperty
class UserInfo(object): class UserInfo(object):
""" """
... ...
......
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