diff --git a/openedx/features/announcements/tests/test_announcements.py b/openedx/features/announcements/tests/test_announcements.py index d280aa100b..2685c5b9fe 100644 --- a/openedx/features/announcements/tests/test_announcements.py +++ b/openedx/features/announcements/tests/test_announcements.py @@ -40,7 +40,7 @@ class TestGlobalAnnouncements(TestCase): ]) def setUp(self): - super(TestGlobalAnnouncements, self).setUp() + super(TestGlobalAnnouncements, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments self.client = Client() self.admin = AdminFactory.create( email='staff@edx.org', diff --git a/openedx/features/calendar_sync/__init__.py b/openedx/features/calendar_sync/__init__.py index 47f76c832d..1189b06cec 100644 --- a/openedx/features/calendar_sync/__init__.py +++ b/openedx/features/calendar_sync/__init__.py @@ -1,4 +1,4 @@ -""" +""" # lint-amnesty, pylint: disable=django-not-configured Calendar syncing Course dates with a User. """ default_app_config = 'openedx.features.calendar_sync.apps.UserCalendarSyncConfig' diff --git a/openedx/features/calendar_sync/admin.py b/openedx/features/calendar_sync/admin.py index 02609df7da..3efffa361e 100644 --- a/openedx/features/calendar_sync/admin.py +++ b/openedx/features/calendar_sync/admin.py @@ -1,3 +1,4 @@ +# lint-amnesty, pylint: disable=missing-module-docstring from django.contrib import admin from .models import UserCalendarSyncConfig diff --git a/openedx/features/calendar_sync/apps.py b/openedx/features/calendar_sync/apps.py index ac835080de..180e752a7c 100644 --- a/openedx/features/calendar_sync/apps.py +++ b/openedx/features/calendar_sync/apps.py @@ -8,11 +8,11 @@ Define the calendar_sync Django App. from django.apps import AppConfig -class UserCalendarSyncConfig(AppConfig): +class UserCalendarSyncConfig(AppConfig): # lint-amnesty, pylint: disable=missing-class-docstring name = 'openedx.features.calendar_sync' def ready(self): - super(UserCalendarSyncConfig, self).ready() + super(UserCalendarSyncConfig, self).ready() # lint-amnesty, pylint: disable=super-with-arguments # noinspection PyUnresolvedReferences import openedx.features.calendar_sync.signals # pylint: disable=import-outside-toplevel,unused-import diff --git a/openedx/features/calendar_sync/models.py b/openedx/features/calendar_sync/models.py index b3c817575a..7901e920b1 100644 --- a/openedx/features/calendar_sync/models.py +++ b/openedx/features/calendar_sync/models.py @@ -3,7 +3,7 @@ Models for Calendar Sync """ -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 simple_history.models import HistoricalRecords diff --git a/openedx/features/calendar_sync/signals.py b/openedx/features/calendar_sync/signals.py index 86915623f0..7bd13d1364 100644 --- a/openedx/features/calendar_sync/signals.py +++ b/openedx/features/calendar_sync/signals.py @@ -13,7 +13,7 @@ from .utils import send_email_with_attachment @receiver(post_save, sender=UserCalendarSyncConfig) -def handle_calendar_sync_email(sender, instance, created, **kwargs): +def handle_calendar_sync_email(sender, instance, created, **kwargs): # lint-amnesty, pylint: disable=missing-function-docstring, unused-argument if ( CALENDAR_SYNC_FLAG.is_enabled(instance.course_key) and RELATIVE_DATES_FLAG.is_enabled(instance.course_key) and diff --git a/openedx/features/calendar_sync/tests/factories.py b/openedx/features/calendar_sync/tests/factories.py index 4240219620..40329c9fd7 100644 --- a/openedx/features/calendar_sync/tests/factories.py +++ b/openedx/features/calendar_sync/tests/factories.py @@ -1,3 +1,4 @@ +# lint-amnesty, pylint: disable=missing-module-docstring from factory.django import DjangoModelFactory from openedx.features.calendar_sync.models import UserCalendarSyncConfig diff --git a/openedx/features/calendar_sync/tests/test_api.py b/openedx/features/calendar_sync/tests/test_api.py index f38a85be47..d8abcb5e0b 100644 --- a/openedx/features/calendar_sync/tests/test_api.py +++ b/openedx/features/calendar_sync/tests/test_api.py @@ -20,7 +20,7 @@ class TestCalendarSyncAPI(SharedModuleStoreTestCase): cls.course_key = cls.course.id def setUp(self): - super(TestCalendarSyncAPI, self).setUp() + super(TestCalendarSyncAPI, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments self.user = UserFactory(password=TEST_PASSWORD) def test_subscribe_to_calendar(self): diff --git a/openedx/features/calendar_sync/tests/test_init.py b/openedx/features/calendar_sync/tests/test_init.py index 527f9cf8d9..47ce2a4347 100644 --- a/openedx/features/calendar_sync/tests/test_init.py +++ b/openedx/features/calendar_sync/tests/test_init.py @@ -12,7 +12,7 @@ TEST_PASSWORD = 'test' class TestCalendarSyncInit(TestCase): """ Tests for the contents of __init__.py """ def setUp(self): - super(TestCalendarSyncInit, self).setUp() + super(TestCalendarSyncInit, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments self.user = UserFactory(password=TEST_PASSWORD) def test_get_calendar_event_id(self): diff --git a/openedx/features/calendar_sync/tests/test_models.py b/openedx/features/calendar_sync/tests/test_models.py index 6c4a5385c5..cd62653b59 100644 --- a/openedx/features/calendar_sync/tests/test_models.py +++ b/openedx/features/calendar_sync/tests/test_models.py @@ -19,7 +19,7 @@ class TestUserCalendarSyncConfig(SharedModuleStoreTestCase): cls.course_key = cls.course.id def setUp(self): - super(TestUserCalendarSyncConfig, self).setUp() + super(TestUserCalendarSyncConfig, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments self.user = UserFactory(password=TEST_PASSWORD) def test_is_enabled_for_course(self): diff --git a/openedx/features/calendar_sync/tests/test_views.py b/openedx/features/calendar_sync/tests/test_views.py index d9892c050d..8f70c4832a 100644 --- a/openedx/features/calendar_sync/tests/test_views.py +++ b/openedx/features/calendar_sync/tests/test_views.py @@ -25,7 +25,7 @@ class TestCalendarSyncView(SharedModuleStoreTestCase, TestCase): cls.course = CourseFactory.create() def setUp(self): - super(TestCalendarSyncView, self).setUp() + super(TestCalendarSyncView, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments self.user = self.create_user_for_course(self.course) self.client.login(username=self.user.username, password=TEST_PASSWORD) self.calendar_sync_url = reverse('openedx.calendar_sync', args=[self.course.id]) diff --git a/openedx/features/calendar_sync/utils.py b/openedx/features/calendar_sync/utils.py index 4ecbbf6285..e49d9f7abf 100644 --- a/openedx/features/calendar_sync/utils.py +++ b/openedx/features/calendar_sync/utils.py @@ -1,3 +1,4 @@ +# lint-amnesty, pylint: disable=missing-module-docstring import logging from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart @@ -5,13 +6,13 @@ from email.mime.text import MIMEText from django.conf import settings from django.utils.html import format_html from django.utils.translation import ugettext_lazy as _ -import os +import os # lint-amnesty, pylint: disable=wrong-import-order import boto3 logger = logging.getLogger(__name__) -def calendar_sync_initial_email_content(course_name): +def calendar_sync_initial_email_content(course_name): # lint-amnesty, pylint: disable=missing-function-docstring subject = _('Sync {course} to your calendar').format(course=course_name) body_paragraph_1 = _('Sticking to a schedule is the best way to ensure that you successfully complete your ' 'self-paced course. This schedule for {course} will help you stay on track!' @@ -28,7 +29,7 @@ def calendar_sync_initial_email_content(course_name): return subject, body -def calendar_sync_update_email_content(course_name): +def calendar_sync_update_email_content(course_name): # lint-amnesty, pylint: disable=missing-function-docstring subject = _('{course} dates have been updated on your calendar').format(course=course_name) body_paragraph = _('You have successfully shifted your course schedule and your calendar is up to date.' ).format(course=course_name) @@ -57,7 +58,7 @@ def prepare_attachments(attachment_data, file_ext=''): return attachments -def send_email_with_attachment(to_emails, attachment_data, course_name, is_initial): +def send_email_with_attachment(to_emails, attachment_data, course_name, is_initial): # lint-amnesty, pylint: disable=missing-function-docstring # connect to SES client = boto3.client('ses', region_name=settings.AWS_SES_REGION_NAME)