Apply pylint-amnesty.
This commit is contained in:
Awais Qureshi
2021-02-01 19:27:15 +05:00
parent fdb50bcce8
commit 44576ce3f6
32 changed files with 154 additions and 154 deletions

View File

@@ -8,7 +8,7 @@ import json
from django.http import Http404
from django.template.loader import render_to_string
from django.urls import reverse
from django.utils.translation import get_language_bidi, ugettext_lazy as _
from django.utils.translation import get_language_bidi, ugettext_lazy as _ # lint-amnesty, pylint: disable=unused-import
from web_fragments.fragment import Fragment
from lms.djangoapps.commerce.utils import EcommerceService
@@ -71,7 +71,7 @@ class ProgramDetailsFragmentView(EdxFragmentView):
Render the program details fragment.
"""
def render_to_fragment(self, request, program_uuid, **kwargs):
def render_to_fragment(self, request, program_uuid, **kwargs): # lint-amnesty, pylint: disable=arguments-differ
"""View details about a specific program."""
programs_config = kwargs.get('programs_config') or ProgramsApiConfig.current()
if not programs_config.enabled or not request.user.is_authenticated:

View File

@@ -60,7 +60,7 @@ class TestProgramListing(ProgramsApiConfigMixin, SharedModuleStoreTestCase):
super(TestProgramListing, cls).setUpClass()
cls.course = ModuleStoreCourseFactory()
course_run = CourseRunFactory(key=six.text_type(cls.course.id))
course_run = CourseRunFactory(key=six.text_type(cls.course.id)) # lint-amnesty, pylint: disable=no-member
course = CourseFactory(course_runs=[course_run])
cls.first_program = ProgramFactory(courses=[course])
@@ -69,7 +69,7 @@ class TestProgramListing(ProgramsApiConfigMixin, SharedModuleStoreTestCase):
cls.data = sorted([cls.first_program, cls.second_program], key=cls.program_sort_key)
def setUp(self):
super(TestProgramListing, self).setUp()
super(TestProgramListing, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.user = UserFactory()
self.client.login(username=self.user.username, password=self.password)
@@ -140,7 +140,7 @@ class TestProgramListing(ProgramsApiConfigMixin, SharedModuleStoreTestCase):
self.create_programs_config()
mock_get_programs.return_value = self.data
CourseEnrollmentFactory(user=self.user, course_id=self.course.id)
CourseEnrollmentFactory(user=self.user, course_id=self.course.id) # lint-amnesty, pylint: disable=no-member
response = self.client.get(self.url)
actual = load_serialized_data(response, 'programsData')
@@ -181,7 +181,7 @@ class TestProgramListing(ProgramsApiConfigMixin, SharedModuleStoreTestCase):
self.create_programs_config()
mock_get_programs.return_value = self.data
CourseEnrollmentFactory(user=self.user, course_id=self.course.id)
CourseEnrollmentFactory(user=self.user, course_id=self.course.id) # lint-amnesty, pylint: disable=no-member
response = self.client.get(self.url)
actual = load_serialized_data(response, 'programsData')
@@ -208,17 +208,17 @@ class TestProgramDetails(ProgramsApiConfigMixin, CatalogIntegrationMixin, Shared
super(TestProgramDetails, cls).setUpClass()
modulestore_course = ModuleStoreCourseFactory()
course_run = CourseRunFactory(key=six.text_type(modulestore_course.id))
course_run = CourseRunFactory(key=six.text_type(modulestore_course.id)) # lint-amnesty, pylint: disable=no-member
course = CourseFactory(course_runs=[course_run])
cls.program_data = ProgramFactory(uuid=cls.program_uuid, courses=[course])
cls.pathway_data = PathwayFactory()
cls.program_data['pathway_ids'] = [cls.pathway_data['id']]
cls.pathway_data['program_uuids'] = [cls.program_data['uuid']]
del cls.pathway_data['programs']
del cls.pathway_data['programs'] # lint-amnesty, pylint: disable=unsupported-delete-operation
def setUp(self):
super(TestProgramDetails, self).setUp()
super(TestProgramDetails, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.user = UserFactory()
self.client.login(username=self.user.username, password=self.password)