s/pylint: disable=W0201/pylint: disable=attribute-defined-outside-init/
This commit is contained in:
@@ -439,7 +439,7 @@ class LoncapaProblem(object):
|
|||||||
# Note that the modifications has been done, avoiding problems if called twice.
|
# Note that the modifications has been done, avoiding problems if called twice.
|
||||||
if hasattr(self, 'has_targeted'):
|
if hasattr(self, 'has_targeted'):
|
||||||
return
|
return
|
||||||
self.has_targeted = True # pylint: disable=W0201
|
self.has_targeted = True # pylint: disable=attribute-defined-outside-init
|
||||||
|
|
||||||
for mult_choice_response in tree.xpath('//multiplechoiceresponse[@targeted-feedback]'):
|
for mult_choice_response in tree.xpath('//multiplechoiceresponse[@targeted-feedback]'):
|
||||||
show_explanation = mult_choice_response.get('targeted-feedback') == 'alwaysShowCorrectChoiceExplanation'
|
show_explanation = mult_choice_response.get('targeted-feedback') == 'alwaysShowCorrectChoiceExplanation'
|
||||||
|
|||||||
@@ -874,7 +874,7 @@ class MultipleChoiceResponse(LoncapaResponse):
|
|||||||
# Both to avoid double-processing, and to feed the logs.
|
# Both to avoid double-processing, and to feed the logs.
|
||||||
if self.has_shuffle():
|
if self.has_shuffle():
|
||||||
return
|
return
|
||||||
self._has_shuffle = True # pylint: disable=W0201
|
self._has_shuffle = True # pylint: disable=attribute-defined-outside-init
|
||||||
# Move elements from tree to list for shuffling, then put them back.
|
# Move elements from tree to list for shuffling, then put them back.
|
||||||
ordering = list(choicegroup.getchildren())
|
ordering = list(choicegroup.getchildren())
|
||||||
for choice in ordering:
|
for choice in ordering:
|
||||||
@@ -958,7 +958,7 @@ class MultipleChoiceResponse(LoncapaResponse):
|
|||||||
# Both to avoid double-processing, and to feed the logs.
|
# Both to avoid double-processing, and to feed the logs.
|
||||||
if self.has_answerpool():
|
if self.has_answerpool():
|
||||||
return
|
return
|
||||||
self._has_answerpool = True # pylint: disable=W0201
|
self._has_answerpool = True # pylint: disable=attribute-defined-outside-init
|
||||||
|
|
||||||
choices_list = list(choicegroup.getchildren())
|
choices_list = list(choicegroup.getchildren())
|
||||||
|
|
||||||
|
|||||||
@@ -442,7 +442,7 @@ class MongoModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase, Mongo
|
|||||||
|
|
||||||
# TODO (cpennington): Enable non-filesystem filestores
|
# TODO (cpennington): Enable non-filesystem filestores
|
||||||
# pylint: disable=invalid-name
|
# pylint: disable=invalid-name
|
||||||
# pylint: disable=W0201
|
# pylint: disable=attribute-defined-outside-init
|
||||||
def __init__(self, contentstore, doc_store_config, fs_root, render_template,
|
def __init__(self, contentstore, doc_store_config, fs_root, render_template,
|
||||||
default_class=None,
|
default_class=None,
|
||||||
error_tracker=null_error_tracker,
|
error_tracker=null_error_tracker,
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class DiscussionTabSingleThreadTest(UniqueCourseTest):
|
|||||||
AutoAuthPage(self.browser, course_id=self.course_id).visit()
|
AutoAuthPage(self.browser, course_id=self.course_id).visit()
|
||||||
|
|
||||||
def setup_thread_page(self, thread_id):
|
def setup_thread_page(self, thread_id):
|
||||||
self.thread_page = DiscussionTabSingleThreadPage(self.browser, self.course_id, thread_id) # pylint: disable=W0201
|
self.thread_page = DiscussionTabSingleThreadPage(self.browser, self.course_id, thread_id) # pylint: disable=attribute-defined-outside-init
|
||||||
self.thread_page.visit()
|
self.thread_page.visit()
|
||||||
|
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
@@ -129,7 +129,7 @@ class InlineDiscussionTest(UniqueCourseTest):
|
|||||||
discussion_page = InlineDiscussionPage(self.browser, self.discussion_id)
|
discussion_page = InlineDiscussionPage(self.browser, self.discussion_id)
|
||||||
discussion_page.expand_discussion()
|
discussion_page.expand_discussion()
|
||||||
self.assertEqual(discussion_page.get_num_displayed_threads(), 1)
|
self.assertEqual(discussion_page.get_num_displayed_threads(), 1)
|
||||||
self.thread_page = InlineDiscussionThreadPage(self.browser, thread_id) # pylint: disable=W0201
|
self.thread_page = InlineDiscussionThreadPage(self.browser, thread_id) # pylint: disable=attribute-defined-outside-init
|
||||||
self.thread_page.expand()
|
self.thread_page.expand()
|
||||||
|
|
||||||
def refresh_thread_page(self, thread_id):
|
def refresh_thread_page(self, thread_id):
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ class DiscussionTabSingleThreadTest(UniqueCourseTest, DiscussionResponsePaginati
|
|||||||
AutoAuthPage(self.browser, course_id=self.course_id).visit()
|
AutoAuthPage(self.browser, course_id=self.course_id).visit()
|
||||||
|
|
||||||
def setup_thread_page(self, thread_id):
|
def setup_thread_page(self, thread_id):
|
||||||
self.thread_page = DiscussionTabSingleThreadPage(self.browser, self.course_id, thread_id) # pylint: disable=W0201
|
self.thread_page = DiscussionTabSingleThreadPage(self.browser, self.course_id, thread_id) # pylint: disable=attribute-defined-outside-init
|
||||||
self.thread_page.visit()
|
self.thread_page.visit()
|
||||||
|
|
||||||
def test_marked_answer_comments(self):
|
def test_marked_answer_comments(self):
|
||||||
@@ -318,7 +318,7 @@ class InlineDiscussionTest(UniqueCourseTest, DiscussionResponsePaginationTestMix
|
|||||||
def setup_thread_page(self, thread_id):
|
def setup_thread_page(self, thread_id):
|
||||||
self.discussion_page.expand_discussion()
|
self.discussion_page.expand_discussion()
|
||||||
self.assertEqual(self.discussion_page.get_num_displayed_threads(), 1)
|
self.assertEqual(self.discussion_page.get_num_displayed_threads(), 1)
|
||||||
self.thread_page = InlineDiscussionThreadPage(self.browser, thread_id) # pylint: disable=W0201
|
self.thread_page = InlineDiscussionThreadPage(self.browser, thread_id) # pylint: disable=attribute-defined-outside-init
|
||||||
self.thread_page.expand()
|
self.thread_page.expand()
|
||||||
|
|
||||||
def test_initial_render(self):
|
def test_initial_render(self):
|
||||||
|
|||||||
@@ -608,7 +608,7 @@ class ViewInStudioTest(ModuleStoreTestCase):
|
|||||||
|
|
||||||
self.module = self._get_module(course.id, descriptor, descriptor.location)
|
self.module = self._get_module(course.id, descriptor, descriptor.location)
|
||||||
|
|
||||||
# pylint: disable=W0201
|
# pylint: disable=attribute-defined-outside-init
|
||||||
self.child_module = self._get_module(course.id, child_descriptor, child_descriptor.location)
|
self.child_module = self._get_module(course.id, child_descriptor, child_descriptor.location)
|
||||||
|
|
||||||
def setup_xml_course(self):
|
def setup_xml_course(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user