chore: Removed python_2_unicode_compatible decorator. (#28342)
* chore: Removed python_2_unicode_compatible decorator.
This commit is contained in:
@@ -23,7 +23,7 @@ from datetime import datetime
|
||||
from xml.sax.saxutils import unescape
|
||||
|
||||
import six
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
from lxml import etree
|
||||
from pytz import UTC
|
||||
|
||||
@@ -128,7 +128,6 @@ class LoncapaSystem(object):
|
||||
self.matlab_api_key = matlab_api_key
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class LoncapaProblem(object):
|
||||
"""
|
||||
Main class for capa Problems.
|
||||
|
||||
@@ -53,7 +53,7 @@ import pyparsing
|
||||
import six
|
||||
from calc.preview import latex_preview
|
||||
from chem import chemcalc
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
from lxml import etree
|
||||
from six import text_type
|
||||
|
||||
@@ -73,7 +73,6 @@ log = logging.getLogger(__name__)
|
||||
registry = TagRegistry() # pylint: disable=invalid-name
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Status(object):
|
||||
"""
|
||||
Problem status
|
||||
|
||||
@@ -34,7 +34,7 @@ import six
|
||||
# specific library imports
|
||||
from calc import UndefinedVariable, UnmatchedParenthesis, evaluator
|
||||
from django.utils import html
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
from lxml import etree
|
||||
from lxml.html.soupparser import fromstring as fromstring_bs # uses Beautiful Soup!!! FIXME?
|
||||
from pyparsing import ParseException
|
||||
@@ -110,7 +110,6 @@ class StudentInputError(Exception):
|
||||
# Main base class for CAPA responsetypes
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class LoncapaResponse(six.with_metaclass(abc.ABCMeta, object)):
|
||||
"""
|
||||
Base class for CAPA responsetypes. Each response type (ie a capa question,
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
import logging
|
||||
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from web_fragments.fragment import Fragment
|
||||
from xblock.core import XBlock
|
||||
from xblock.fields import Boolean, List, Scope, String
|
||||
@@ -18,7 +17,6 @@ log = logging.getLogger(__name__)
|
||||
_ = lambda text: text
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class LibraryRoot(XBlock):
|
||||
"""
|
||||
The LibraryRoot is the root XBlock of a content library. All other blocks in
|
||||
|
||||
@@ -12,7 +12,6 @@ from collections import defaultdict
|
||||
from contextlib import contextmanager
|
||||
from importlib import import_module
|
||||
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from fs.osfs import OSFS
|
||||
from lazy import lazy
|
||||
from lxml import etree
|
||||
@@ -300,7 +299,6 @@ class CourseImportLocationManager(CourseLocationManager):
|
||||
self.target_course_id = target_course_id
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class XMLModuleStore(ModuleStoreReadBase):
|
||||
"""
|
||||
An XML backed ModuleStore
|
||||
|
||||
@@ -20,7 +20,7 @@ from functools import wraps
|
||||
from unittest.mock import Mock
|
||||
|
||||
from django.test import TestCase
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
from path import Path as path
|
||||
from xblock.core import XBlock
|
||||
@@ -204,7 +204,6 @@ def map_references(value, field, actual_course_key):
|
||||
return value
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class LazyFormat:
|
||||
"""
|
||||
An stringy object that delays formatting until it's put into a string context.
|
||||
|
||||
@@ -8,7 +8,7 @@ from collections import namedtuple
|
||||
from functools import partial
|
||||
|
||||
import yaml
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
from lazy import lazy
|
||||
from lxml import etree
|
||||
from opaque_keys.edx.asides import AsideDefinitionKeyV2, AsideUsageKeyV2
|
||||
@@ -917,7 +917,6 @@ class XModuleToXBlockMixin:
|
||||
|
||||
|
||||
@XBlock.needs("i18n")
|
||||
@python_2_unicode_compatible
|
||||
class XModule(XModuleToXBlockMixin, HTMLSnippet, XModuleMixin): # lint-amnesty, pylint: disable=abstract-method
|
||||
""" Implements a generic learning module.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user