s/pylint: disable=W0201/pylint: disable=attribute-defined-outside-init/

This commit is contained in:
Sarina Canelake
2014-11-30 17:44:20 -05:00
parent 0c7b60b82b
commit 7aab4151bb
6 changed files with 9 additions and 9 deletions

View File

@@ -439,7 +439,7 @@ class LoncapaProblem(object):
# Note that the modifications has been done, avoiding problems if called twice.
if hasattr(self, 'has_targeted'):
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]'):
show_explanation = mult_choice_response.get('targeted-feedback') == 'alwaysShowCorrectChoiceExplanation'

View File

@@ -874,7 +874,7 @@ class MultipleChoiceResponse(LoncapaResponse):
# Both to avoid double-processing, and to feed the logs.
if self.has_shuffle():
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.
ordering = list(choicegroup.getchildren())
for choice in ordering:
@@ -958,7 +958,7 @@ class MultipleChoiceResponse(LoncapaResponse):
# Both to avoid double-processing, and to feed the logs.
if self.has_answerpool():
return
self._has_answerpool = True # pylint: disable=W0201
self._has_answerpool = True # pylint: disable=attribute-defined-outside-init
choices_list = list(choicegroup.getchildren())

View File

@@ -442,7 +442,7 @@ class MongoModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase, Mongo
# TODO (cpennington): Enable non-filesystem filestores
# pylint: disable=invalid-name
# pylint: disable=W0201
# pylint: disable=attribute-defined-outside-init
def __init__(self, contentstore, doc_store_config, fs_root, render_template,
default_class=None,
error_tracker=null_error_tracker,

View File

@@ -70,7 +70,7 @@ class DiscussionTabSingleThreadTest(UniqueCourseTest):
AutoAuthPage(self.browser, course_id=self.course_id).visit()
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()
# pylint: disable=unused-argument
@@ -129,7 +129,7 @@ class InlineDiscussionTest(UniqueCourseTest):
discussion_page = InlineDiscussionPage(self.browser, self.discussion_id)
discussion_page.expand_discussion()
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()
def refresh_thread_page(self, thread_id):

View File

@@ -127,7 +127,7 @@ class DiscussionTabSingleThreadTest(UniqueCourseTest, DiscussionResponsePaginati
AutoAuthPage(self.browser, course_id=self.course_id).visit()
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()
def test_marked_answer_comments(self):
@@ -318,7 +318,7 @@ class InlineDiscussionTest(UniqueCourseTest, DiscussionResponsePaginationTestMix
def setup_thread_page(self, thread_id):
self.discussion_page.expand_discussion()
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()
def test_initial_render(self):

View File

@@ -608,7 +608,7 @@ class ViewInStudioTest(ModuleStoreTestCase):
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)
def setup_xml_course(self):