From 7aab4151bb93054ea4c7cbc807ac4e398d55be6c Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 17:44:20 -0500 Subject: [PATCH] s/pylint: disable=W0201/pylint: disable=attribute-defined-outside-init/ --- common/lib/capa/capa/capa_problem.py | 2 +- common/lib/capa/capa/responsetypes.py | 4 ++-- common/lib/xmodule/xmodule/modulestore/mongo/base.py | 2 +- common/test/acceptance/tests/discussion/test_cohorts.py | 4 ++-- common/test/acceptance/tests/discussion/test_discussion.py | 4 ++-- lms/djangoapps/courseware/tests/test_module_render.py | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/lib/capa/capa/capa_problem.py b/common/lib/capa/capa/capa_problem.py index 7b3dbbe79f..699db9aaf3 100644 --- a/common/lib/capa/capa/capa_problem.py +++ b/common/lib/capa/capa/capa_problem.py @@ -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' diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index 3ba560342b..a0b74372e2 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -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()) diff --git a/common/lib/xmodule/xmodule/modulestore/mongo/base.py b/common/lib/xmodule/xmodule/modulestore/mongo/base.py index 9865491599..9f5a09aee3 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo/base.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo/base.py @@ -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, diff --git a/common/test/acceptance/tests/discussion/test_cohorts.py b/common/test/acceptance/tests/discussion/test_cohorts.py index d63afd00e1..0fed9573a6 100644 --- a/common/test/acceptance/tests/discussion/test_cohorts.py +++ b/common/test/acceptance/tests/discussion/test_cohorts.py @@ -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): diff --git a/common/test/acceptance/tests/discussion/test_discussion.py b/common/test/acceptance/tests/discussion/test_discussion.py index 8b2c887ed2..7d8f188f6a 100644 --- a/common/test/acceptance/tests/discussion/test_discussion.py +++ b/common/test/acceptance/tests/discussion/test_discussion.py @@ -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): diff --git a/lms/djangoapps/courseware/tests/test_module_render.py b/lms/djangoapps/courseware/tests/test_module_render.py index 7de4d93108..a08902eb50 100644 --- a/lms/djangoapps/courseware/tests/test_module_render.py +++ b/lms/djangoapps/courseware/tests/test_module_render.py @@ -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):