Skip to content
Snippets Groups Projects
Commit 7321e9e5 authored by Awais Qureshi's avatar Awais Qureshi
Browse files

BOM-2338

Apply pylint-amnesty.
parent 047a5f5f
No related branches found
No related tags found
No related merge requests found
Showing with 21 additions and 21 deletions
""" """ # lint-amnesty, pylint: disable=django-not-configured
This is the root package for Open edX. The intent is that all importable code 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, from Open edX will eventually live here, including the code in the lms, cms,
and common directories. and common directories.
......
...@@ -25,7 +25,7 @@ class RemoteContextPlugin(object): ...@@ -25,7 +25,7 @@ class RemoteContextPlugin(object):
def pytest_runtest_call(self, item): def pytest_runtest_call(self, item):
self.doit(item, "call") self.doit(item, "call")
def doit(self, item, when): def doit(self, item, when): # lint-amnesty, pylint: disable=missing-function-docstring
if self.active: if self.active:
for cfg in Env.BOK_CHOY_SERVERS.values(): for cfg in Env.BOK_CHOY_SERVERS.values():
result = requests.post( result = requests.post(
......
...@@ -47,7 +47,7 @@ class ScorableCompletionHandlerTestCase(CompletionSetUpMixin, TestCase): ...@@ -47,7 +47,7 @@ class ScorableCompletionHandlerTestCase(CompletionSetUpMixin, TestCase):
COMPLETION_SWITCH_ENABLED = True COMPLETION_SWITCH_ENABLED = True
def setUp(self): 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') 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): def call_scorable_block_completion_handler(self, block_key, score_deleted=None):
...@@ -143,7 +143,7 @@ class DisabledCompletionHandlerTestCase(CompletionSetUpMixin, TestCase): ...@@ -143,7 +143,7 @@ class DisabledCompletionHandlerTestCase(CompletionSetUpMixin, TestCase):
COMPLETION_SWITCH_ENABLED = False COMPLETION_SWITCH_ENABLED = False
def setUp(self): 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') self.block_key = self.context_key.make_usage_key(block_type='problem', block_id='red')
def test_disabled_handler_does_not_submit_completion(self): def test_disabled_handler_does_not_submit_completion(self):
......
...@@ -59,7 +59,7 @@ class SubmitCompletionTestCase(CompletionSetUpMixin, TestCase): ...@@ -59,7 +59,7 @@ class SubmitCompletionTestCase(CompletionSetUpMixin, TestCase):
semantics. semantics.
""" """
def setUp(self): def setUp(self):
super(SubmitCompletionTestCase, self).setUp() super(SubmitCompletionTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.override_waffle_switch(True) self.override_waffle_switch(True)
self.set_up_completion() self.set_up_completion()
...@@ -128,7 +128,7 @@ class CompletionDisabledTestCase(CompletionSetUpMixin, TestCase): ...@@ -128,7 +128,7 @@ class CompletionDisabledTestCase(CompletionSetUpMixin, TestCase):
Tests that completion API is not called when the feature is disabled. Tests that completion API is not called when the feature is disabled.
""" """
def setUp(self): def setUp(self):
super(CompletionDisabledTestCase, self).setUp() super(CompletionDisabledTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
# insert one completion record... # insert one completion record...
self.set_up_completion() self.set_up_completion()
# ...then disable the feature. # ...then disable the feature.
...@@ -152,7 +152,7 @@ class SubmitBatchCompletionTestCase(CompletionWaffleTestMixin, TestCase): ...@@ -152,7 +152,7 @@ class SubmitBatchCompletionTestCase(CompletionWaffleTestMixin, TestCase):
semantics. semantics.
""" """
def setUp(self): def setUp(self):
super(SubmitBatchCompletionTestCase, self).setUp() super(SubmitBatchCompletionTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.override_waffle_switch(True) self.override_waffle_switch(True)
self.block_key = UsageKey.from_string('block-v1:edx+test+run+type@video+block@doggos') self.block_key = UsageKey.from_string('block-v1:edx+test+run+type@video+block@doggos')
...@@ -194,7 +194,7 @@ class BatchCompletionMethodTests(CompletionWaffleTestMixin, TestCase): ...@@ -194,7 +194,7 @@ class BatchCompletionMethodTests(CompletionWaffleTestMixin, TestCase):
Tests for the classmethods that retrieve course/block completion data. Tests for the classmethods that retrieve course/block completion data.
""" """
def setUp(self): def setUp(self):
super(BatchCompletionMethodTests, self).setUp() super(BatchCompletionMethodTests, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.override_waffle_switch(True) self.override_waffle_switch(True)
self.user = UserFactory.create() self.user = UserFactory.create()
......
...@@ -80,7 +80,7 @@ class CompletionServiceTestCase(CompletionWaffleTestMixin, SharedModuleStoreTest ...@@ -80,7 +80,7 @@ class CompletionServiceTestCase(CompletionWaffleTestMixin, SharedModuleStoreTest
cls.problems = [cls.problem, cls.problem2, cls.problem3, cls.problem4, cls.problem5] cls.problems = [cls.problem, cls.problem2, cls.problem3, cls.problem4, cls.problem5]
def setUp(self): def setUp(self):
super(CompletionServiceTestCase, self).setUp() super(CompletionServiceTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.override_waffle_switch(True) self.override_waffle_switch(True)
self.user = UserFactory.create() self.user = UserFactory.create()
self.other_user = UserFactory.create() self.other_user = UserFactory.create()
......
...@@ -38,7 +38,7 @@ class CompletionBatchTestCase(CompletionWaffleTestMixin, ModuleStoreTestCase): ...@@ -38,7 +38,7 @@ class CompletionBatchTestCase(CompletionWaffleTestMixin, ModuleStoreTestCase):
""" """
Create the test data. 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') self.url = reverse('completion:v1:completion-batch')
# Enable the waffle flag for all tests # Enable the waffle flag for all tests
......
...@@ -4,11 +4,11 @@ Required in Django 1.9+ due to imports of models in stock Django apps. ...@@ -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 import tempfile
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from path import Path from path import Path # lint-amnesty, pylint: disable=unused-import
ALL_LANGUAGES = [] ALL_LANGUAGES = []
......
...@@ -66,7 +66,7 @@ class TestCrowdsourceHinter(SharedModuleStoreTestCase, LoginEnrollmentTestCase): ...@@ -66,7 +66,7 @@ class TestCrowdsourceHinter(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
) )
def setUp(self): 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): for idx, student in enumerate(self.STUDENTS):
username = "u{}".format(idx) username = "u{}".format(idx)
self.create_account(username, student['email'], student['password']) self.create_account(username, student['email'], student['password'])
......
...@@ -22,7 +22,7 @@ class DuplicateXBlockTest(Exception): ...@@ -22,7 +22,7 @@ class DuplicateXBlockTest(Exception):
effect deployed XBlocks. See discussion at: effect deployed XBlocks. See discussion at:
https://github.com/edx/edx-platform/pull/11032#discussion_r48097392). https://github.com/edx/edx-platform/pull/11032#discussion_r48097392).
''' '''
pass pass # lint-amnesty, pylint: disable=unnecessary-pass
class InvalidTestName(Exception): class InvalidTestName(Exception):
...@@ -33,7 +33,7 @@ class InvalidTestName(Exception): ...@@ -33,7 +33,7 @@ class InvalidTestName(Exception):
`DoneXBlock` instead of `TestDone`), or otherwise made an error, you `DoneXBlock` instead of `TestDone`), or otherwise made an error, you
will see this exception. will see this exception.
''' '''
pass pass # lint-amnesty, pylint: disable=unnecessary-pass
xblock_loaded = False # pylint: disable=invalid-name xblock_loaded = False # pylint: disable=invalid-name
......
...@@ -117,7 +117,7 @@ class TestRecommender(SharedModuleStoreTestCase, LoginEnrollmentTestCase): ...@@ -117,7 +117,7 @@ class TestRecommender(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
} }
def setUp(self): 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): for idx, student in enumerate(self.STUDENTS):
username = "u{}".format(idx) username = "u{}".format(idx)
self.create_account(username, student['email'], student['password']) self.create_account(username, student['email'], student['password'])
...@@ -228,7 +228,7 @@ class TestRecommenderCreateFromEmpty(TestRecommender): ...@@ -228,7 +228,7 @@ class TestRecommenderCreateFromEmpty(TestRecommender):
class TestRecommenderResourceBase(TestRecommender): class TestRecommenderResourceBase(TestRecommender):
"""Base helper class for tests with resources.""" """Base helper class for tests with resources."""
def setUp(self): 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 = self.resource_urls[0]
self.resource_id_second = self.resource_urls[1] self.resource_id_second = self.resource_urls[1]
self.non_existing_resource_id = 'An non-existing id' self.non_existing_resource_id = 'An non-existing id'
...@@ -634,7 +634,7 @@ class TestRecommenderFileUploading(TestRecommender): ...@@ -634,7 +634,7 @@ class TestRecommenderFileUploading(TestRecommender):
Check whether we can handle file uploading correctly Check whether we can handle file uploading correctly
""" """
def setUp(self): def setUp(self):
super(TestRecommenderFileUploading, self).setUp() super(TestRecommenderFileUploading, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.initial_configuration = { self.initial_configuration = {
'flagged_accum_resources': {}, 'flagged_accum_resources': {},
'endorsed_recommendation_reasons': [], 'endorsed_recommendation_reasons': [],
......
...@@ -101,7 +101,7 @@ class XBlockEventTestMixin(object): ...@@ -101,7 +101,7 @@ class XBlockEventTestMixin(object):
passed into it. 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__ saved_init = lms.djangoapps.lms_xblock.runtime.LmsModuleSystem.__init__
def patched_init(runtime_self, **kwargs): def patched_init(runtime_self, **kwargs):
...@@ -190,7 +190,7 @@ class GradePublishTestMixin(object): ...@@ -190,7 +190,7 @@ class GradePublishTestMixin(object):
''' '''
Hot-patch the grading emission system to capture grading events. 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): def capture_score(user_id, usage_key, score, max_score):
''' '''
...@@ -305,7 +305,7 @@ class XBlockStudentTestCaseMixin(object): ...@@ -305,7 +305,7 @@ class XBlockStudentTestCaseMixin(object):
users, so we exercise more corner cases, but we could users, so we exercise more corner cases, but we could
standardize if this is more hassle than it's worth. 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): for idx, student in enumerate(self.student_list):
username = "u{}".format(idx) username = "u{}".format(idx)
self._enroll_user(username, student['email'], student['password']) self._enroll_user(username, student['email'], student['password'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment