pyupgrade on xblock_config app in CMS (#26710)
This commit is contained in:
@@ -13,8 +13,8 @@ class XBlockConfig(AppConfig):
|
||||
"""
|
||||
Default configuration for the "xblock_config" Django application.
|
||||
"""
|
||||
name = u'cms.djangoapps.xblock_config'
|
||||
verbose_name = u'XBlock Configuration'
|
||||
name = 'cms.djangoapps.xblock_config'
|
||||
verbose_name = 'XBlock Configuration'
|
||||
|
||||
def ready(self):
|
||||
from openedx.core.lib.xblock_utils import xblock_local_resource_url
|
||||
|
||||
@@ -18,7 +18,7 @@ class CourseEditLTIFieldsEnabledAdminForm(forms.ModelForm):
|
||||
Form for LTI consumer course-specific configuration to verify the course id.
|
||||
"""
|
||||
|
||||
class Meta(object):
|
||||
class Meta:
|
||||
model = CourseEditLTIFieldsEnabledFlag
|
||||
fields = '__all__'
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
@@ -4,9 +4,6 @@ Models used by Studio XBlock infrastructure.
|
||||
Includes:
|
||||
StudioConfig: A ConfigurationModel for managing Studio.
|
||||
"""
|
||||
|
||||
|
||||
import six
|
||||
from config_models.models import ConfigurationModel
|
||||
from django.db.models import TextField
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
@@ -22,8 +19,8 @@ class StudioConfig(ConfigurationModel):
|
||||
.. no_pii:
|
||||
"""
|
||||
disabled_blocks = TextField(
|
||||
default=u"about course_info static_tab",
|
||||
help_text=u"Space-separated list of XBlocks on which XBlockAsides should never render in studio",
|
||||
default="about course_info static_tab",
|
||||
help_text="Space-separated list of XBlocks on which XBlockAsides should never render in studio",
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@@ -83,7 +80,7 @@ class CourseEditLTIFieldsEnabledFlag(ConfigurationModel):
|
||||
if self.enabled:
|
||||
en = ""
|
||||
|
||||
return u"Course '{course_id}': Edit LTI access to Learner information {en}Enabled".format(
|
||||
course_id=six.text_type(self.course_id),
|
||||
return "Course '{course_id}': Edit LTI access to Learner information {en}Enabled".format(
|
||||
course_id=str(self.course_id),
|
||||
en=en,
|
||||
)
|
||||
|
||||
@@ -34,7 +34,7 @@ class TestLTIConsumerHideFieldsFlag(TestCase):
|
||||
These are set via Django admin settings.
|
||||
"""
|
||||
def setUp(self):
|
||||
super(TestLTIConsumerHideFieldsFlag, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
|
||||
super().setUp()
|
||||
self.course_id = CourseLocator(org="edx", course="course", run="run")
|
||||
|
||||
@ddt.data(
|
||||
|
||||
Reference in New Issue
Block a user