Applied pylint-amnesty to xblock_django

This commit is contained in:
Jawayria
2021-02-02 15:09:08 +05:00
parent 712a6bcc0c
commit f3846144a5
4 changed files with 6 additions and 6 deletions

View File

@@ -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):

View File

@@ -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 = [

View File

@@ -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')

View File

@@ -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)