diff --git a/cms/__init__.py b/cms/__init__.py
index e022c752ac..f9ed0bb3ce 100644
--- a/cms/__init__.py
+++ b/cms/__init__.py
@@ -21,4 +21,4 @@ kombu.utils.entrypoints = lambda namespace: iter([])
# This will make sure the app is always imported when Django starts so
# that shared_task will use this app, and also ensures that the celery
# singleton is always configured for the CMS.
-from .celery import APP as CELERY_APP
+from .celery import APP as CELERY_APP # lint-amnesty, pylint: disable=wrong-import-position
diff --git a/cms/celery.py b/cms/celery.py
index 293121bcf2..15d1e0beb0 100644
--- a/cms/celery.py
+++ b/cms/celery.py
@@ -1,4 +1,4 @@
-"""
+""" # lint-amnesty, pylint: disable=django-not-configured
Import celery, load its settings from the django settings
and auto discover tasks in all installed django apps.
diff --git a/cms/conftest.py b/cms/conftest.py
index f66b4c4f54..ca29e3fb5f 100644
--- a/cms/conftest.py
+++ b/cms/conftest.py
@@ -53,7 +53,7 @@ def _django_clear_site_cache():
clearing mechanism actually works. So override this fixture to not mess
with what has been working for us so far.
"""
- pass
+ pass # lint-amnesty, pylint: disable=unnecessary-pass
@pytest.fixture(autouse=True)
diff --git a/cms/djangoapps/course_creators/admin.py b/cms/djangoapps/course_creators/admin.py
index 5b607eb603..3c41cd5370 100644
--- a/cms/djangoapps/course_creators/admin.py
+++ b/cms/djangoapps/course_creators/admin.py
@@ -80,7 +80,7 @@ admin.site.register(CourseCreator, CourseCreatorAdmin)
@receiver(update_creator_state, sender=CourseCreator)
-def update_creator_group_callback(sender, **kwargs):
+def update_creator_group_callback(sender, **kwargs): # lint-amnesty, pylint: disable=unused-argument
"""
Callback for when the model's creator status has changed.
"""
@@ -90,7 +90,7 @@ def update_creator_group_callback(sender, **kwargs):
@receiver(send_user_notification, sender=CourseCreator)
-def send_user_notification_callback(sender, **kwargs):
+def send_user_notification_callback(sender, **kwargs): # lint-amnesty, pylint: disable=unused-argument
"""
Callback for notifying user about course creator status change.
"""
@@ -113,12 +113,12 @@ def send_user_notification_callback(sender, **kwargs):
try:
user.email_user(subject, message, studio_request_email)
- except:
+ except: # lint-amnesty, pylint: disable=bare-except
log.warning(u"Unable to send course creator status e-mail to %s", user.email)
@receiver(send_admin_notification, sender=CourseCreator)
-def send_admin_notification_callback(sender, **kwargs):
+def send_admin_notification_callback(sender, **kwargs): # lint-amnesty, pylint: disable=unused-argument
"""
Callback for notifying admin of a user in the 'pending' state.
"""
diff --git a/cms/djangoapps/course_creators/models.py b/cms/djangoapps/course_creators/models.py
index bfb09a0c30..2b2c8a0129 100644
--- a/cms/djangoapps/course_creators/models.py
+++ b/cms/djangoapps/course_creators/models.py
@@ -3,7 +3,7 @@ Table for storing information about whether or not Studio users have course crea
"""
-from django.contrib.auth.models import User
+from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user
from django.db import models
from django.db.models.signals import post_init, post_save
from django.dispatch import Signal, receiver
@@ -54,7 +54,7 @@ class CourseCreator(models.Model):
@receiver(post_init, sender=CourseCreator)
-def post_init_callback(sender, **kwargs):
+def post_init_callback(sender, **kwargs): # lint-amnesty, pylint: disable=unused-argument
"""
Extend to store previous state.
"""
diff --git a/cms/djangoapps/course_creators/tests/test_admin.py b/cms/djangoapps/course_creators/tests/test_admin.py
index 4905e90bb8..75c329306b 100644
--- a/cms/djangoapps/course_creators/tests/test_admin.py
+++ b/cms/djangoapps/course_creators/tests/test_admin.py
@@ -5,7 +5,7 @@ Tests course_creators.admin.py.
import mock
from django.contrib.admin.sites import AdminSite
-from django.contrib.auth.models import User
+from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user
from django.core import mail
from django.http import HttpRequest
from django.test import TestCase
@@ -29,7 +29,7 @@ class CourseCreatorAdminTest(TestCase):
def setUp(self):
""" Test case setup """
- super(CourseCreatorAdminTest, self).setUp()
+ super(CourseCreatorAdminTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.user = User.objects.create_user('test_user', 'test_user+courses@edx.org', 'foo')
self.table_entry = CourseCreator(user=self.user)
self.table_entry.save()
diff --git a/cms/djangoapps/course_creators/tests/test_views.py b/cms/djangoapps/course_creators/tests/test_views.py
index 78493ce857..7618c207ee 100644
--- a/cms/djangoapps/course_creators/tests/test_views.py
+++ b/cms/djangoapps/course_creators/tests/test_views.py
@@ -4,7 +4,7 @@ Tests course_creators.views.py.
import mock
-from django.contrib.auth.models import User
+from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user
from django.core.exceptions import PermissionDenied
from django.test import TestCase
from django.urls import reverse
@@ -27,7 +27,7 @@ class CourseCreatorView(TestCase):
def setUp(self):
""" Test case setup """
- super(CourseCreatorView, self).setUp()
+ super(CourseCreatorView, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.user = User.objects.create_user('test_user', 'test_user+courses@edx.org', 'foo')
self.admin = User.objects.create_user('Mark', 'admin+courses@edx.org', 'foo')
self.admin.is_staff = True
diff --git a/cms/djangoapps/maintenance/tests.py b/cms/djangoapps/maintenance/tests.py
index 6200aa8e1e..c324be9b1d 100644
--- a/cms/djangoapps/maintenance/tests.py
+++ b/cms/djangoapps/maintenance/tests.py
@@ -30,7 +30,7 @@ class TestMaintenanceIndex(ModuleStoreTestCase):
"""
def setUp(self):
- super(TestMaintenanceIndex, self).setUp()
+ super(TestMaintenanceIndex, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.user = AdminFactory()
login_success = self.client.login(username=self.user.username, password='test')
self.assertTrue(login_success)
@@ -56,7 +56,7 @@ class MaintenanceViewTestCase(ModuleStoreTestCase):
view_url = ''
def setUp(self):
- super(MaintenanceViewTestCase, self).setUp()
+ super(MaintenanceViewTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.user = AdminFactory()
login_success = self.client.login(username=self.user.username, password='test')
self.assertTrue(login_success)
@@ -73,7 +73,7 @@ class MaintenanceViewTestCase(ModuleStoreTestCase):
Reverse the setup.
"""
self.client.logout()
- super(MaintenanceViewTestCase, self).tearDown()
+ super(MaintenanceViewTestCase, self).tearDown() # lint-amnesty, pylint: disable=super-with-arguments
@ddt.ddt
@@ -131,7 +131,7 @@ class TestForcePublish(MaintenanceViewTestCase):
"""
def setUp(self):
- super(TestForcePublish, self).setUp()
+ super(TestForcePublish, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.view_url = reverse('maintenance:force_publish_course')
def setup_test_course(self):
@@ -271,7 +271,7 @@ class TestAnnouncementsViews(MaintenanceViewTestCase):
"""
def setUp(self):
- super(TestAnnouncementsViews, self).setUp()
+ super(TestAnnouncementsViews, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.admin = AdminFactory.create(
email='staff@edx.org',
username='admin',
diff --git a/cms/djangoapps/maintenance/views.py b/cms/djangoapps/maintenance/views.py
index 207966960e..ba80d6500c 100644
--- a/cms/djangoapps/maintenance/views.py
+++ b/cms/djangoapps/maintenance/views.py
@@ -84,7 +84,7 @@ class MaintenanceBaseView(View):
template = 'maintenance/container.html'
def __init__(self, view=None):
- super(MaintenanceBaseView, self).__init__()
+ super(MaintenanceBaseView, self).__init__() # lint-amnesty, pylint: disable=super-with-arguments
self.context = {
'view': view if view else '',
'form_data': {},
@@ -142,7 +142,7 @@ class ForcePublishCourseView(MaintenanceBaseView):
"""
def __init__(self):
- super(ForcePublishCourseView, self).__init__(MAINTENANCE_VIEWS['force_publish_course'])
+ super(ForcePublishCourseView, self).__init__(MAINTENANCE_VIEWS['force_publish_course']) # lint-amnesty, pylint: disable=super-with-arguments
self.context.update({
'current_versions': [],
'updated_versions': [],
@@ -238,7 +238,7 @@ class AnnouncementBaseView(View):
@method_decorator(require_global_staff)
def dispatch(self, request, *args, **kwargs):
- return super(AnnouncementBaseView, self).dispatch(request, *args, **kwargs)
+ return super(AnnouncementBaseView, self).dispatch(request, *args, **kwargs) # lint-amnesty, pylint: disable=super-with-arguments
class AnnouncementIndexView(ListView, MaintenanceBaseView):
@@ -251,10 +251,10 @@ class AnnouncementIndexView(ListView, MaintenanceBaseView):
paginate_by = 8
def __init__(self):
- super(AnnouncementIndexView, self).__init__(MAINTENANCE_VIEWS['announcement_index'])
+ super(AnnouncementIndexView, self).__init__(MAINTENANCE_VIEWS['announcement_index']) # lint-amnesty, pylint: disable=super-with-arguments
def get_context_data(self, **kwargs):
- context = super(AnnouncementIndexView, self).get_context_data(**kwargs)
+ context = super(AnnouncementIndexView, self).get_context_data(**kwargs) # lint-amnesty, pylint: disable=super-with-arguments
context['view'] = MAINTENANCE_VIEWS['announcement_index']
return context
@@ -274,7 +274,7 @@ class AnnouncementEditView(UpdateView, AnnouncementBaseView):
template_name = '/maintenance/_announcement_edit.html'
def get_context_data(self, **kwargs):
- context = super(AnnouncementEditView, self).get_context_data(**kwargs)
+ context = super(AnnouncementEditView, self).get_context_data(**kwargs) # lint-amnesty, pylint: disable=super-with-arguments
context['action_url'] = reverse('maintenance:announcement_edit', kwargs={'pk': context['announcement'].pk})
return context
@@ -289,7 +289,7 @@ class AnnouncementCreateView(CreateView, AnnouncementBaseView):
template_name = '/maintenance/_announcement_edit.html'
def get_context_data(self, **kwargs):
- context = super(AnnouncementCreateView, self).get_context_data(**kwargs)
+ context = super(AnnouncementCreateView, self).get_context_data(**kwargs) # lint-amnesty, pylint: disable=super-with-arguments
context['action_url'] = reverse('maintenance:announcement_create')
return context
diff --git a/cms/djangoapps/models/settings/course_grading.py b/cms/djangoapps/models/settings/course_grading.py
index 3cc7ff00df..738b31f2fe 100644
--- a/cms/djangoapps/models/settings/course_grading.py
+++ b/cms/djangoapps/models/settings/course_grading.py
@@ -235,7 +235,7 @@ class CourseGradingModel(object):
# 'minimum_grade_credit' cannot be set to None
if minimum_grade_credit is not None:
- minimum_grade_credit = minimum_grade_credit
+ minimum_grade_credit = minimum_grade_credit # lint-amnesty, pylint: disable=self-assigning-variable
descriptor.minimum_grade_credit = minimum_grade_credit
modulestore().update_item(descriptor, user.id)
@@ -276,7 +276,7 @@ class CourseGradingModel(object):
}
@staticmethod
- def update_section_grader_type(descriptor, grader_type, user):
+ def update_section_grader_type(descriptor, grader_type, user): # lint-amnesty, pylint: disable=missing-function-docstring
if grader_type is not None and grader_type != u'notgraded':
descriptor.format = grader_type
descriptor.graded = True
@@ -289,7 +289,7 @@ class CourseGradingModel(object):
return {'graderType': grader_type}
@staticmethod
- def convert_set_grace_period(descriptor):
+ def convert_set_grace_period(descriptor): # lint-amnesty, pylint: disable=missing-function-docstring
# 5 hours 59 minutes 59 seconds => converted to iso format
rawgrace = descriptor.graceperiod
if rawgrace:
@@ -316,7 +316,7 @@ class CourseGradingModel(object):
return None
@staticmethod
- def parse_grader(json_grader):
+ def parse_grader(json_grader): # lint-amnesty, pylint: disable=missing-function-docstring
# manual to clear out kruft
result = {"type": json_grader["type"],
"min_count": int(json_grader.get('min_count', 0)),
@@ -328,7 +328,7 @@ class CourseGradingModel(object):
return result
@staticmethod
- def jsonize_grader(i, grader):
+ def jsonize_grader(i, grader): # lint-amnesty, pylint: disable=missing-function-docstring
# Warning: converting weight to integer might give unwanted results due
# to the reason how floating point arithmetic works
# e.g, "0.29 * 100 = 28.999999999999996"
@@ -342,7 +342,7 @@ class CourseGradingModel(object):
}
-def _grading_event_and_signal(course_key, user_id):
+def _grading_event_and_signal(course_key, user_id): # lint-amnesty, pylint: disable=missing-function-docstring
name = GRADING_POLICY_CHANGED_EVENT_TYPE
course = modulestore().get_course(course_key)
grading_policy_hash = six.text_type(hash_grading_policy(course.grading_policy))
@@ -362,7 +362,7 @@ def _grading_event_and_signal(course_key, user_id):
)
-def hash_grading_policy(grading_policy):
+def hash_grading_policy(grading_policy): # lint-amnesty, pylint: disable=missing-function-docstring
ordered_policy = json.dumps(
grading_policy,
separators=(',', ':'), # Remove spaces from separators for more compact representation
diff --git a/cms/djangoapps/models/settings/course_metadata.py b/cms/djangoapps/models/settings/course_metadata.py
index cd3e5d5884..534f182799 100644
--- a/cms/djangoapps/models/settings/course_metadata.py
+++ b/cms/djangoapps/models/settings/course_metadata.py
@@ -173,14 +173,14 @@ class CourseMetadata(object):
if field.scope != Scope.settings:
continue
- field_help = _(field.help)
+ field_help = _(field.help) # lint-amnesty, pylint: disable=translation-of-non-string
help_args = field.runtime_options.get('help_format_args')
if help_args is not None:
field_help = field_help.format(**help_args)
result[field.name] = {
'value': field.read_json(descriptor),
- 'display_name': _(field.display_name),
+ 'display_name': _(field.display_name), # lint-amnesty, pylint: disable=translation-of-non-string
'help': field_help,
'deprecated': field.runtime_options.get('deprecated', False),
'hide_on_enabled_publisher': field.runtime_options.get('hide_on_enabled_publisher', False)
@@ -211,7 +211,7 @@ class CourseMetadata(object):
if hasattr(descriptor, key) and getattr(descriptor, key) != val:
key_values[key] = descriptor.fields[key].from_json(val)
except (TypeError, ValueError) as err:
- raise ValueError(_(u"Incorrect format for field '{name}'. {detailed_message}").format(
+ raise ValueError(_(u"Incorrect format for field '{name}'. {detailed_message}").format( # lint-amnesty, pylint: disable=raise-missing-from
name=model['display_name'], detailed_message=text_type(err)))
return cls.update_from_dict(key_values, descriptor, user)
diff --git a/cms/djangoapps/models/settings/encoder.py b/cms/djangoapps/models/settings/encoder.py
index 8451207a35..133ae1fda0 100644
--- a/cms/djangoapps/models/settings/encoder.py
+++ b/cms/djangoapps/models/settings/encoder.py
@@ -20,7 +20,7 @@ class CourseSettingsEncoder(json.JSONEncoder):
Serialize CourseDetails, CourseGradingModel, datetime, and old
Locations
"""
- def default(self, obj): # pylint: disable=method-hidden
+ def default(self, obj): # lint-amnesty, pylint: disable=arguments-differ, method-hidden
if isinstance(obj, (CourseDetails, CourseGradingModel)):
return obj.__dict__
elif isinstance(obj, Location):
diff --git a/cms/djangoapps/xblock_config/tests/test_models.py b/cms/djangoapps/xblock_config/tests/test_models.py
index 4fe2c88f1e..7b6c4db288 100644
--- a/cms/djangoapps/xblock_config/tests/test_models.py
+++ b/cms/djangoapps/xblock_config/tests/test_models.py
@@ -34,7 +34,7 @@ class TestLTIConsumerHideFieldsFlag(TestCase):
These are set via Django admin settings.
"""
def setUp(self):
- super(TestLTIConsumerHideFieldsFlag, self).setUp()
+ super(TestLTIConsumerHideFieldsFlag, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.course_id = CourseLocator(org="edx", course="course", run="run")
@ddt.data(
diff --git a/cms/envs/devstack.py b/cms/envs/devstack.py
index cf538ec1a7..5e371e6315 100644
--- a/cms/envs/devstack.py
+++ b/cms/envs/devstack.py
@@ -107,7 +107,7 @@ DEBUG_TOOLBAR_CONFIG = {
}
-def should_show_debug_toolbar(request):
+def should_show_debug_toolbar(request): # lint-amnesty, pylint: disable=missing-function-docstring
# We always want the toolbar on devstack unless running tests from another Docker container
hostname = request.get_host()
if hostname.startswith('edx.devstack.studio:') or hostname.startswith('studio.devstack.edx:'):
@@ -195,7 +195,7 @@ JWT_AUTH.update({
),
})
-# pylint: enable=unicode-format-string
+# pylint: enable=unicode-format-string # lint-amnesty, pylint: disable=bad-option-value
IDA_LOGOUT_URI_LIST = [
'http://localhost:18130/logout/', # ecommerce
diff --git a/cms/envs/devstack_decentralized.py b/cms/envs/devstack_decentralized.py
index 40f1d01799..48c8937a4e 100644
--- a/cms/envs/devstack_decentralized.py
+++ b/cms/envs/devstack_decentralized.py
@@ -150,7 +150,7 @@ JWT_AUTH.update({
),
})
-# pylint: enable=unicode-format-string
+# pylint: enable=unicode-format-string # lint-amnesty, pylint: disable=bad-option-value
IDA_LOGOUT_URI_LIST = [
'http://localhost:18130/logout/', # ecommerce
diff --git a/cms/envs/devstack_optimized.py b/cms/envs/devstack_optimized.py
index d869e53620..d81ef1502f 100644
--- a/cms/envs/devstack_optimized.py
+++ b/cms/envs/devstack_optimized.py
@@ -19,7 +19,7 @@ invoked each time that changes have been made.
"""
-import os
+import os # lint-amnesty, pylint: disable=unused-import
########################## Devstack settings ###################################
diff --git a/cms/envs/devstack_with_worker.py b/cms/envs/devstack_with_worker.py
index 1265492b71..193c2a8075 100644
--- a/cms/envs/devstack_with_worker.py
+++ b/cms/envs/devstack_with_worker.py
@@ -12,7 +12,7 @@ In two separate processes on devstack:
"""
-import os
+import os # lint-amnesty, pylint: disable=unused-import
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
diff --git a/cms/envs/production.py b/cms/envs/production.py
index c07b0c9ddd..818395b707 100644
--- a/cms/envs/production.py
+++ b/cms/envs/production.py
@@ -22,9 +22,9 @@ from openedx.core.djangoapps.plugins.constants import ProjectType, SettingsType
from .common import *
-from openedx.core.lib.derived import derive_settings
-from openedx.core.lib.logsettings import get_logger_config
-from xmodule.modulestore.modulestore_settings import convert_module_store_setting_if_needed
+from openedx.core.lib.derived import derive_settings # lint-amnesty, pylint: disable=wrong-import-order
+from openedx.core.lib.logsettings import get_logger_config # lint-amnesty, pylint: disable=wrong-import-order
+from xmodule.modulestore.modulestore_settings import convert_module_store_setting_if_needed # lint-amnesty, pylint: disable=wrong-import-order
def get_env_setting(setting):
@@ -33,7 +33,7 @@ def get_env_setting(setting):
return os.environ[setting]
except KeyError:
error_msg = u"Set the %s env variable" % setting
- raise ImproperlyConfigured(error_msg)
+ raise ImproperlyConfigured(error_msg) # lint-amnesty, pylint: disable=raise-missing-from
############### ALWAYS THE SAME ################################
diff --git a/cms/envs/test.py b/cms/envs/test.py
index 5cc0f0f005..9d99251684 100644
--- a/cms/envs/test.py
+++ b/cms/envs/test.py
@@ -75,7 +75,7 @@ COMMON_TEST_DATA_ROOT = COMMON_ROOT / "test" / "data"
FEATURES['ENABLE_EXPORT_GIT'] = True
GIT_REPO_EXPORT_DIR = TEST_ROOT / "export_course_repos"
-# TODO (cpennington): We need to figure out how envs/test.py can inject things into common.py so that we don't have to repeat this sort of thing
+# TODO (cpennington): We need to figure out how envs/test.py can inject things into common.py so that we don't have to repeat this sort of thing # lint-amnesty, pylint: disable=line-too-long
STATICFILES_DIRS = [
COMMON_ROOT / "static",
PROJECT_ROOT / "static",
diff --git a/cms/lib/xblock/field_data.py b/cms/lib/xblock/field_data.py
index dc687e257e..d00425d613 100644
--- a/cms/lib/xblock/field_data.py
+++ b/cms/lib/xblock/field_data.py
@@ -21,7 +21,7 @@ class CmsFieldData(SplitFieldData):
self._authored_data = authored_data
self._student_data = student_data
- super(CmsFieldData, self).__init__({
+ super(CmsFieldData, self).__init__({ # lint-amnesty, pylint: disable=super-with-arguments
Scope.content: authored_data,
Scope.settings: authored_data,
Scope.parent: authored_data,
diff --git a/cms/lib/xblock/tagging/tagging.py b/cms/lib/xblock/tagging/tagging.py
index 067e4ac510..d5da37ee7d 100644
--- a/cms/lib/xblock/tagging/tagging.py
+++ b/cms/lib/xblock/tagging/tagging.py
@@ -77,7 +77,7 @@ class StructuredTagsAside(XBlockAside):
return Fragment(u'')
@XBlock.handler
- def save_tags(self, request=None, suffix=None):
+ def save_tags(self, request=None, suffix=None): # lint-amnesty, pylint: disable=unused-argument
"""
Handler to save choosen tags with connected XBlock
"""
diff --git a/cms/lib/xblock/tagging/test.py b/cms/lib/xblock/tagging/test.py
index 41e8277dc7..685b0440eb 100644
--- a/cms/lib/xblock/tagging/test.py
+++ b/cms/lib/xblock/tagging/test.py
@@ -39,7 +39,7 @@ class StructuredTagsAsideTestCase(ModuleStoreTestCase):
"""
Preparation for the test execution
"""
- super(StructuredTagsAsideTestCase, self).setUp()
+ super(StructuredTagsAsideTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.aside_name = 'tagging_aside'
self.aside_tag_dif = 'difficulty'
self.aside_tag_dif_value = 'Hard'
@@ -113,7 +113,7 @@ class StructuredTagsAsideTestCase(ModuleStoreTestCase):
def tearDown(self):
TagAvailableValues.objects.all().delete()
TagCategories.objects.all().delete()
- super(StructuredTagsAsideTestCase, self).tearDown()
+ super(StructuredTagsAsideTestCase, self).tearDown() # lint-amnesty, pylint: disable=super-with-arguments
def test_aside_contains_tags(self):
"""
@@ -181,11 +181,11 @@ class StructuredTagsAsideTestCase(ModuleStoreTestCase):
self.assertEqual(option_values2, ['Learned a few things', 'Learned everything', 'Learned nothing'])
# Now ensure the acid_aside is not in the result
- self.assertNotRegexpMatches(problem_html, r"data-block-type=[\"\']acid_aside[\"\']")
+ self.assertNotRegexpMatches(problem_html, r"data-block-type=[\"\']acid_aside[\"\']") # lint-amnesty, pylint: disable=deprecated-method
# Ensure about video don't have asides
video_html = get_preview_fragment(request, self.video, context).content
- self.assertNotRegexpMatches(video_html, "
'
- u'
To override the banner message for a specific course, refer to the Course Message configuration. '
+ u'
To override the banner message for a specific course, refer to the Course Message configuration. ' # lint-amnesty, pylint: disable=line-too-long
u'Course Messages will only work if the global status message is enabled, so if you only want to add '
- u'a banner to specific courses without adding a global status message, you should add a global status '
+ u'a banner to specific courses without adding a global status message, you should add a global status ' # lint-amnesty, pylint: disable=line-too-long
u'message with empty message text.
'
u'
Finally, disable the global status message by adding another empty message with "enabled" '
u'unchecked.
')
diff --git a/common/djangoapps/status/tests.py b/common/djangoapps/status/tests.py
index 5c21f03f5d..a365344b0b 100644
--- a/common/djangoapps/status/tests.py
+++ b/common/djangoapps/status/tests.py
@@ -21,7 +21,7 @@ class TestStatus(TestCase):
"""Test that the get_site_status_msg function does the right thing"""
def setUp(self):
- super(TestStatus, self).setUp()
+ super(TestStatus, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
# Clear the cache between test runs.
cache.clear()
self.course_key = CourseLocator(org='TestOrg', course='TestCourse', run='TestRun')
diff --git a/common/djangoapps/terrain/stubs/catalog.py b/common/djangoapps/terrain/stubs/catalog.py
index d2cdebe5dc..1767485028 100644
--- a/common/djangoapps/terrain/stubs/catalog.py
+++ b/common/djangoapps/terrain/stubs/catalog.py
@@ -11,9 +11,9 @@ import six.moves.urllib.parse
from .http import StubHttpRequestHandler, StubHttpService
-class StubCatalogServiceHandler(StubHttpRequestHandler):
+class StubCatalogServiceHandler(StubHttpRequestHandler): # lint-amnesty, pylint: disable=missing-class-docstring
- def do_GET(self):
+ def do_GET(self): # lint-amnesty, pylint: disable=missing-function-docstring
pattern_handlers = {
r'/api/v1/programs/$': self.program_list,
r'/api/v1/programs/([0-9a-f-]+)/$': self.program_detail,
diff --git a/common/djangoapps/terrain/stubs/comments.py b/common/djangoapps/terrain/stubs/comments.py
index 4d46e0081c..8fef4b33e3 100644
--- a/common/djangoapps/terrain/stubs/comments.py
+++ b/common/djangoapps/terrain/stubs/comments.py
@@ -11,13 +11,13 @@ import six.moves.urllib.parse
from .http import StubHttpRequestHandler, StubHttpService
-class StubCommentsServiceHandler(StubHttpRequestHandler):
+class StubCommentsServiceHandler(StubHttpRequestHandler): # lint-amnesty, pylint: disable=missing-class-docstring
@property
def _params(self):
return six.moves.urllib.parse.parse_qs(six.moves.urllib.parse.urlparse(self.path).query)
- def do_GET(self):
+ def do_GET(self): # lint-amnesty, pylint: disable=missing-function-docstring
pattern_handlers = OrderedDict([
("/api/v1/users/(?P\\d+)/active_threads$", self.do_user_profile),
("/api/v1/users/(?P\\d+)$", self.do_user),
@@ -32,7 +32,7 @@ class StubCommentsServiceHandler(StubHttpRequestHandler):
self.send_response(404, content="404 Not Found")
- def match_pattern(self, pattern_handlers):
+ def match_pattern(self, pattern_handlers): # lint-amnesty, pylint: disable=missing-function-docstring
path = six.moves.urllib.parse.urlparse(self.path).path
for pattern in pattern_handlers:
match = re.match(pattern, path)
@@ -51,11 +51,11 @@ class StubCommentsServiceHandler(StubHttpRequestHandler):
return
self.send_response(204, "")
- def do_put_user(self, user_id):
+ def do_put_user(self, user_id): # lint-amnesty, pylint: disable=unused-argument
self.server.config['default_sort_key'] = self.post_dict.get("default_sort_key", "date")
- self.send_json_response({'username': self.post_dict.get("username"), 'external_id': self.post_dict.get("external_id")})
+ self.send_json_response({'username': self.post_dict.get("username"), 'external_id': self.post_dict.get("external_id")}) # lint-amnesty, pylint: disable=line-too-long
- def do_DELETE(self):
+ def do_DELETE(self): # lint-amnesty, pylint: disable=missing-function-docstring
pattern_handlers = {
"/api/v1/comments/(?P\\w+)$": self.do_delete_comment
}
@@ -63,7 +63,7 @@ class StubCommentsServiceHandler(StubHttpRequestHandler):
return
self.send_json_response({})
- def do_user(self, user_id):
+ def do_user(self, user_id): # lint-amnesty, pylint: disable=missing-function-docstring
response = {
"id": user_id,
"default_sort_key": self.server.config.get("default_sort_key", "date"),
@@ -78,7 +78,7 @@ class StubCommentsServiceHandler(StubHttpRequestHandler):
})
self.send_json_response(response)
- def do_user_profile(self, user_id):
+ def do_user_profile(self, user_id): # lint-amnesty, pylint: disable=missing-function-docstring, unused-argument
if 'active_threads' in self.server.config:
user_threads = self.server.config['active_threads'][:]
params = self._params
@@ -94,13 +94,13 @@ class StubCommentsServiceHandler(StubHttpRequestHandler):
else:
self.send_response(404, content="404 Not Found")
- def do_thread(self, thread_id):
+ def do_thread(self, thread_id): # lint-amnesty, pylint: disable=missing-function-docstring
if thread_id in self.server.config.get('threads', {}):
thread = self.server.config['threads'][thread_id].copy()
params = six.moves.urllib.parse.parse_qs(six.moves.urllib.parse.urlparse(self.path).query)
if "recursive" in params and params["recursive"][0] == "True":
thread.setdefault('children', [])
- resp_total = thread.setdefault('resp_total', len(thread['children']))
+ resp_total = thread.setdefault('resp_total', len(thread['children'])) # lint-amnesty, pylint: disable=unused-variable
resp_skip = int(params.get("resp_skip", ["0"])[0])
resp_limit = int(params.get("resp_limit", ["10000"])[0])
thread['children'] = thread['children'][resp_skip:(resp_skip + resp_limit)]
diff --git a/common/djangoapps/terrain/stubs/edxnotes.py b/common/djangoapps/terrain/stubs/edxnotes.py
index 9d1b83697a..458dea52ad 100644
--- a/common/djangoapps/terrain/stubs/edxnotes.py
+++ b/common/djangoapps/terrain/stubs/edxnotes.py
@@ -107,7 +107,7 @@ class StubEdxNotesServiceHandler(StubHttpRequestHandler):
self.send_response(200, headers={
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
- "Access-Control-Allow-Headers": "Content-Length, Content-Type, X-Annotator-Auth-Token, X-Requested-With, X-Annotator-Auth-Token, X-Requested-With, X-CSRFToken",
+ "Access-Control-Allow-Headers": "Content-Length, Content-Type, X-Annotator-Auth-Token, X-Requested-With, X-Annotator-Auth-Token, X-Requested-With, X-CSRFToken", # lint-amnesty, pylint: disable=line-too-long
})
def respond(self, status_code=200, content=None):
@@ -300,7 +300,7 @@ class StubEdxNotesService(StubHttpService):
HANDLER_CLASS = StubEdxNotesServiceHandler
def __init__(self, *args, **kwargs):
- super(StubEdxNotesService, self).__init__(*args, **kwargs)
+ super(StubEdxNotesService, self).__init__(*args, **kwargs) # lint-amnesty, pylint: disable=super-with-arguments
self.notes = list()
def get_all_notes(self):
diff --git a/common/djangoapps/terrain/stubs/http.py b/common/djangoapps/terrain/stubs/http.py
index 7cf277b89f..978f5e2726 100644
--- a/common/djangoapps/terrain/stubs/http.py
+++ b/common/djangoapps/terrain/stubs/http.py
@@ -117,7 +117,7 @@ class StubHttpRequestHandler(BaseHTTPRequestHandler, object):
for key, list_val in post_dict.items()
}
- except:
+ except: # lint-amnesty, pylint: disable=bare-except
return dict()
@lazy
diff --git a/common/djangoapps/terrain/stubs/start.py b/common/djangoapps/terrain/stubs/start.py
index 6b05cdc665..c9ea349e46 100644
--- a/common/djangoapps/terrain/stubs/start.py
+++ b/common/djangoapps/terrain/stubs/start.py
@@ -78,7 +78,7 @@ def _parse_config_args(args):
if len(components) >= 2:
config_dict[components[0]] = "=".join(components[1:])
- except:
+ except: # lint-amnesty, pylint: disable=bare-except
print("Warning: could not interpret config value '{0}'".format(config_str))
return config_dict
diff --git a/common/djangoapps/terrain/stubs/tests/test_edxnotes.py b/common/djangoapps/terrain/stubs/tests/test_edxnotes.py
index 340038b609..adef731833 100644
--- a/common/djangoapps/terrain/stubs/tests/test_edxnotes.py
+++ b/common/djangoapps/terrain/stubs/tests/test_edxnotes.py
@@ -24,7 +24,7 @@ class StubEdxNotesServiceTest(unittest.TestCase):
"""
Start the stub server.
"""
- super(StubEdxNotesServiceTest, self).setUp()
+ super(StubEdxNotesServiceTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.server = StubEdxNotesService()
dummy_notes = self._get_dummy_notes(count=5)
self.server.add_notes(dummy_notes)
diff --git a/common/djangoapps/terrain/stubs/tests/test_http.py b/common/djangoapps/terrain/stubs/tests/test_http.py
index 75a913c984..b88f9c7ec9 100644
--- a/common/djangoapps/terrain/stubs/tests/test_http.py
+++ b/common/djangoapps/terrain/stubs/tests/test_http.py
@@ -12,10 +12,10 @@ import six
from common.djangoapps.terrain.stubs.http import StubHttpRequestHandler, StubHttpService, require_params
-class StubHttpServiceTest(unittest.TestCase):
+class StubHttpServiceTest(unittest.TestCase): # lint-amnesty, pylint: disable=missing-class-docstring
def setUp(self):
- super(StubHttpServiceTest, self).setUp()
+ super(StubHttpServiceTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.server = StubHttpService()
self.addCleanup(self.server.shutdown)
self.url = "http://127.0.0.1:{0}/set_config".format(self.server.port)
@@ -71,7 +71,7 @@ class StubHttpServiceTest(unittest.TestCase):
self.assertEqual(response.status_code, 404)
-class RequireRequestHandler(StubHttpRequestHandler):
+class RequireRequestHandler(StubHttpRequestHandler): # lint-amnesty, pylint: disable=missing-class-docstring
@require_params('GET', 'test_param')
def do_GET(self):
self.send_response(200)
@@ -91,7 +91,7 @@ class RequireParamTest(unittest.TestCase):
"""
def setUp(self):
- super(RequireParamTest, self).setUp()
+ super(RequireParamTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.server = RequireHttpService()
self.addCleanup(self.server.shutdown)
self.url = "http://127.0.0.1:{port}".format(port=self.server.port)
diff --git a/common/djangoapps/terrain/stubs/tests/test_lti_stub.py b/common/djangoapps/terrain/stubs/tests/test_lti_stub.py
index 501a2dec83..ba1775f1b0 100644
--- a/common/djangoapps/terrain/stubs/tests/test_lti_stub.py
+++ b/common/djangoapps/terrain/stubs/tests/test_lti_stub.py
@@ -20,7 +20,7 @@ class StubLtiServiceTest(unittest.TestCase):
Used for lettuce BDD tests in lms/courseware/features/lti.feature
"""
def setUp(self):
- super(StubLtiServiceTest, self).setUp()
+ super(StubLtiServiceTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.server = StubLtiService()
self.uri = 'http://127.0.0.1:{}/'.format(self.server.port)
self.launch_uri = self.uri + 'correct_lti_endpoint'
@@ -60,7 +60,7 @@ class StubLtiServiceTest(unittest.TestCase):
self.assertIn(b'Wrong LTI signature', response.content)
@patch('common.djangoapps.terrain.stubs.lti.signature.verify_hmac_sha1', return_value=True)
- def test_success_response_launch_lti(self, check_oauth):
+ def test_success_response_launch_lti(self, check_oauth): # lint-amnesty, pylint: disable=unused-argument
"""
Success lti launch.
"""
diff --git a/common/djangoapps/terrain/stubs/tests/test_video.py b/common/djangoapps/terrain/stubs/tests/test_video.py
index f6da4da2b3..edfe33c697 100644
--- a/common/djangoapps/terrain/stubs/tests/test_video.py
+++ b/common/djangoapps/terrain/stubs/tests/test_video.py
@@ -33,7 +33,7 @@ class StubVideoServiceTest(unittest.TestCase):
"""
Start the stub server.
"""
- super(StubVideoServiceTest, self).setUp()
+ super(StubVideoServiceTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.server = VideoSourceHttpService()
self.server.config['root_dir'] = '{}/data/video'.format(settings.TEST_ROOT)
self.addCleanup(self.server.shutdown)
diff --git a/common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py b/common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py
index b60180275f..2f36a9d6dd 100644
--- a/common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py
+++ b/common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py
@@ -17,17 +17,17 @@ class FakeTimer(object):
"""
Fake timer implementation that executes immediately.
"""
- def __init__(self, delay, func):
+ def __init__(self, delay, func): # lint-amnesty, pylint: disable=unused-argument
self.func = func
def start(self):
self.func()
-class StubXQueueServiceTest(unittest.TestCase):
+class StubXQueueServiceTest(unittest.TestCase): # lint-amnesty, pylint: disable=missing-class-docstring
def setUp(self):
- super(StubXQueueServiceTest, self).setUp()
+ super(StubXQueueServiceTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.server = StubXQueueService()
self.url = "http://127.0.0.1:{0}/xqueue/submit".format(self.server.port)
self.addCleanup(self.server.shutdown)
@@ -119,7 +119,7 @@ class StubXQueueServiceTest(unittest.TestCase):
self.assertFalse(self.post.called)
self.assertTrue(logger.error.called)
- def _post_submission(self, callback_url, lms_key, queue_name, xqueue_body):
+ def _post_submission(self, callback_url, lms_key, queue_name, xqueue_body): # lint-amnesty, pylint: disable=unused-argument
"""
Post a submission to the stub XQueue implementation.
`callback_url` is the URL at which we expect to receive a grade response
diff --git a/common/djangoapps/terrain/stubs/tests/test_youtube_stub.py b/common/djangoapps/terrain/stubs/tests/test_youtube_stub.py
index 713b8ad351..a1fe1d8329 100644
--- a/common/djangoapps/terrain/stubs/tests/test_youtube_stub.py
+++ b/common/djangoapps/terrain/stubs/tests/test_youtube_stub.py
@@ -10,10 +10,10 @@ import requests
from ..youtube import StubYouTubeService
-class StubYouTubeServiceTest(unittest.TestCase):
+class StubYouTubeServiceTest(unittest.TestCase): # lint-amnesty, pylint: disable=missing-class-docstring
def setUp(self):
- super(StubYouTubeServiceTest, self).setUp()
+ super(StubYouTubeServiceTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.server = StubYouTubeService()
self.url = "http://127.0.0.1:{0}/".format(self.server.port)
self.server.config['time_to_response'] = 0.0
diff --git a/common/djangoapps/terrain/stubs/youtube.py b/common/djangoapps/terrain/stubs/youtube.py
index ff7e474048..64b79c216b 100644
--- a/common/djangoapps/terrain/stubs/youtube.py
+++ b/common/djangoapps/terrain/stubs/youtube.py
@@ -91,7 +91,7 @@ class StubYouTubeHandler(StubHttpRequestHandler):
youtube_id = params.path.split('/').pop()
if self.server.config.get('youtube_api_private_video'):
- self._send_private_video_response(youtube_id, "I'm youtube private video.")
+ self._send_private_video_response(youtube_id, "I'm youtube private video.") # lint-amnesty, pylint: disable=too-many-function-args
else:
self._send_video_response(youtube_id, "I'm youtube.")
diff --git a/common/djangoapps/util/db.py b/common/djangoapps/util/db.py
index e816637f67..422b8219bd 100644
--- a/common/djangoapps/util/db.py
+++ b/common/djangoapps/util/db.py
@@ -1,3 +1,4 @@
+# lint-amnesty, pylint: disable=django-not-configured
"""
Utility functions related to databases.
"""
@@ -5,7 +6,7 @@ Utility functions related to databases.
import random
# TransactionManagementError used below actually *does* derive from the standard "Exception" class.
- # lint-amnesty, pylint: disable=bad-option-value, nonstandard-exception
+# lint-amnesty, pylint: disable=bad-option-value, nonstandard-exception
from contextlib import contextmanager
from functools import wraps # lint-amnesty, pylint: disable=unused-import
diff --git a/common/djangoapps/util/json_request.py b/common/djangoapps/util/json_request.py
index c2208ee0d2..36edd2ac32 100644
--- a/common/djangoapps/util/json_request.py
+++ b/common/djangoapps/util/json_request.py
@@ -1,4 +1,4 @@
- # lint-amnesty, pylint: disable=missing-module-docstring
+# lint-amnesty, pylint: disable=missing-module-docstring
import decimal
import json
diff --git a/common/djangoapps/xblock_django/admin.py b/common/djangoapps/xblock_django/admin.py
index 21a8950b75..f57e3a894d 100644
--- a/common/djangoapps/xblock_django/admin.py
+++ b/common/djangoapps/xblock_django/admin.py
@@ -7,7 +7,7 @@ from config_models.admin import ConfigurationModelAdmin, KeyedConfigurationModel
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
-from common.djangoapps.xblock_django.models import XBlockConfiguration, XBlockStudioConfiguration, XBlockStudioConfigurationFlag
+from common.djangoapps.xblock_django.models import XBlockConfiguration, XBlockStudioConfiguration, XBlockStudioConfigurationFlag # lint-amnesty, pylint: disable=line-too-long
class XBlockConfigurationAdmin(KeyedConfigurationModelAdmin):
diff --git a/common/djangoapps/xblock_django/tests/test_api.py b/common/djangoapps/xblock_django/tests/test_api.py
index 68499af1c0..cffb70be41 100644
--- a/common/djangoapps/xblock_django/tests/test_api.py
+++ b/common/djangoapps/xblock_django/tests/test_api.py
@@ -7,7 +7,7 @@ import six
from openedx.core.djangolib.testing.utils import CacheIsolationTestCase
from common.djangoapps.xblock_django.api import authorable_xblocks, deprecated_xblocks, disabled_xblocks
-from common.djangoapps.xblock_django.models import XBlockConfiguration, XBlockStudioConfiguration, XBlockStudioConfigurationFlag
+from common.djangoapps.xblock_django.models import XBlockConfiguration, XBlockStudioConfiguration, XBlockStudioConfigurationFlag # lint-amnesty, pylint: disable=line-too-long
class XBlockSupportTestCase(CacheIsolationTestCase):
@@ -15,7 +15,7 @@ class XBlockSupportTestCase(CacheIsolationTestCase):
Tests for XBlock Support methods.
"""
def setUp(self):
- super(XBlockSupportTestCase, self).setUp()
+ super(XBlockSupportTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
# Set up XBlockConfigurations for disabled and deprecated states
block_config = [
diff --git a/common/djangoapps/xblock_django/tests/test_user_service.py b/common/djangoapps/xblock_django/tests/test_user_service.py
index c47e10f7c9..ff6d148673 100644
--- a/common/djangoapps/xblock_django/tests/test_user_service.py
+++ b/common/djangoapps/xblock_django/tests/test_user_service.py
@@ -26,7 +26,7 @@ class UserServiceTestCase(TestCase):
Tests for the DjangoXBlockUserService.
"""
def setUp(self):
- super(UserServiceTestCase, self).setUp()
+ super(UserServiceTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.user = UserFactory(username="tester", email="test@tester.com")
self.user.profile.name = "Test Tester"
set_user_preference(self.user, 'pref-lang', 'en')
diff --git a/common/djangoapps/xblock_django/user_service.py b/common/djangoapps/xblock_django/user_service.py
index be41454b8f..bd341089a5 100644
--- a/common/djangoapps/xblock_django/user_service.py
+++ b/common/djangoapps/xblock_django/user_service.py
@@ -3,7 +3,7 @@ Support for converting a django user to an XBlock user
"""
-from django.contrib.auth.models import User
+from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user
from opaque_keys.edx.keys import CourseKey
from xblock.reference.user_service import UserService, XBlockUser
@@ -24,7 +24,7 @@ class DjangoXBlockUserService(UserService):
A user service that converts Django users to XBlockUser
"""
def __init__(self, django_user, **kwargs):
- super(DjangoXBlockUserService, self).__init__(**kwargs)
+ super(DjangoXBlockUserService, self).__init__(**kwargs) # lint-amnesty, pylint: disable=super-with-arguments
self._django_user = django_user
if self._django_user:
self._django_user.user_is_staff = kwargs.get('user_is_staff', False)
diff --git a/common/test/acceptance/fixtures/base.py b/common/test/acceptance/fixtures/base.py
index 6979a6440b..f415e11f48 100644
--- a/common/test/acceptance/fixtures/base.py
+++ b/common/test/acceptance/fixtures/base.py
@@ -6,7 +6,7 @@ Common code shared by course and library fixtures.
import json
import requests
-import six
+import six # lint-amnesty, pylint: disable=unused-import
from lazy import lazy
from common.test.acceptance.fixtures import STUDIO_BASE_URL
@@ -16,7 +16,7 @@ class StudioApiLoginError(Exception):
"""
Error occurred while logging in to the Studio API.
"""
- pass
+ pass # lint-amnesty, pylint: disable=unnecessary-pass
class StudioApiFixture(object):
@@ -57,7 +57,7 @@ class StudioApiFixture(object):
Log in as a staff user, then return the cookies for the session (as a dict)
Raises a `StudioApiLoginError` if the login fails.
"""
- return {key: val for key, val in self.session.cookies.items()}
+ return {key: val for key, val in self.session.cookies.items()} # lint-amnesty, pylint: disable=unnecessary-comprehension
@lazy
def headers(self):
@@ -75,7 +75,7 @@ class FixtureError(Exception):
"""
Error occurred while installing a course or library fixture.
"""
- pass
+ pass # lint-amnesty, pylint: disable=unnecessary-pass
class XBlockContainerFixture(StudioApiFixture):
@@ -85,7 +85,7 @@ class XBlockContainerFixture(StudioApiFixture):
def __init__(self):
self.children = []
- super(XBlockContainerFixture, self).__init__()
+ super(XBlockContainerFixture, self).__init__() # lint-amnesty, pylint: disable=super-with-arguments
def add_children(self, *args):
"""
@@ -133,7 +133,7 @@ class XBlockContainerFixture(StudioApiFixture):
loc = response.json().get('locator')
xblock_desc.locator = loc
except ValueError:
- raise FixtureError(u"Could not decode JSON from '{0}'".format(response.content))
+ raise FixtureError(u"Could not decode JSON from '{0}'".format(response.content)) # lint-amnesty, pylint: disable=raise-missing-from
# Configure the XBlock
response = self.session.post(
diff --git a/common/test/acceptance/fixtures/certificates.py b/common/test/acceptance/fixtures/certificates.py
index b8e613a766..ff4ed291e5 100644
--- a/common/test/acceptance/fixtures/certificates.py
+++ b/common/test/acceptance/fixtures/certificates.py
@@ -13,14 +13,14 @@ class CertificateConfigFixtureError(Exception):
"""
Error occurred while installing certificate config fixture.
"""
- pass
+ pass # lint-amnesty, pylint: disable=unnecessary-pass
class CertificateConfigUpdateFixtureError(Exception):
"""
Error occurred while updating certificate config fixture.
"""
- pass
+ pass # lint-amnesty, pylint: disable=unnecessary-pass
class CertificateConfigFixture(StudioApiFixture):
@@ -32,7 +32,7 @@ class CertificateConfigFixture(StudioApiFixture):
def __init__(self, course_id, certificates_data):
self.course_id = course_id
self.certificates = certificates_data
- super(CertificateConfigFixture, self).__init__()
+ super(CertificateConfigFixture, self).__init__() # lint-amnesty, pylint: disable=super-with-arguments
def install(self):
"""
diff --git a/common/test/acceptance/fixtures/config.py b/common/test/acceptance/fixtures/config.py
index ad6152be12..9ee545a98f 100644
--- a/common/test/acceptance/fixtures/config.py
+++ b/common/test/acceptance/fixtures/config.py
@@ -17,7 +17,7 @@ class ConfigModelFixtureError(Exception):
"""
Error occurred while configuring the stub XQueue.
"""
- pass
+ pass # lint-amnesty, pylint: disable=unnecessary-pass
class ConfigModelFixture(object):
@@ -62,7 +62,7 @@ class ConfigModelFixture(object):
Log in as a staff user, then return the cookies for the session (as a dict)
Raises a `ConfigModelFixtureError` if the login fails.
"""
- return {key: val for key, val in self.session.cookies.items()}
+ return {key: val for key, val in self.session.cookies.items()} # lint-amnesty, pylint: disable=unnecessary-comprehension
@lazy
def headers(self):
diff --git a/common/test/acceptance/fixtures/course.py b/common/test/acceptance/fixtures/course.py
index 5bc2ef728d..edc44e4e45 100644
--- a/common/test/acceptance/fixtures/course.py
+++ b/common/test/acceptance/fixtures/course.py
@@ -120,7 +120,7 @@ class CourseFixture(XBlockContainerFixture):
to enable entrance exam settings would be a dict like this {"entrance_exam_enabled": "true"}
These have the same meaning as in the Studio restful API /course end-point.
"""
- super(CourseFixture, self).__init__()
+ super(CourseFixture, self).__init__() # lint-amnesty, pylint: disable=super-with-arguments
self._course_dict = {
'org': org,
'number': number,
@@ -242,7 +242,7 @@ class CourseFixture(XBlockContainerFixture):
try:
course_outline_json = response.json()
except ValueError:
- raise FixtureError(
+ raise FixtureError( # lint-amnesty, pylint: disable=raise-missing-from
u"Could not decode course outline as JSON: '{0}'".format(response)
)
return course_outline_json
@@ -290,7 +290,7 @@ class CourseFixture(XBlockContainerFixture):
err = response.json().get('ErrMsg')
except ValueError:
- raise FixtureError(
+ raise FixtureError( # lint-amnesty, pylint: disable=raise-missing-from
u"Could not parse response from course request as JSON: '{0}'".format(
response.content))
@@ -322,7 +322,7 @@ class CourseFixture(XBlockContainerFixture):
try:
details = response.json()
except ValueError:
- raise FixtureError(
+ raise FixtureError( # lint-amnesty, pylint: disable=raise-missing-from
u"Could not decode course details as JSON: '{0}'".format(details)
)
@@ -397,7 +397,7 @@ class CourseFixture(XBlockContainerFixture):
for asset_name in self._assets:
asset_file_path = test_dir + '/data/uploads/' + asset_name
- asset_file = open(asset_file_path, mode='rb') # pylint: disable=open-builtin
+ asset_file = open(asset_file_path, mode='rb') # lint-amnesty, pylint: disable=bad-option-value, open-builtin
files = {'file': (asset_name, asset_file, mimetypes.guess_type(asset_file_path)[0])}
headers = {
@@ -447,5 +447,5 @@ class CourseFixture(XBlockContainerFixture):
"""
Recursively create XBlock children.
"""
- super(CourseFixture, self)._create_xblock_children(parent_loc, xblock_descriptions)
+ super(CourseFixture, self)._create_xblock_children(parent_loc, xblock_descriptions) # lint-amnesty, pylint: disable=super-with-arguments
self._publish_xblock(parent_loc)
diff --git a/common/test/acceptance/fixtures/discussion.py b/common/test/acceptance/fixtures/discussion.py
index 3e507c0bec..1e1bf99ce8 100644
--- a/common/test/acceptance/fixtures/discussion.py
+++ b/common/test/acceptance/fixtures/discussion.py
@@ -13,7 +13,7 @@ from common.test.acceptance.fixtures import COMMENTS_STUB_URL
from common.test.acceptance.fixtures.config import ConfigModelFixture
-class ContentFactory(factory.Factory):
+class ContentFactory(factory.Factory): # lint-amnesty, pylint: disable=missing-class-docstring
class Meta(object):
model = dict
@@ -40,7 +40,7 @@ class ContentFactory(factory.Factory):
return kwargs
-class Thread(ContentFactory):
+class Thread(ContentFactory): # lint-amnesty, pylint: disable=missing-class-docstring
thread_type = "discussion"
anonymous = False
anonymous_to_peers = False
@@ -67,7 +67,7 @@ class Response(Comment):
body = "dummy response body"
-class SearchResult(factory.Factory):
+class SearchResult(factory.Factory): # lint-amnesty, pylint: disable=missing-class-docstring
class Meta(object):
model = dict
@@ -78,7 +78,7 @@ class SearchResult(factory.Factory):
corrected_text = None
-class DiscussionContentFixture(object):
+class DiscussionContentFixture(object): # lint-amnesty, pylint: disable=missing-class-docstring
def push(self):
"""
@@ -96,12 +96,12 @@ class DiscussionContentFixture(object):
raise NotImplementedError()
-class SingleThreadViewFixture(DiscussionContentFixture):
+class SingleThreadViewFixture(DiscussionContentFixture): # lint-amnesty, pylint: disable=missing-class-docstring
def __init__(self, thread):
self.thread = thread
- def addResponse(self, response, comments=[]):
+ def addResponse(self, response, comments=[]): # lint-amnesty, pylint: disable=dangerous-default-value, missing-function-docstring
response['children'] = comments
if self.thread["thread_type"] == "discussion":
responseListAttr = "children"
@@ -133,7 +133,7 @@ class SingleThreadViewFixture(DiscussionContentFixture):
}
-class MultipleThreadFixture(DiscussionContentFixture):
+class MultipleThreadFixture(DiscussionContentFixture): # lint-amnesty, pylint: disable=missing-class-docstring
def __init__(self, threads):
self.threads = threads
@@ -157,7 +157,7 @@ class MultipleThreadFixture(DiscussionContentFixture):
thread['comments_count'] += len(comments) + 1
-class UserProfileViewFixture(DiscussionContentFixture):
+class UserProfileViewFixture(DiscussionContentFixture): # lint-amnesty, pylint: disable=missing-class-docstring
def __init__(self, threads):
self.threads = threads
@@ -166,7 +166,7 @@ class UserProfileViewFixture(DiscussionContentFixture):
return {"active_threads": json.dumps(self.threads)}
-class SearchResultFixture(DiscussionContentFixture):
+class SearchResultFixture(DiscussionContentFixture): # lint-amnesty, pylint: disable=missing-class-docstring
def __init__(self, result):
self.result = result
diff --git a/common/test/acceptance/fixtures/library.py b/common/test/acceptance/fixtures/library.py
index a00f972ef5..0fd4a4ea64 100644
--- a/common/test/acceptance/fixtures/library.py
+++ b/common/test/acceptance/fixtures/library.py
@@ -22,7 +22,7 @@ class LibraryFixture(XBlockContainerFixture):
"""
Configure the library fixture to create a library with
"""
- super(LibraryFixture, self).__init__()
+ super(LibraryFixture, self).__init__() # lint-amnesty, pylint: disable=super-with-arguments
self.library_info = {
'org': org,
'number': number,
@@ -31,7 +31,7 @@ class LibraryFixture(XBlockContainerFixture):
self.display_name = display_name
self._library_key = None
- super(LibraryFixture, self).__init__()
+ super(LibraryFixture, self).__init__() # lint-amnesty, pylint: disable=super-with-arguments
def __str__(self):
"""
@@ -92,4 +92,4 @@ class LibraryFixture(XBlockContainerFixture):
# Disable publishing for library XBlocks:
xblock_desc.publish = "not-applicable"
- return super(LibraryFixture, self).create_xblock(parent_loc, xblock_desc)
+ return super(LibraryFixture, self).create_xblock(parent_loc, xblock_desc) # lint-amnesty, pylint: disable=super-with-arguments
diff --git a/common/test/acceptance/pages/common/auto_auth.py b/common/test/acceptance/pages/common/auto_auth.py
index 0e11d7d039..8a7b11d9e8 100644
--- a/common/test/acceptance/pages/common/auto_auth.py
+++ b/common/test/acceptance/pages/common/auto_auth.py
@@ -45,7 +45,7 @@ class AutoAuthPage(PageObject):
Note that "global staff" is NOT the same as course staff.
"""
- super(AutoAuthPage, self).__init__(browser)
+ super(AutoAuthPage, self).__init__(browser) # lint-amnesty, pylint: disable=super-with-arguments
# This will eventually hold the details about the user account
self._user_info = None
diff --git a/common/test/acceptance/pages/common/utils.py b/common/test/acceptance/pages/common/utils.py
index beff6a78a1..4bdea6fb98 100644
--- a/common/test/acceptance/pages/common/utils.py
+++ b/common/test/acceptance/pages/common/utils.py
@@ -43,4 +43,4 @@ def confirm_prompt(page, cancel=False, require_notification=None):
confirmation_button_css = '.prompt .action-' + ('secondary' if cancel else 'primary')
page.wait_for_element_visibility(confirmation_button_css, 'Confirmation button is visible')
require_notification = (not cancel) if require_notification is None else require_notification
- click_css(page, confirmation_button_css, require_notification=require_notification)
+ click_css(page, confirmation_button_css, require_notification=require_notification) # lint-amnesty, pylint: disable=unexpected-keyword-arg
diff --git a/common/test/acceptance/pages/lms/catalog.py b/common/test/acceptance/pages/lms/catalog.py
index ad077f416b..1930b11261 100644
--- a/common/test/acceptance/pages/lms/catalog.py
+++ b/common/test/acceptance/pages/lms/catalog.py
@@ -24,4 +24,4 @@ class CacheProgramsPage(PageObject):
body = self.q(css='body').text[0]
match = re.search(r'programs cached', body, flags=re.IGNORECASE)
- return True if match else False
+ return True if match else False # lint-amnesty, pylint: disable=simplifiable-if-expression
diff --git a/common/test/acceptance/pages/lms/course_home.py b/common/test/acceptance/pages/lms/course_home.py
index 08121cd057..20e024a877 100644
--- a/common/test/acceptance/pages/lms/course_home.py
+++ b/common/test/acceptance/pages/lms/course_home.py
@@ -20,7 +20,7 @@ class CourseHomePage(CoursePage):
return self.q(css='.course-outline').present
def __init__(self, browser, course_id):
- super(CourseHomePage, self).__init__(browser, course_id)
+ super(CourseHomePage, self).__init__(browser, course_id) # lint-amnesty, pylint: disable=super-with-arguments
self.course_id = course_id
self.preview = StaffPreviewPage(browser, self)
# TODO: TNL-6546: Remove the following
diff --git a/common/test/acceptance/pages/lms/course_page.py b/common/test/acceptance/pages/lms/course_page.py
index 737ed78b16..1b0b9a8b0e 100644
--- a/common/test/acceptance/pages/lms/course_page.py
+++ b/common/test/acceptance/pages/lms/course_page.py
@@ -9,7 +9,7 @@ from common.test.acceptance.pages.lms import BASE_URL
from common.test.acceptance.pages.lms.tab_nav import TabNavPage
-class CoursePage(PageObject):
+class CoursePage(PageObject): # lint-amnesty, pylint: disable=abstract-method
"""
Abstract base class for page objects within a course.
"""
@@ -23,7 +23,7 @@ class CoursePage(PageObject):
Course ID is currently of the form "edx/999/2013_Spring"
but this format could change.
"""
- super(CoursePage, self).__init__(browser)
+ super(CoursePage, self).__init__(browser) # lint-amnesty, pylint: disable=super-with-arguments
self.course_id = course_id
@property
diff --git a/common/test/acceptance/pages/lms/course_wiki.py b/common/test/acceptance/pages/lms/course_wiki.py
index f15a67bc85..af675ba224 100644
--- a/common/test/acceptance/pages/lms/course_wiki.py
+++ b/common/test/acceptance/pages/lms/course_wiki.py
@@ -57,7 +57,7 @@ class CourseWikiSubviewPage(CoursePage): # pylint: disable=abstract-method
Course ID is currently of the form "edx/999/2013_Spring"
but this format could change.
"""
- super(CourseWikiSubviewPage, self).__init__(browser, course_id)
+ super(CourseWikiSubviewPage, self).__init__(browser, course_id) # lint-amnesty, pylint: disable=super-with-arguments
self.course_id = course_id
self.course_info = course_info
self.article_name = "{org}.{course_number}.{course_run}".format(
diff --git a/common/test/acceptance/pages/lms/courseware.py b/common/test/acceptance/pages/lms/courseware.py
index 2b06f499d0..222d946b53 100644
--- a/common/test/acceptance/pages/lms/courseware.py
+++ b/common/test/acceptance/pages/lms/courseware.py
@@ -20,8 +20,8 @@ class CoursewarePage(CoursePage):
section_selector = '.chapter'
subsection_selector = '.chapter-content-container a'
- def __init__(self, browser, course_id):
- super(CoursewarePage, self).__init__(browser, course_id)
+ def __init__(self, browser, course_id): # lint-amnesty, pylint: disable=useless-super-delegation
+ super(CoursewarePage, self).__init__(browser, course_id) # lint-amnesty, pylint: disable=super-with-arguments
# self.nav = CourseNavPage(browser, self)
def is_browser_on_page(self):
diff --git a/common/test/acceptance/pages/lms/discussion.py b/common/test/acceptance/pages/lms/discussion.py
index 711b8eec5f..9ba7b6a12b 100644
--- a/common/test/acceptance/pages/lms/discussion.py
+++ b/common/test/acceptance/pages/lms/discussion.py
@@ -18,7 +18,7 @@ class DiscussionThreadPage(PageObject):
url = None
def __init__(self, browser, thread_selector):
- super(DiscussionThreadPage, self).__init__(browser)
+ super(DiscussionThreadPage, self).__init__(browser) # lint-amnesty, pylint: disable=super-with-arguments
self.thread_selector = thread_selector
def _find_within(self, selector):
@@ -74,9 +74,9 @@ class DiscussionThreadPage(PageObject):
).fulfill()
-class DiscussionTabSingleThreadPage(CoursePage):
+class DiscussionTabSingleThreadPage(CoursePage): # lint-amnesty, pylint: disable=missing-class-docstring
def __init__(self, browser, course_id, discussion_id, thread_id):
- super(DiscussionTabSingleThreadPage, self).__init__(browser, course_id)
+ super(DiscussionTabSingleThreadPage, self).__init__(browser, course_id) # lint-amnesty, pylint: disable=super-with-arguments
self.thread_page = DiscussionThreadPage(
browser,
u"body.discussion .discussion-article[data-id='{thread_id}']".format(thread_id=thread_id)
@@ -103,7 +103,7 @@ class DiscussionTabHomePage(CoursePage):
ALERT_SELECTOR = ".discussion-body .forum-nav .search-alert"
def __init__(self, browser, course_id):
- super(DiscussionTabHomePage, self).__init__(browser, course_id)
+ super(DiscussionTabHomePage, self).__init__(browser, course_id) # lint-amnesty, pylint: disable=super-with-arguments
self.url_path = "discussion/forum/"
self.root_selector = None
diff --git a/common/test/acceptance/pages/lms/fields.py b/common/test/acceptance/pages/lms/fields.py
index 28dc541467..9369f4b375 100644
--- a/common/test/acceptance/pages/lms/fields.py
+++ b/common/test/acceptance/pages/lms/fields.py
@@ -245,7 +245,7 @@ class FieldsMixin(object):
Returns bool based on the highlighted border for field.
"""
query = self.q(css=u'.u-field-{}.error'.format(field_id))
- return True if query.present else False
+ return True if query.present else False # lint-amnesty, pylint: disable=simplifiable-if-expression
def get_social_first_element(self):
"""
diff --git a/common/test/acceptance/pages/lms/learner_profile.py b/common/test/acceptance/pages/lms/learner_profile.py
index 1de4b84ca6..cc0de5759f 100644
--- a/common/test/acceptance/pages/lms/learner_profile.py
+++ b/common/test/acceptance/pages/lms/learner_profile.py
@@ -25,7 +25,7 @@ class Badge(PageObject):
def __init__(self, element, browser):
self.element = element
- super(Badge, self).__init__(browser)
+ super(Badge, self).__init__(browser) # lint-amnesty, pylint: disable=super-with-arguments
def is_browser_on_page(self):
return BrowserQuery(self.element, css=".badge-details").visible
@@ -84,7 +84,7 @@ class LearnerProfilePage(FieldsMixin, PageObject):
browser (Browser): The browser instance.
username (str): Profile username.
"""
- super(LearnerProfilePage, self).__init__(browser)
+ super(LearnerProfilePage, self).__init__(browser) # lint-amnesty, pylint: disable=super-with-arguments
self.username = username
@property
diff --git a/common/test/acceptance/pages/lms/staff_view.py b/common/test/acceptance/pages/lms/staff_view.py
index 630e00af93..c9b89b3a54 100644
--- a/common/test/acceptance/pages/lms/staff_view.py
+++ b/common/test/acceptance/pages/lms/staff_view.py
@@ -28,7 +28,7 @@ class StaffPreviewPage(PageObject):
parent_page: None if this is being used as a subclass. Otherwise,
the parent_page the contains this staff preview page fragment.
"""
- super(StaffPreviewPage, self).__init__(browser)
+ super(StaffPreviewPage, self).__init__(browser) # lint-amnesty, pylint: disable=super-with-arguments
self.parent_page = parent_page
def is_browser_on_page(self):
diff --git a/common/test/acceptance/pages/lms/video/video.py b/common/test/acceptance/pages/lms/video/video.py
index 34c7d04e06..55ce59e76f 100644
--- a/common/test/acceptance/pages/lms/video/video.py
+++ b/common/test/acceptance/pages/lms/video/video.py
@@ -7,7 +7,7 @@ import logging
from bok_choy.javascript import js_defined, wait_for_js
from bok_choy.page_object import PageObject
-from bok_choy.promise import EmptyPromise, Promise
+from bok_choy.promise import EmptyPromise, Promise # lint-amnesty, pylint: disable=unused-import
log = logging.getLogger('VideoPage')
@@ -220,7 +220,7 @@ class VideoPage(PageObject):
# toggle captions visibility state if needed
if self.is_captions_visible() != captions_new_state:
- self.click_player_button('transcript_button')
+ self.click_player_button('transcript_button') # lint-amnesty, pylint: disable=no-member
# Verify that captions state is toggled/changed
EmptyPromise(lambda: self.is_captions_visible() == captions_new_state,
diff --git a/common/test/acceptance/pages/studio/container.py b/common/test/acceptance/pages/studio/container.py
index a0822788bd..82c3510da3 100644
--- a/common/test/acceptance/pages/studio/container.py
+++ b/common/test/acceptance/pages/studio/container.py
@@ -22,7 +22,7 @@ class ContainerPage(PageObject, HelpMixin):
ADD_MISSING_GROUPS_SELECTOR = '.notification-action-button[data-notification-action="add-missing-groups"]'
def __init__(self, browser, locator):
- super(ContainerPage, self).__init__(browser)
+ super(ContainerPage, self).__init__(browser) # lint-amnesty, pylint: disable=super-with-arguments
self.locator = locator
@property
@@ -31,7 +31,7 @@ class ContainerPage(PageObject, HelpMixin):
return u"{}/container/{}".format(BASE_URL, self.locator)
@property
- def name(self):
+ def name(self): # lint-amnesty, pylint: disable=missing-function-docstring
titles = self.q(css=self.NAME_SELECTOR).text
if titles:
return titles[0]
@@ -51,7 +51,7 @@ class ContainerPage(PageObject, HelpMixin):
if len(data_request_elements) > 0:
request_token = data_request_elements.first.attrs('data-request-token')[0]
# Then find the number of Studio xblock wrappers on the page with that request token.
- num_wrappers = len(self.q(css=u'{} [data-request-token="{}"]'.format(XBlockWrapper.BODY_SELECTOR, request_token)).results)
+ num_wrappers = len(self.q(css=u'{} [data-request-token="{}"]'.format(XBlockWrapper.BODY_SELECTOR, request_token)).results) # lint-amnesty, pylint: disable=line-too-long
# Wait until all components have been loaded and marked as either initialized or failed.
# See:
# - common/static/js/xblock/core.js which adds the class "xblock-initialized"
@@ -159,9 +159,9 @@ class ContainerPage(PageObject, HelpMixin):
if not warnings.is_present():
return False
warning_text = warnings.first.text[0]
- return warning_text == "Caution: The last published version of this unit is live. By publishing changes you will change the student experience."
+ return warning_text == "Caution: The last published version of this unit is live. By publishing changes you will change the student experience." # lint-amnesty, pylint: disable=line-too-long
- def shows_inherited_staff_lock(self, parent_type=None, parent_name=None):
+ def shows_inherited_staff_lock(self, parent_type=None, parent_name=None): # lint-amnesty, pylint: disable=unused-argument
"""
Returns True if the unit inherits staff lock from a section or subsection.
"""
@@ -187,14 +187,14 @@ class ContainerPage(PageObject, HelpMixin):
Publishes the container.
"""
self.scroll_to_element('.action-publish')
- click_css(self, '.action-publish', 0, require_notification=False)
+ click_css(self, '.action-publish', 0, require_notification=False) # lint-amnesty, pylint: disable=unexpected-keyword-arg
def discard_changes(self):
"""
Discards draft changes (which will then re-render the page).
"""
self.scroll_to_element('a.action-discard')
- click_css(self, 'a.action-discard', 0, require_notification=False)
+ click_css(self, 'a.action-discard', 0, require_notification=False) # lint-amnesty, pylint: disable=unexpected-keyword-arg
confirm_prompt(self)
self.wait_for_ajax()
@@ -237,7 +237,7 @@ class ContainerPage(PageObject, HelpMixin):
if not was_locked_initially:
self.q(css='a.action-staff-lock').first.click()
else:
- click_css(self, 'a.action-staff-lock', 0, require_notification=False)
+ click_css(self, 'a.action-staff-lock', 0, require_notification=False) # lint-amnesty, pylint: disable=unexpected-keyword-arg
if not inherits_staff_lock:
confirm_prompt(self)
self.wait_for_ajax()
@@ -299,7 +299,7 @@ class ContainerPage(PageObject, HelpMixin):
The index of the first item is 0.
"""
# Click the delete button
- click_css(self, '.delete-button', source_index, require_notification=False)
+ click_css(self, '.delete-button', source_index, require_notification=False) # lint-amnesty, pylint: disable=unexpected-keyword-arg
# Click the confirmation dialog button
confirm_prompt(self)
@@ -338,7 +338,7 @@ class ContainerPage(PageObject, HelpMixin):
"""
Click take me there link.
"""
- click_css(self, '#page-alert .alert.confirmation .nav-actions .action-secondary', require_notification=False)
+ click_css(self, '#page-alert .alert.confirmation .nav-actions .action-secondary', require_notification=False) # lint-amnesty, pylint: disable=unexpected-keyword-arg
def add_missing_groups(self):
"""
@@ -433,7 +433,7 @@ class XBlockWrapper(PageObject):
}
def __init__(self, browser, locator):
- super(XBlockWrapper, self).__init__(browser)
+ super(XBlockWrapper, self).__init__(browser) # lint-amnesty, pylint: disable=super-with-arguments
self.locator = locator
def is_browser_on_page(self):
@@ -465,7 +465,7 @@ class XBlockWrapper(PageObject):
return self.q(css=self._bounded_selector('.xblock-author_view'))[0].text
@property
- def name(self):
+ def name(self): # lint-amnesty, pylint: disable=missing-function-docstring
titles = self.q(css=self._bounded_selector(self.NAME_SELECTOR)).text
if titles:
return titles[0]
@@ -618,7 +618,7 @@ class XBlockWrapper(PageObject):
"""
Opens the move modal.
"""
- click_css(self, '.move-button', require_notification=False)
+ click_css(self, '.move-button', require_notification=False) # lint-amnesty, pylint: disable=unexpected-keyword-arg
self.wait_for(
lambda: self.q(css='.modal-window.move-modal').visible, description='move modal is visible'
)
diff --git a/common/test/acceptance/pages/studio/course_page.py b/common/test/acceptance/pages/studio/course_page.py
index 370d78eb7b..0a23be3dc0 100644
--- a/common/test/acceptance/pages/studio/course_page.py
+++ b/common/test/acceptance/pages/studio/course_page.py
@@ -30,7 +30,7 @@ class CoursePage(PageObject, HelpMixin):
Should be implemented in child classes.
"""
- pass
+ pass # lint-amnesty, pylint: disable=unnecessary-pass
def __init__(self, browser, course_org, course_num, course_run):
"""
@@ -39,7 +39,7 @@ class CoursePage(PageObject, HelpMixin):
These identifiers will likely change in the future.
"""
- super(CoursePage, self).__init__(browser)
+ super(CoursePage, self).__init__(browser) # lint-amnesty, pylint: disable=super-with-arguments
self.course_info = {
'course_org': course_org,
'course_num': course_num,
diff --git a/common/test/acceptance/pages/studio/library.py b/common/test/acceptance/pages/studio/library.py
index 6a931dca22..c78b2da8bf 100644
--- a/common/test/acceptance/pages/studio/library.py
+++ b/common/test/acceptance/pages/studio/library.py
@@ -18,7 +18,7 @@ class LibraryPage(PageObject, HelpMixin):
Base page for Library pages. Defaults URL to the edit page.
"""
def __init__(self, browser, locator):
- super(LibraryPage, self).__init__(browser)
+ super(LibraryPage, self).__init__(browser) # lint-amnesty, pylint: disable=super-with-arguments
self.locator = locator
@property
@@ -50,4 +50,4 @@ class LibraryEditPage(LibraryPage, PaginatedMixin, UsersPageMixin):
for improved test reliability.
"""
self.wait_for_ajax()
- super(LibraryEditPage, self).wait_until_ready()
+ super(LibraryEditPage, self).wait_until_ready() # lint-amnesty, pylint: disable=super-with-arguments
diff --git a/common/test/acceptance/pages/studio/overview.py b/common/test/acceptance/pages/studio/overview.py
index f897922700..409e5e12cb 100644
--- a/common/test/acceptance/pages/studio/overview.py
+++ b/common/test/acceptance/pages/studio/overview.py
@@ -3,7 +3,7 @@ Course Outline page in Studio.
"""
-from bok_choy.javascript import js_defined, wait_for_js
+from bok_choy.javascript import js_defined, wait_for_js # lint-amnesty, pylint: disable=unused-import
from bok_choy.page_object import PageObject
from bok_choy.promise import EmptyPromise
from selenium.webdriver.support.ui import Select
@@ -58,7 +58,7 @@ class CourseOutlineItem(object):
Puts the item into editable form.
"""
self.q(css=self._bounded_selector(self.CONFIGURATION_BUTTON_SELECTOR)).first.click() # pylint: disable=no-member
- if 'subsection' in self.BODY_SELECTOR:
+ if 'subsection' in self.BODY_SELECTOR: # lint-amnesty, pylint: disable=unsupported-membership-test
modal = SubsectionOutlineModal(self)
else:
modal = CourseOutlineModal(self)
@@ -105,7 +105,7 @@ class CourseOutlineChild(PageObject, CourseOutlineItem):
BODY_SELECTOR = '.outline-item'
def __init__(self, browser, locator):
- super(CourseOutlineChild, self).__init__(browser)
+ super(CourseOutlineChild, self).__init__(browser) # lint-amnesty, pylint: disable=super-with-arguments
self.locator = locator
def is_browser_on_page(self):
@@ -160,7 +160,7 @@ class CourseOutlineSubsection(CourseOutlineContainer, CourseOutlineChild):
"""
Return the :class:`.CourseOutlineUnit with the title `title`.
"""
- return self.child(title)
+ return self.child(title) # lint-amnesty, pylint: disable=no-member
def units(self):
"""
@@ -195,7 +195,7 @@ class CourseOutlineSection(CourseOutlineContainer, CourseOutlineChild):
"""
Return the :class:`.CourseOutlineSubsection` with the title `title`.
"""
- return self.child(title)
+ return self.child(title) # lint-amnesty, pylint: disable=no-member
def subsections(self):
"""
@@ -213,7 +213,7 @@ class CourseOutlineSection(CourseOutlineContainer, CourseOutlineChild):
"""
Adds a subsection to this section
"""
- self.add_child()
+ self.add_child() # lint-amnesty, pylint: disable=no-member
class ExpandCollapseLinkState(object):
@@ -251,7 +251,7 @@ class CourseOutlinePage(CoursePage, CourseOutlineContainer):
"""
Starts course reindex by clicking reindex button
"""
- self.reindex_button.click()
+ self.reindex_button.click() # lint-amnesty, pylint: disable=no-member
def open_subsection_settings_dialog(self, index=0):
"""
@@ -363,7 +363,7 @@ class SubsectionOutlineModal(CourseOutlineModal):
"""
Returns the current visibility setting for a subsection
"""
- self.ensure_staff_lock_visible()
+ self.ensure_staff_lock_visible() # lint-amnesty, pylint: disable=no-member
return self.find_css('input[name=content-visibility]:checked').first.attrs('value')[0]
@is_explicitly_locked.setter
@@ -380,7 +380,7 @@ class SubsectionOutlineModal(CourseOutlineModal):
"""
Sets the subsection visibility to the given value.
"""
- self.ensure_staff_lock_visible()
+ self.ensure_staff_lock_visible() # lint-amnesty, pylint: disable=no-member
self.find_css('input[name=content-visibility][value=' + value + ']').click()
EmptyPromise(lambda: value == self.subsection_visibility, "Subsection visibility is updated").fulfill()
diff --git a/common/test/acceptance/pages/studio/users.py b/common/test/acceptance/pages/studio/users.py
index cca2cf2329..b81d226a52 100644
--- a/common/test/acceptance/pages/studio/users.py
+++ b/common/test/acceptance/pages/studio/users.py
@@ -25,7 +25,7 @@ class UsersPageMixin(PageObject):
""" Common functionality for course/library team pages """
new_user_form_selector = '.form-create.create-user .user-email-input'
- def url(self):
+ def url(self): # lint-amnesty, pylint: disable=invalid-overridden-method
"""
URL to this page - override in subclass
"""
diff --git a/common/test/acceptance/pages/studio/utils.py b/common/test/acceptance/pages/studio/utils.py
index 1da7868054..0dfc60fe66 100644
--- a/common/test/acceptance/pages/studio/utils.py
+++ b/common/test/acceptance/pages/studio/utils.py
@@ -15,7 +15,7 @@ SIDE_BAR_HELP_CSS = '.external-help a, .external-help-button'
@js_defined('window.jQuery')
-def type_in_codemirror(page, index, text, find_prefix="$"):
+def type_in_codemirror(page, index, text, find_prefix="$"): # lint-amnesty, pylint: disable=missing-function-docstring
script = u"""
var cm = {find_prefix}('div.CodeMirror:eq({index})').get(0).CodeMirror;
CodeMirror.signal(cm, "focus", cm);
@@ -71,7 +71,7 @@ def verify_ordering(test_class, page, expected_orderings):
expected_length = len(expected_ordering.get(parent))
test_class.assertEqual(
expected_length, len(children),
- u"Number of children incorrect for group {0}. Expected {1} but got {2}.".format(parent, expected_length, len(children)))
+ u"Number of children incorrect for group {0}. Expected {1} but got {2}.".format(parent, expected_length, len(children))) # lint-amnesty, pylint: disable=line-too-long
for idx, expected in enumerate(expected_ordering.get(parent)):
test_class.assertEqual(expected, children[idx].name)
blocks_checked.add(expected)
diff --git a/common/test/acceptance/pages/studio/video/video.py b/common/test/acceptance/pages/studio/video/video.py
index 8f63464281..6b81382db3 100644
--- a/common/test/acceptance/pages/studio/video/video.py
+++ b/common/test/acceptance/pages/studio/video/video.py
@@ -14,7 +14,7 @@ from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
from six.moves import range
-from common.test.acceptance.pages.common.utils import sync_on_notification
+from common.test.acceptance.pages.common.utils import sync_on_notification # lint-amnesty, pylint: disable=no-name-in-module
from common.test.acceptance.pages.lms.video.video import VideoPage
from common.test.acceptance.tests.helpers import YouTubeStubConfig
@@ -113,7 +113,7 @@ class VideoComponentPage(VideoPage):
)
def get_element_selector(self, class_name, vertical=False):
- return super(VideoComponentPage, self).get_element_selector(class_name, vertical=vertical)
+ return super(VideoComponentPage, self).get_element_selector(class_name, vertical=vertical) # lint-amnesty, pylint: disable=super-with-arguments
def _wait_for(self, check_func, desc, result=False, timeout=30):
"""
@@ -549,7 +549,7 @@ class VideoComponentPage(VideoPage):
mime_type = 'application/x-subrip'
lang_code = '?language_code={}'.format(language_code)
link = [link for link in self.q(css='.download-action').attrs('href') if lang_code in link]
- result, headers, content = self._get_transcript(link[0])
+ result, headers, content = self._get_transcript(link[0]) # lint-amnesty, pylint: disable=no-member
return result is True and mime_type in headers['content-type'] and text_to_search in content.decode('utf-8')
@@ -578,7 +578,7 @@ class VideoComponentPage(VideoPage):
As all the captions lines are exactly same so only getting partial lines will work.
"""
- self.wait_for_captions()
+ self.wait_for_captions() # lint-amnesty, pylint: disable=no-member
selector = u'.subtitles li:nth-child({})'
return ' '.join([self.q(css=selector.format(i)).text[0] for i in range(1, 6)])
diff --git a/common/test/acceptance/tests/discussion/helpers.py b/common/test/acceptance/tests/discussion/helpers.py
index b0d562ecd5..eabcdcae9a 100644
--- a/common/test/acceptance/tests/discussion/helpers.py
+++ b/common/test/acceptance/tests/discussion/helpers.py
@@ -51,7 +51,7 @@ class CohortTestMixin(object):
Sets up the course to use cohorting with the given list of auto_cohort_groups.
If auto_cohort_groups is None, no auto cohorts are set.
"""
- course_fixture._update_xblock(course_fixture._course_location, {
+ course_fixture._update_xblock(course_fixture._course_location, { # lint-amnesty, pylint: disable=protected-access
"metadata": {
u"cohort_config": {
"auto_cohort_groups": auto_cohort_groups or [],
@@ -65,7 +65,7 @@ class CohortTestMixin(object):
"""
Adds a cohort by name, returning its ID.
"""
- url = LMS_BASE_URL + "/courses/" + course_fixture._course_key + '/cohorts/'
+ url = LMS_BASE_URL + "/courses/" + course_fixture._course_key + '/cohorts/' # lint-amnesty, pylint: disable=protected-access
data = json.dumps({"name": cohort_name, 'assignment_type': 'manual'})
response = course_fixture.session.post(url, data=data, headers=course_fixture.headers)
self.assertTrue(response.ok, "Failed to create cohort")
@@ -75,7 +75,7 @@ class CohortTestMixin(object):
"""
Adds a user to the specified cohort.
"""
- url = LMS_BASE_URL + "/courses/" + course_fixture._course_key + "/cohorts/{}/add".format(cohort_id)
+ url = LMS_BASE_URL + "/courses/" + course_fixture._course_key + "/cohorts/{}/add".format(cohort_id) # lint-amnesty, pylint: disable=protected-access
data = {"users": username}
course_fixture.headers['Content-type'] = 'application/x-www-form-urlencoded'
response = course_fixture.session.post(url, data=data, headers=course_fixture.headers)
@@ -85,7 +85,7 @@ class CohortTestMixin(object):
class BaseDiscussionTestCase(UniqueCourseTest, ForumsConfigMixin):
"""Base test case class for all discussions-related tests."""
def setUp(self):
- super(BaseDiscussionTestCase, self).setUp()
+ super(BaseDiscussionTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.discussion_id = "test_discussion_{}".format(uuid4().hex)
self.course_fixture = CourseFixture(**self.course_info)
diff --git a/common/test/acceptance/tests/discussion/test_cohort_management.py b/common/test/acceptance/tests/discussion/test_cohort_management.py
index 50e07f97b1..8c408acaed 100644
--- a/common/test/acceptance/tests/discussion/test_cohort_management.py
+++ b/common/test/acceptance/tests/discussion/test_cohort_management.py
@@ -24,7 +24,7 @@ class CohortConfigurationTest(EventsTestMixin, UniqueCourseTest, CohortTestMixin
"""
Set up a cohorted course
"""
- super(CohortConfigurationTest, self).setUp()
+ super(CohortConfigurationTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
# create course with cohorts
self.manual_cohort_name = "ManualCohort1"
diff --git a/common/test/acceptance/tests/discussion/test_discussion.py b/common/test/acceptance/tests/discussion/test_discussion.py
index 0400be395f..b37ae7180a 100644
--- a/common/test/acceptance/tests/discussion/test_discussion.py
+++ b/common/test/acceptance/tests/discussion/test_discussion.py
@@ -7,7 +7,7 @@ from uuid import uuid4
import pytest
-from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc
+from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc # lint-amnesty, pylint: disable=unused-import
from common.test.acceptance.fixtures.discussion import (
Comment,
Response,
@@ -23,7 +23,7 @@ from common.test.acceptance.tests.discussion.helpers import BaseDiscussionMixin,
from common.test.acceptance.tests.helpers import UniqueCourseTest
from openedx.core.lib.tests import attr
-THREAD_CONTENT_WITH_LATEX = u"""Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
+THREAD_CONTENT_WITH_LATEX = u"""Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt # lint-amnesty, pylint: disable=line-too-long
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit sse cillum dolore eu fugiat nulla pariatur.
@@ -94,7 +94,7 @@ class DiscussionHomePageTest(BaseDiscussionTestCase):
SEARCHED_USERNAME = "gizmo"
def setUp(self):
- super(DiscussionHomePageTest, self).setUp()
+ super(DiscussionHomePageTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
AutoAuthPage(self.browser, course_id=self.course_id).visit()
self.page = DiscussionTabHomePage(self.browser, self.course_id)
self.page.visit()
@@ -117,7 +117,7 @@ class DiscussionTabMultipleThreadTest(BaseDiscussionTestCase, BaseDiscussionMixi
Tests for the discussion page with multiple threads
"""
def setUp(self):
- super(DiscussionTabMultipleThreadTest, self).setUp()
+ super(DiscussionTabMultipleThreadTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
AutoAuthPage(self.browser, course_id=self.course_id).visit()
self.thread_count = 2
self.thread_ids = []
@@ -167,15 +167,15 @@ class DiscussionOpenClosedThreadTest(BaseDiscussionTestCase):
"""
def setUp(self):
- super(DiscussionOpenClosedThreadTest, self).setUp()
+ super(DiscussionOpenClosedThreadTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.thread_id = "test_thread_{}".format(uuid4().hex)
- def setup_user(self, roles=[]):
+ def setup_user(self, roles=[]): # lint-amnesty, pylint: disable=dangerous-default-value
roles_str = ','.join(roles)
- self.user_id = AutoAuthPage(self.browser, course_id=self.course_id, roles=roles_str).visit().get_user_id()
+ self.user_id = AutoAuthPage(self.browser, course_id=self.course_id, roles=roles_str).visit().get_user_id() # lint-amnesty, pylint: disable=attribute-defined-outside-init
- def setup_view(self, **thread_kwargs):
+ def setup_view(self, **thread_kwargs): # lint-amnesty, pylint: disable=missing-function-docstring
thread_kwargs.update({'commentable_id': self.discussion_id})
view = SingleThreadViewFixture(
Thread(id=self.thread_id, **thread_kwargs)
@@ -183,7 +183,7 @@ class DiscussionOpenClosedThreadTest(BaseDiscussionTestCase):
view.addResponse(Response(id="response1"))
view.push()
- def setup_openclosed_thread_page(self, closed=False):
+ def setup_openclosed_thread_page(self, closed=False): # lint-amnesty, pylint: disable=missing-function-docstring
self.setup_user(roles=['Moderator'])
if closed:
self.setup_view(closed=True)
@@ -225,11 +225,11 @@ class DiscussionResponseEditTest(BaseDiscussionTestCase):
"""
Tests for editing responses displayed beneath thread in the single thread view.
"""
- def setup_user(self, roles=[]):
+ def setup_user(self, roles=[]): # lint-amnesty, pylint: disable=dangerous-default-value
roles_str = ','.join(roles)
- self.user_id = AutoAuthPage(self.browser, course_id=self.course_id, roles=roles_str).visit().get_user_id()
+ self.user_id = AutoAuthPage(self.browser, course_id=self.course_id, roles=roles_str).visit().get_user_id() # lint-amnesty, pylint: disable=attribute-defined-outside-init
- def setup_view(self):
+ def setup_view(self): # lint-amnesty, pylint: disable=missing-function-docstring
view = SingleThreadViewFixture(Thread(id="response_edit_test_thread", commentable_id=self.discussion_id))
view.addResponse(
Response(id="response_other_author", user_id="other", thread_id="response_edit_test_thread"),
@@ -260,15 +260,15 @@ class DiscussionCommentEditTest(BaseDiscussionTestCase):
"""
Tests for editing comments displayed beneath responses in the single thread view.
"""
- def setup_user(self, roles=[]):
+ def setup_user(self, roles=[]): # lint-amnesty, pylint: disable=dangerous-default-value
roles_str = ','.join(roles)
- self.user_id = AutoAuthPage(self.browser, course_id=self.course_id, roles=roles_str).visit().get_user_id()
+ self.user_id = AutoAuthPage(self.browser, course_id=self.course_id, roles=roles_str).visit().get_user_id() # lint-amnesty, pylint: disable=attribute-defined-outside-init
- def setup_view(self):
+ def setup_view(self): # lint-amnesty, pylint: disable=missing-function-docstring
view = SingleThreadViewFixture(Thread(id="comment_edit_test_thread", commentable_id=self.discussion_id))
view.addResponse(
Response(id="response1"),
- [Comment(id="comment_other_author", user_id="other"), Comment(id="comment_self_author", user_id=self.user_id)])
+ [Comment(id="comment_other_author", user_id="other"), Comment(id="comment_self_author", user_id=self.user_id)]) # lint-amnesty, pylint: disable=line-too-long
view.push()
@attr('a11y')
@@ -321,7 +321,7 @@ class DiscussionSearchAlertTest(UniqueCourseTest):
SEARCHED_USERNAME = "gizmo"
def setUp(self):
- super(DiscussionSearchAlertTest, self).setUp()
+ super(DiscussionSearchAlertTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
CourseFixture(**self.course_info).install()
# first auto auth call sets up a user that we will search for in some tests
self.searched_user_id = AutoAuthPage(
diff --git a/common/test/acceptance/tests/helpers.py b/common/test/acceptance/tests/helpers.py
index 1a4f9312be..de03eef29d 100644
--- a/common/test/acceptance/tests/helpers.py
+++ b/common/test/acceptance/tests/helpers.py
@@ -19,12 +19,12 @@ from bok_choy.promise import EmptyPromise, Promise
from bok_choy.web_app_test import WebAppTest
from opaque_keys.edx.locator import CourseLocator
from path import Path as path
-from pymongo import ASCENDING, MongoClient
+from pymongo import ASCENDING, MongoClient # lint-amnesty, pylint: disable=unused-import
from selenium.common.exceptions import StaleElementReferenceException
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.select import Select
from selenium.webdriver.support.ui import WebDriverWait
-from six.moves import range, zip
+from six.moves import range, zip # lint-amnesty, pylint: disable=unused-import
from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory
from common.test.acceptance.fixtures.course import XBlockFixtureDesc
@@ -342,7 +342,7 @@ class EventsTestMixin(TestCase):
Helpers and setup for running tests that evaluate events emitted
"""
def setUp(self):
- super(EventsTestMixin, self).setUp()
+ super(EventsTestMixin, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
mongo_host = 'edx.devstack.mongo' if 'BOK_CHOY_HOSTNAME' in os.environ else 'localhost'
self.event_collection = MongoClient(mongo_host)["test"]["events"]
self.start_time = datetime.now()
@@ -354,14 +354,14 @@ class AcceptanceTest(WebAppTest):
"""
def __init__(self, *args, **kwargs):
- super(AcceptanceTest, self).__init__(*args, **kwargs)
+ super(AcceptanceTest, self).__init__(*args, **kwargs) # lint-amnesty, pylint: disable=super-with-arguments
# Use long messages so that failures show actual and expected values
self.longMessage = True # pylint: disable=invalid-name
def tearDown(self):
self._save_console_log()
- super(AcceptanceTest, self).tearDown()
+ super(AcceptanceTest, self).tearDown() # lint-amnesty, pylint: disable=super-with-arguments
def _save_console_log(self):
"""
@@ -411,7 +411,7 @@ class UniqueCourseTest(AcceptanceTest):
"""
def setUp(self):
- super(UniqueCourseTest, self).setUp()
+ super(UniqueCourseTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.course_info = {
'org': 'test_org',
@@ -440,7 +440,7 @@ class YouTubeConfigError(Exception):
"""
Error occurred while configuring YouTube Stub Server.
"""
- pass
+ pass # lint-amnesty, pylint: disable=unnecessary-pass
class YouTubeStubConfig(object):
diff --git a/common/test/acceptance/tests/lms/test_lms.py b/common/test/acceptance/tests/lms/test_lms.py
index 7f7de023f4..e9e502de66 100644
--- a/common/test/acceptance/tests/lms/test_lms.py
+++ b/common/test/acceptance/tests/lms/test_lms.py
@@ -30,7 +30,7 @@ class CourseWikiA11yTest(UniqueCourseTest):
"""
Initialize pages and install a course fixture.
"""
- super(CourseWikiA11yTest, self).setUp()
+ super(CourseWikiA11yTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
# self.course_info['number'] must be shorter since we are accessing the wiki. See TNL-1751
self.course_info['number'] = self.unique_id[0:6]
diff --git a/common/test/acceptance/tests/lms/test_lms_course_home.py b/common/test/acceptance/tests/lms/test_lms_course_home.py
index a161dbf37a..313d69d961 100644
--- a/common/test/acceptance/tests/lms/test_lms_course_home.py
+++ b/common/test/acceptance/tests/lms/test_lms_course_home.py
@@ -22,7 +22,7 @@ class CourseHomeBaseTest(UniqueCourseTest):
"""
Initialize pages and install a course fixture.
"""
- super(CourseHomeBaseTest, self).setUp()
+ super(CourseHomeBaseTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.course_home_page = CourseHomePage(self.browser, self.course_id)
self.courseware_page = CoursewarePage(self.browser, self.course_id)
diff --git a/common/test/acceptance/tests/lms/test_lms_dashboard.py b/common/test/acceptance/tests/lms/test_lms_dashboard.py
index 2f254af733..7a30c52c91 100644
--- a/common/test/acceptance/tests/lms/test_lms_dashboard.py
+++ b/common/test/acceptance/tests/lms/test_lms_dashboard.py
@@ -23,7 +23,7 @@ class BaseLmsDashboardTestMultiple(UniqueCourseTest):
"""
# Some parameters are provided by the parent setUp() routine, such as the following:
# self.course_id, self.course_info, self.unique_id
- super(BaseLmsDashboardTestMultiple, self).setUp()
+ super(BaseLmsDashboardTestMultiple, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
# Load page objects for use by the tests
self.dashboard_page = DashboardPage(self.browser)
diff --git a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py
index 721d7ce82d..1553d96eb3 100644
--- a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py
+++ b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py
@@ -59,7 +59,7 @@ class LMSInstructorDashboardA11yTest(BaseInstructorDashboardTest):
Instructor dashboard base accessibility test.
"""
def setUp(self):
- super(LMSInstructorDashboardA11yTest, self).setUp()
+ super(LMSInstructorDashboardA11yTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.course_fixture = CourseFixture(**self.course_info).install()
self.log_in_as_instructor()
self.instructor_dashboard_page = self.visit_instructor_dashboard()
@@ -82,7 +82,7 @@ class BulkEmailTest(BaseInstructorDashboardTest):
shard = 23
def setUp(self):
- super(BulkEmailTest, self).setUp()
+ super(BulkEmailTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.course_fixture = CourseFixture(**self.course_info).install()
self.log_in_as_instructor()
instructor_dashboard_page = self.visit_instructor_dashboard()
@@ -114,7 +114,7 @@ class AutoEnrollmentWithCSVTest(BaseInstructorDashboardTest):
"""
def setUp(self):
- super(AutoEnrollmentWithCSVTest, self).setUp()
+ super(AutoEnrollmentWithCSVTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.course_fixture = CourseFixture(**self.course_info).install()
self.log_in_as_instructor()
instructor_dashboard_page = self.visit_instructor_dashboard()
@@ -141,7 +141,7 @@ class CertificatesTest(BaseInstructorDashboardTest):
"""
def setUp(self):
- super(CertificatesTest, self).setUp()
+ super(CertificatesTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.test_certificate_config = {
'id': 1,
'name': 'Certificate name',
@@ -194,7 +194,7 @@ class CertificateInvalidationTest(BaseInstructorDashboardTest):
).install()
def setUp(self):
- super(CertificateInvalidationTest, self).setUp()
+ super(CertificateInvalidationTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
# set same course number as we have in fixture json
self.course_info['number'] = "335535897951379478207964576572017930000"
diff --git a/common/test/acceptance/tests/lms/test_lms_problems.py b/common/test/acceptance/tests/lms/test_lms_problems.py
index 6e49713deb..2220dbd4a5 100644
--- a/common/test/acceptance/tests/lms/test_lms_problems.py
+++ b/common/test/acceptance/tests/lms/test_lms_problems.py
@@ -20,7 +20,7 @@ class ProblemsTest(UniqueCourseTest):
"""
def setUp(self):
- super(ProblemsTest, self).setUp()
+ super(ProblemsTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.username = "test_student_{uuid}".format(uuid=self.unique_id[0:8])
self.email = "{username}@example.com".format(username=self.username)
diff --git a/common/test/acceptance/tests/lms/test_lms_user_preview.py b/common/test/acceptance/tests/lms/test_lms_user_preview.py
index b2107eeb62..d69f58067c 100644
--- a/common/test/acceptance/tests/lms/test_lms_user_preview.py
+++ b/common/test/acceptance/tests/lms/test_lms_user_preview.py
@@ -24,7 +24,7 @@ class StaffViewTest(UniqueCourseTest):
EMAIL = "johndoe@example.com"
def setUp(self):
- super(StaffViewTest, self).setUp()
+ super(StaffViewTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.courseware_page = CoursewarePage(self.browser, self.course_id)
@@ -60,7 +60,7 @@ class CourseWithContentGroupsTest(StaffViewTest):
"""
def setUp(self):
- super(CourseWithContentGroupsTest, self).setUp()
+ super(CourseWithContentGroupsTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
# pylint: disable=protected-access
self.course_fixture._update_xblock(self.course_fixture._course_location, {
"metadata": {
@@ -96,10 +96,10 @@ class CourseWithContentGroupsTest(StaffViewTest):
""")
- self.alpha_text = "VISIBLE TO ALPHA"
- self.beta_text = "VISIBLE TO BETA"
- self.audit_text = "VISIBLE TO AUDIT"
- self.everyone_text = "VISIBLE TO EVERYONE"
+ self.alpha_text = "VISIBLE TO ALPHA" # lint-amnesty, pylint: disable=attribute-defined-outside-init
+ self.beta_text = "VISIBLE TO BETA" # lint-amnesty, pylint: disable=attribute-defined-outside-init
+ self.audit_text = "VISIBLE TO AUDIT" # lint-amnesty, pylint: disable=attribute-defined-outside-init
+ self.everyone_text = "VISIBLE TO EVERYONE" # lint-amnesty, pylint: disable=attribute-defined-outside-init
course_fixture.add_children(
XBlockFixtureDesc('chapter', 'Test Section').add_children(
diff --git a/common/test/acceptance/tests/lms/test_problem_types.py b/common/test/acceptance/tests/lms/test_problem_types.py
index 9958b7b482..2195955732 100644
--- a/common/test/acceptance/tests/lms/test_problem_types.py
+++ b/common/test/acceptance/tests/lms/test_problem_types.py
@@ -57,7 +57,7 @@ class ProblemTypeTestBaseMeta(ABCMeta):
if obj.__getattribute__(required_attr) is None:
raise NotImplementedError(msg)
except AttributeError:
- raise NotImplementedError(msg)
+ raise NotImplementedError(msg) # lint-amnesty, pylint: disable=raise-missing-from
return obj
@@ -96,7 +96,7 @@ class ProblemTypeTestBase(six.with_metaclass(ProblemTypeTestBaseMeta, ProblemsTe
"""
Visits courseware_page and defines self.problem_page.
"""
- super(ProblemTypeTestBase, self).setUp()
+ super(ProblemTypeTestBase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.courseware_page.visit()
self.problem_page = ProblemPage(self.browser)
@@ -215,7 +215,7 @@ class AnnotationProblemTypeBase(ProblemTypeTestBase):
"""
Additional setup for AnnotationProblemTypeBase
"""
- super(AnnotationProblemTypeBase, self).setUp(*args, **kwargs)
+ super(AnnotationProblemTypeBase, self).setUp(*args, **kwargs) # lint-amnesty, pylint: disable=super-with-arguments
self.problem_page.a11y_audit.config.set_rules({
"ignore": [
@@ -247,7 +247,7 @@ class AnnotationProblemTypeTest(AnnotationProblemTypeBase, ProblemTypeA11yTestMi
Standard tests for the Annotation Problem Type
"""
shard = 20
- pass
+ pass # lint-amnesty, pylint: disable=unnecessary-pass
class CheckboxProblemTypeBase(ProblemTypeTestBase):
@@ -445,7 +445,7 @@ class RadioProblemTypeTest(RadioProblemTypeBase, ProblemTypeA11yTestMixin):
Standard tests for the Multiple Radio Problem Type
"""
shard = 24
- pass
+ pass # lint-amnesty, pylint: disable=unnecessary-pass
class RadioProblemTypeTestNonRandomized(RadioProblemTypeBase, ProblemTypeA11yTestMixin):
@@ -500,7 +500,7 @@ class DropdownProblemTypeTest(DropDownProblemTypeBase, ProblemTypeA11yTestMixin)
Standard tests for the Dropdown Problem Type
"""
shard = 8
- pass
+ pass # lint-amnesty, pylint: disable=unnecessary-pass
@ddt.ddt
@@ -569,7 +569,7 @@ class StringProblemTypeBase(ProblemTypeTestBase):
Answer string problem.
"""
textvalue = 'correct string' if correctness == 'correct' else 'incorrect string'
- self.problem_page.fill_answer(textvalue)
+ self.problem_page.fill_answer(textvalue) # lint-amnesty, pylint: disable=no-member
class StringProblemTypeTest(StringProblemTypeBase, ProblemTypeA11yTestMixin):
@@ -577,7 +577,7 @@ class StringProblemTypeTest(StringProblemTypeBase, ProblemTypeA11yTestMixin):
Standard tests for the String Problem Type
"""
shard = 8
- pass
+ pass # lint-amnesty, pylint: disable=unnecessary-pass
class NumericalProblemTypeBase(ProblemTypeTestBase):
@@ -633,7 +633,7 @@ class NumericalProblemTypeBase(ProblemTypeTestBase):
textvalue = 'notNum'
else:
textvalue = str(random.randint(-2, 2))
- self.problem_page.fill_answer(textvalue)
+ self.problem_page.fill_answer(textvalue) # lint-amnesty, pylint: disable=no-member
@ddt.ddt
@@ -713,7 +713,7 @@ class FormulaProblemTypeBase(ProblemTypeTestBase):
Answer formula problem.
"""
textvalue = "x^2+2*x+y" if correctness == 'correct' else 'x^2'
- self.problem_page.fill_answer(textvalue)
+ self.problem_page.fill_answer(textvalue) # lint-amnesty, pylint: disable=no-member
@ddt.ddt
@@ -781,8 +781,8 @@ class ScriptProblemTypeBase(ProblemTypeTestBase):
if not correctness == 'correct':
second_addend += random.randint(1, 10)
- self.problem_page.fill_answer(first_addend, input_num=0)
- self.problem_page.fill_answer(second_addend, input_num=1)
+ self.problem_page.fill_answer(first_addend, input_num=0) # lint-amnesty, pylint: disable=no-member
+ self.problem_page.fill_answer(second_addend, input_num=1) # lint-amnesty, pylint: disable=no-member
@ddt.ddt
@@ -791,7 +791,7 @@ class ScriptProblemTypeTest(ScriptProblemTypeBase, ProblemTypeA11yTestMixin):
Standard tests for the Script Problem Type
"""
shard = 20
- pass
+ pass # lint-amnesty, pylint: disable=unnecessary-pass
class ScriptProblemTypeTestNonRandomized(ScriptProblemTypeBase, ProblemTypeA11yTestMixin):
@@ -871,7 +871,7 @@ class CodeProblemTypeBase(ProblemTypeTestBase):
# (there's not