INCR-137: Run python-modernize at common/djangoapps/static_replace (#20481)
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
Models for static_replace
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import six
|
||||
from six.moves import map
|
||||
|
||||
from config_models.models import ConfigurationModel
|
||||
from django.db.models.fields import TextField
|
||||
|
||||
@@ -30,7 +35,7 @@ class AssetBaseUrlConfig(ConfigurationModel):
|
||||
return '<AssetBaseUrlConfig(base_url={})>'.format(self.get_base_url())
|
||||
|
||||
def __unicode__(self):
|
||||
return unicode(repr(self))
|
||||
return six.text_type(repr(self))
|
||||
|
||||
|
||||
class AssetExcludedExtensionsConfig(ConfigurationModel):
|
||||
@@ -53,10 +58,10 @@ class AssetExcludedExtensionsConfig(ConfigurationModel):
|
||||
def get_excluded_extensions(cls):
|
||||
"""Gets the excluded file extensions when canonicalizing static asset paths"""
|
||||
add_period = lambda x: '.' + x
|
||||
return map(add_period, cls.current().excluded_extensions.split())
|
||||
return list(map(add_period, cls.current().excluded_extensions.split()))
|
||||
|
||||
def __repr__(self):
|
||||
return '<AssetExcludedExtensionsConfig(extensions={})>'.format(self.get_excluded_extensions())
|
||||
|
||||
def __unicode__(self):
|
||||
return unicode(repr(self))
|
||||
return six.text_type(repr(self))
|
||||
|
||||
Reference in New Issue
Block a user