Apply pylint-amnesty.
This commit is contained in:
Awais Qureshi
2021-02-08 17:12:55 +05:00
parent 966d7ec785
commit 41b50237d3
4 changed files with 7 additions and 7 deletions

View File

@@ -7,7 +7,7 @@ import datetime
import ddt
import mock
from django.conf import settings
from django.test import override_settings
from django.test import override_settings # lint-amnesty, pylint: disable=unused-import
from django.test.client import RequestFactory
from django.urls import reverse
from edx_toggles.toggles.testutils import override_waffle_flag
@@ -49,7 +49,7 @@ class LearnerProfileViewTest(SiteMixin, UrlResetMixin, ModuleStoreTestCase):
]
def setUp(self):
super(LearnerProfileViewTest, self).setUp()
super(LearnerProfileViewTest, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
self.user = UserFactory.create(username=self.USERNAME, password=self.PASSWORD)
self.other_user = UserFactory.create(username=self.OTHER_USERNAME, password=self.PASSWORD)
self.client.login(username=self.USERNAME, password=self.PASSWORD)

View File

@@ -17,7 +17,7 @@ class LearnerAchievementsFragmentView(EdxFragmentView):
A fragment to render a learner's achievements.
"""
def render_to_fragment(self, request, username=None, own_profile=False, **kwargs):
def render_to_fragment(self, request, username=None, own_profile=False, **kwargs): # lint-amnesty, pylint: disable=arguments-differ
"""
Renders the current learner's achievements.
"""

View File

@@ -8,7 +8,7 @@ from django.core.exceptions import ObjectDoesNotExist
from django.http import Http404
from django.shortcuts import redirect, render
from django.urls import reverse
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext as _ # lint-amnesty, pylint: disable=unused-import
from django.views.decorators.http import require_http_methods
from django_countries import countries
@@ -20,7 +20,7 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_
from openedx.core.djangoapps.user_api.accounts.api import get_account_settings
from openedx.core.djangoapps.user_api.errors import UserNotAuthorized, UserNotFound
from openedx.core.djangoapps.user_api.preferences.api import get_user_preferences
from openedx.core.djangolib.markup import HTML, Text
from openedx.core.djangolib.markup import HTML, Text # lint-amnesty, pylint: disable=unused-import
from openedx.features.learner_profile.toggles import should_redirect_to_profile_microfrontend
from openedx.features.learner_profile.views.learner_achievements import LearnerAchievementsFragmentView
from common.djangoapps.student.models import User
@@ -57,7 +57,7 @@ def learner_profile(request, username):
context=context
)
except (UserNotAuthorized, UserNotFound, ObjectDoesNotExist):
raise Http404
raise Http404 # lint-amnesty, pylint: disable=raise-missing-from
def learner_profile_context(request, profile_username, user_is_staff):

View File

@@ -4,7 +4,7 @@ new Show Answer values that remove the Past Due check (keeping the rest intact)
"""
from django.conf import settings
from django.conf import settings # lint-amnesty, pylint: disable=unused-import
from common.lib.xmodule.xmodule.capa_base import SHOWANSWER
from lms.djangoapps.courseware.field_overrides import FieldOverrideProvider