diff --git a/openedx/__init__.py b/openedx/__init__.py index f3d7c7b8a8..e971697c39 100644 --- a/openedx/__init__.py +++ b/openedx/__init__.py @@ -1,4 +1,4 @@ -""" +""" # lint-amnesty, pylint: disable=django-not-configured This is the root package for Open edX. The intent is that all importable code from Open edX will eventually live here, including the code in the lms, cms, and common directories. diff --git a/openedx/testing/coverage_context_listener/pytest_plugin.py b/openedx/testing/coverage_context_listener/pytest_plugin.py index d18e530584..aa25ab0ca0 100644 --- a/openedx/testing/coverage_context_listener/pytest_plugin.py +++ b/openedx/testing/coverage_context_listener/pytest_plugin.py @@ -25,7 +25,7 @@ class RemoteContextPlugin(object): def pytest_runtest_call(self, item): self.doit(item, "call") - def doit(self, item, when): + def doit(self, item, when): # lint-amnesty, pylint: disable=missing-function-docstring if self.active: for cfg in Env.BOK_CHOY_SERVERS.values(): result = requests.post( diff --git a/openedx/tests/completion_integration/test_handlers.py b/openedx/tests/completion_integration/test_handlers.py index c0c95a533c..60057b1172 100644 --- a/openedx/tests/completion_integration/test_handlers.py +++ b/openedx/tests/completion_integration/test_handlers.py @@ -47,7 +47,7 @@ class ScorableCompletionHandlerTestCase(CompletionSetUpMixin, TestCase): COMPLETION_SWITCH_ENABLED = True def setUp(self): - super(ScorableCompletionHandlerTestCase, self).setUp() + super(ScorableCompletionHandlerTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments self.block_key = self.context_key.make_usage_key(block_type='problem', block_id='red') def call_scorable_block_completion_handler(self, block_key, score_deleted=None): @@ -143,7 +143,7 @@ class DisabledCompletionHandlerTestCase(CompletionSetUpMixin, TestCase): COMPLETION_SWITCH_ENABLED = False def setUp(self): - super(DisabledCompletionHandlerTestCase, self).setUp() + super(DisabledCompletionHandlerTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments self.block_key = self.context_key.make_usage_key(block_type='problem', block_id='red') def test_disabled_handler_does_not_submit_completion(self): diff --git a/openedx/tests/completion_integration/test_models.py b/openedx/tests/completion_integration/test_models.py index 6de84230c2..3a55eec28c 100644 --- a/openedx/tests/completion_integration/test_models.py +++ b/openedx/tests/completion_integration/test_models.py @@ -59,7 +59,7 @@ class SubmitCompletionTestCase(CompletionSetUpMixin, TestCase): semantics. """ def setUp(self): - super(SubmitCompletionTestCase, self).setUp() + super(SubmitCompletionTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments self.override_waffle_switch(True) self.set_up_completion() @@ -128,7 +128,7 @@ class CompletionDisabledTestCase(CompletionSetUpMixin, TestCase): Tests that completion API is not called when the feature is disabled. """ def setUp(self): - super(CompletionDisabledTestCase, self).setUp() + super(CompletionDisabledTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments # insert one completion record... self.set_up_completion() # ...then disable the feature. @@ -152,7 +152,7 @@ class SubmitBatchCompletionTestCase(CompletionWaffleTestMixin, TestCase): semantics. """ def setUp(self): - super(SubmitBatchCompletionTestCase, self).setUp() + super(SubmitBatchCompletionTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments self.override_waffle_switch(True) self.block_key = UsageKey.from_string('block-v1:edx+test+run+type@video+block@doggos') @@ -194,7 +194,7 @@ class BatchCompletionMethodTests(CompletionWaffleTestMixin, TestCase): Tests for the classmethods that retrieve course/block completion data. """ def setUp(self): - super(BatchCompletionMethodTests, self).setUp() + super(BatchCompletionMethodTests, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments self.override_waffle_switch(True) self.user = UserFactory.create() diff --git a/openedx/tests/completion_integration/test_services.py b/openedx/tests/completion_integration/test_services.py index dcdc07e37c..4f6256d2f3 100644 --- a/openedx/tests/completion_integration/test_services.py +++ b/openedx/tests/completion_integration/test_services.py @@ -80,7 +80,7 @@ class CompletionServiceTestCase(CompletionWaffleTestMixin, SharedModuleStoreTest cls.problems = [cls.problem, cls.problem2, cls.problem3, cls.problem4, cls.problem5] def setUp(self): - super(CompletionServiceTestCase, self).setUp() + super(CompletionServiceTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments self.override_waffle_switch(True) self.user = UserFactory.create() self.other_user = UserFactory.create() diff --git a/openedx/tests/completion_integration/test_views.py b/openedx/tests/completion_integration/test_views.py index 2ffcd87344..c9c69f69f4 100644 --- a/openedx/tests/completion_integration/test_views.py +++ b/openedx/tests/completion_integration/test_views.py @@ -38,7 +38,7 @@ class CompletionBatchTestCase(CompletionWaffleTestMixin, ModuleStoreTestCase): """ Create the test data. """ - super(CompletionBatchTestCase, self).setUp() + super(CompletionBatchTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments self.url = reverse('completion:v1:completion-batch') # Enable the waffle flag for all tests diff --git a/openedx/tests/settings.py b/openedx/tests/settings.py index fd4f3469cc..ecafde0ae5 100644 --- a/openedx/tests/settings.py +++ b/openedx/tests/settings.py @@ -4,11 +4,11 @@ Required in Django 1.9+ due to imports of models in stock Django apps. """ -import sys +import sys # lint-amnesty, pylint: disable=unused-import import tempfile from django.utils.translation import ugettext_lazy as _ -from path import Path +from path import Path # lint-amnesty, pylint: disable=unused-import ALL_LANGUAGES = [] diff --git a/openedx/tests/xblock_integration/test_crowdsource_hinter.py b/openedx/tests/xblock_integration/test_crowdsource_hinter.py index 26aaee512d..88f68dcbc6 100644 --- a/openedx/tests/xblock_integration/test_crowdsource_hinter.py +++ b/openedx/tests/xblock_integration/test_crowdsource_hinter.py @@ -66,7 +66,7 @@ class TestCrowdsourceHinter(SharedModuleStoreTestCase, LoginEnrollmentTestCase): ) def setUp(self): - super(TestCrowdsourceHinter, self).setUp() + super(TestCrowdsourceHinter, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments for idx, student in enumerate(self.STUDENTS): username = "u{}".format(idx) self.create_account(username, student['email'], student['password']) diff --git a/openedx/tests/xblock_integration/test_external_xblocks.py b/openedx/tests/xblock_integration/test_external_xblocks.py index d3fa7f08a0..e4bc938884 100644 --- a/openedx/tests/xblock_integration/test_external_xblocks.py +++ b/openedx/tests/xblock_integration/test_external_xblocks.py @@ -22,7 +22,7 @@ class DuplicateXBlockTest(Exception): effect deployed XBlocks. See discussion at: https://github.com/edx/edx-platform/pull/11032#discussion_r48097392). ''' - pass + pass # lint-amnesty, pylint: disable=unnecessary-pass class InvalidTestName(Exception): @@ -33,7 +33,7 @@ class InvalidTestName(Exception): `DoneXBlock` instead of `TestDone`), or otherwise made an error, you will see this exception. ''' - pass + pass # lint-amnesty, pylint: disable=unnecessary-pass xblock_loaded = False # pylint: disable=invalid-name diff --git a/openedx/tests/xblock_integration/test_recommender.py b/openedx/tests/xblock_integration/test_recommender.py index 88cd20a7c5..bb5442c595 100644 --- a/openedx/tests/xblock_integration/test_recommender.py +++ b/openedx/tests/xblock_integration/test_recommender.py @@ -117,7 +117,7 @@ class TestRecommender(SharedModuleStoreTestCase, LoginEnrollmentTestCase): } def setUp(self): - super(TestRecommender, self).setUp() + super(TestRecommender, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments for idx, student in enumerate(self.STUDENTS): username = "u{}".format(idx) self.create_account(username, student['email'], student['password']) @@ -228,7 +228,7 @@ class TestRecommenderCreateFromEmpty(TestRecommender): class TestRecommenderResourceBase(TestRecommender): """Base helper class for tests with resources.""" def setUp(self): - super(TestRecommenderResourceBase, self).setUp() + super(TestRecommenderResourceBase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments self.resource_id = self.resource_urls[0] self.resource_id_second = self.resource_urls[1] self.non_existing_resource_id = 'An non-existing id' @@ -634,7 +634,7 @@ class TestRecommenderFileUploading(TestRecommender): Check whether we can handle file uploading correctly """ def setUp(self): - super(TestRecommenderFileUploading, self).setUp() + super(TestRecommenderFileUploading, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments self.initial_configuration = { 'flagged_accum_resources': {}, 'endorsed_recommendation_reasons': [], diff --git a/openedx/tests/xblock_integration/xblock_testcase.py b/openedx/tests/xblock_integration/xblock_testcase.py index 961d0d8b8b..abd09eec4d 100644 --- a/openedx/tests/xblock_integration/xblock_testcase.py +++ b/openedx/tests/xblock_integration/xblock_testcase.py @@ -101,7 +101,7 @@ class XBlockEventTestMixin(object): passed into it. """ - super(XBlockEventTestMixin, self).setUp() + super(XBlockEventTestMixin, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments saved_init = lms.djangoapps.lms_xblock.runtime.LmsModuleSystem.__init__ def patched_init(runtime_self, **kwargs): @@ -190,7 +190,7 @@ class GradePublishTestMixin(object): ''' Hot-patch the grading emission system to capture grading events. ''' - super(GradePublishTestMixin, self).setUp() + super(GradePublishTestMixin, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments def capture_score(user_id, usage_key, score, max_score): ''' @@ -305,7 +305,7 @@ class XBlockStudentTestCaseMixin(object): users, so we exercise more corner cases, but we could standardize if this is more hassle than it's worth. """ - super(XBlockStudentTestCaseMixin, self).setUp() + super(XBlockStudentTestCaseMixin, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments for idx, student in enumerate(self.student_list): username = "u{}".format(idx) self._enroll_user(username, student['email'], student['password'])