diff --git a/openedx/__init__.py b/openedx/__init__.py index f3d7c7b8a88500b9240e3b8f9fd378a0629aa94c..e971697c394d229bbddfb39c350da040c3cbeda4 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 d18e530584e527fb90703cb19708e2ea789313ee..aa25ab0ca07ace80715454f11bc6f8407b3020f3 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 c0c95a533caa65aab591540d9b98a312702bcb1e..60057b117214575e37978eb0ee342ac23a334eff 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 6de84230c2600c523793ab5e50deaf47adcaf92b..3a55eec28c87f2fbaed7992a6c9f23faa726b908 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 dcdc07e37c443f1f202d9e6f8b1a240acf0a1e08..4f6256d2f3527d85ab441ac04fa17b6197d4f9cd 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 2ffcd873444dea5a78f76c741fa1dae76ec0ddcc..c9c69f69f477a045992050c6a9934e266a70f23d 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 fd4f3469cc5f3d67de81c14d3f8c43b7f71bd7e9..ecafde0ae5d8703ba504b8fadd637a1941b26daa 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 26aaee512dcb73ef9fb54584366c4fb26ad684f1..88f68dcbc6ebd6b1f6fd6555499625e9bde220bf 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 d3fa7f08a02565046173a6108d6c480155550535..e4bc93888480099e00c2d8378fd620cf23678253 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 88cd20a7c503cfbb934ba530f3e33bd33a9832e3..bb5442c595aaf6fc70b1b5cf96305d1fc4bd0645 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 961d0d8b8b7525986d9ea12e24007a1f30396717..abd09eec4de1a5f44bc6c2c9e8eb600910247856 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'])