BOM-2351: Removed unused imports from common/lib/xmodule
This commit is contained in:
@@ -19,11 +19,9 @@ from path import Path as path
|
|||||||
from pytz import utc
|
from pytz import utc
|
||||||
from six import text_type
|
from six import text_type
|
||||||
from xblock.fields import Boolean, Dict, Float, Integer, List, Scope, String
|
from xblock.fields import Boolean, Dict, Float, Integer, List, Scope, String
|
||||||
|
|
||||||
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers # lint-amnesty, pylint: disable=unused-import
|
|
||||||
from openedx.core.djangoapps.video_pipeline.models import VideoUploadsEnabledByDefault
|
from openedx.core.djangoapps.video_pipeline.models import VideoUploadsEnabledByDefault
|
||||||
from openedx.core.lib.license import LicenseMixin
|
from openedx.core.lib.license import LicenseMixin
|
||||||
from openedx.core.lib.teams_config import TeamsConfig, DEFAULT_COURSE_RUN_MAX_TEAM_SIZE # lint-amnesty, pylint: disable=unused-import
|
from openedx.core.lib.teams_config import TeamsConfig # lint-amnesty, pylint: disable=unused-import
|
||||||
from xmodule import course_metadata_utils
|
from xmodule import course_metadata_utils
|
||||||
from xmodule.course_metadata_utils import DEFAULT_GRADING_POLICY, DEFAULT_START_DATE
|
from xmodule.course_metadata_utils import DEFAULT_GRADING_POLICY, DEFAULT_START_DATE
|
||||||
from xmodule.graders import grader_from_conf
|
from xmodule.graders import grader_from_conf
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ from contracts import check, new_contract
|
|||||||
from mongodb_proxy import autoretry_read
|
from mongodb_proxy import autoretry_read
|
||||||
# Import this just to export it
|
# Import this just to export it
|
||||||
from pymongo.errors import DuplicateKeyError # pylint: disable=unused-import
|
from pymongo.errors import DuplicateKeyError # pylint: disable=unused-import
|
||||||
|
|
||||||
from xmodule.exceptions import HeartbeatFailure
|
from xmodule.exceptions import HeartbeatFailure
|
||||||
from xmodule.modulestore import BlockData
|
from xmodule.modulestore import BlockData
|
||||||
from xmodule.modulestore.split_mongo import BlockKey
|
from xmodule.modulestore.split_mongo import BlockKey
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ import traceback
|
|||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
import pytz
|
||||||
|
|
||||||
import pymongo.message
|
import pymongo.message
|
||||||
import pytz
|
|
||||||
import six
|
import six
|
||||||
from factory import Factory, Sequence, lazy_attribute, lazy_attribute_sequence
|
from factory import Factory, Sequence, lazy_attribute, lazy_attribute_sequence
|
||||||
from factory.errors import CyclicDefinitionError
|
from factory.errors import CyclicDefinitionError
|
||||||
@@ -26,7 +26,6 @@ from xmodule.course_module import Textbook
|
|||||||
from xmodule.modulestore import ModuleStoreEnum, prefer_xmodules
|
from xmodule.modulestore import ModuleStoreEnum, prefer_xmodules
|
||||||
from xmodule.modulestore.tests.sample_courses import TOY_BLOCK_INFO_TREE, default_block_info_tree
|
from xmodule.modulestore.tests.sample_courses import TOY_BLOCK_INFO_TREE, default_block_info_tree
|
||||||
from xmodule.tabs import CourseTab
|
from xmodule.tabs import CourseTab
|
||||||
from xmodule.x_module import DEPRECATION_VSCOMPAT_EVENT # lint-amnesty, pylint: disable=unused-import
|
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ when using the Split modulestore.
|
|||||||
|
|
||||||
from shutil import rmtree
|
from shutil import rmtree
|
||||||
from tempfile import mkdtemp
|
from tempfile import mkdtemp
|
||||||
from unittest import TestCase, skip
|
from unittest import skip
|
||||||
|
|
||||||
import ddt
|
import ddt
|
||||||
import six
|
import six
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# lint-amnesty, pylint: disable=missing-module-docstring
|
# lint-amnesty, pylint: disable=missing-module-docstring
|
||||||
|
|
||||||
import codecs # lint-amnesty, pylint: disable=unused-import
|
|
||||||
import glob
|
import glob
|
||||||
import hashlib
|
import hashlib
|
||||||
import io
|
import io
|
||||||
@@ -34,7 +33,6 @@ from xmodule.modulestore import COURSE_ROOT, LIBRARY_ROOT, ModuleStoreEnum, Modu
|
|||||||
from xmodule.modulestore.xml_exporter import DEFAULT_CONTENT_FIELDS
|
from xmodule.modulestore.xml_exporter import DEFAULT_CONTENT_FIELDS
|
||||||
from xmodule.tabs import CourseTabList
|
from xmodule.tabs import CourseTabList
|
||||||
from xmodule.x_module import ( # lint-amnesty, pylint: disable=unused-import
|
from xmodule.x_module import ( # lint-amnesty, pylint: disable=unused-import
|
||||||
DEPRECATION_VSCOMPAT_EVENT,
|
|
||||||
AsideKeyGenerator,
|
AsideKeyGenerator,
|
||||||
OpaqueKeyReader,
|
OpaqueKeyReader,
|
||||||
XMLParsingSystem,
|
XMLParsingSystem,
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import pymongo
|
|||||||
from mongodb_proxy import MongoProxy
|
from mongodb_proxy import MongoProxy
|
||||||
from pymongo.read_preferences import ( # lint-amnesty, pylint: disable=unused-import
|
from pymongo.read_preferences import ( # lint-amnesty, pylint: disable=unused-import
|
||||||
ReadPreference,
|
ReadPreference,
|
||||||
read_pref_mode_from_name,
|
|
||||||
_MONGOS_MODES,
|
_MONGOS_MODES,
|
||||||
_MODES
|
_MODES
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ persist the assignments.
|
|||||||
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import six # lint-amnesty, pylint: disable=unused-import
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
from openedx.core.lib.cache_utils import request_cached
|
from openedx.core.lib.cache_utils import request_cached
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ from datetime import datetime
|
|||||||
import pytest
|
import pytest
|
||||||
import six
|
import six
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from mock import Mock, patch # lint-amnesty, pylint: disable=unused-import
|
from mock import Mock # lint-amnesty, pylint: disable=unused-import
|
||||||
from opaque_keys.edx.locator import CourseLocator
|
from opaque_keys.edx.locator import CourseLocator
|
||||||
from stevedore.extension import Extension, ExtensionManager
|
from stevedore.extension import Extension, ExtensionManager
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ from collections import OrderedDict
|
|||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
|
||||||
from pkg_resources import resource_string
|
from pkg_resources import resource_string
|
||||||
|
|
||||||
import six # lint-amnesty, pylint: disable=unused-import
|
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
from openedx.core.djangolib.markup import Text, HTML
|
from openedx.core.djangolib.markup import Text, HTML
|
||||||
from xblock.fields import Boolean, Dict, List, Scope, String # lint-amnesty, pylint: disable=wrong-import-order
|
from xblock.fields import Boolean, Dict, List, Scope, String # lint-amnesty, pylint: disable=wrong-import-order
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ from datetime import datetime
|
|||||||
from functools import reduce
|
from functools import reduce
|
||||||
|
|
||||||
import six
|
import six
|
||||||
from django.contrib.auth import get_user_model
|
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
from opaque_keys.edx.keys import UsageKey
|
from opaque_keys.edx.keys import UsageKey
|
||||||
from pkg_resources import resource_string
|
from pkg_resources import resource_string
|
||||||
@@ -25,7 +24,6 @@ from xblock.exceptions import NoSuchServiceError
|
|||||||
from xblock.fields import Boolean, Integer, List, Scope, String
|
from xblock.fields import Boolean, Integer, List, Scope, String
|
||||||
|
|
||||||
from edx_toggles.toggles import LegacyWaffleFlag
|
from edx_toggles.toggles import LegacyWaffleFlag
|
||||||
from edx_toggles.toggles import WaffleFlag # lint-amnesty, pylint: disable=unused-import
|
|
||||||
from lms.djangoapps.courseware.toggles import COURSEWARE_PROCTORING_IMPROVEMENTS
|
from lms.djangoapps.courseware.toggles import COURSEWARE_PROCTORING_IMPROVEMENTS
|
||||||
|
|
||||||
from .exceptions import NotFoundError
|
from .exceptions import NotFoundError
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from string import Template
|
|||||||
|
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
from xmodule.raw_module import RawDescriptor
|
from xmodule.raw_module import RawDescriptor
|
||||||
from xmodule.x_module import DEPRECATION_VSCOMPAT_EVENT, XModule # lint-amnesty, pylint: disable=unused-import
|
from xmodule.x_module import XModule # lint-amnesty, pylint: disable=unused-import
|
||||||
|
|
||||||
|
|
||||||
class CustomTagModule(XModule):
|
class CustomTagModule(XModule):
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
from mock import Mock # lint-amnesty, pylint: disable=unused-import
|
|
||||||
from opaque_keys.edx.locator import BlockUsageLocator, CourseLocator
|
from opaque_keys.edx.locator import BlockUsageLocator, CourseLocator
|
||||||
from xblock.field_data import DictFieldData
|
from xblock.field_data import DictFieldData
|
||||||
from xblock.fields import ScopeIds
|
from xblock.fields import ScopeIds
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
"""
|
"""
|
||||||
Tests for Source from Library XBlock
|
Tests for Source from Library XBlock
|
||||||
"""
|
"""
|
||||||
from xblockutils.resources import ResourceLoader # lint-amnesty, pylint: disable=unused-import
|
|
||||||
|
|
||||||
from openedx.core.djangoapps.content_libraries.tests.base import ContentLibrariesRestApiTest
|
from openedx.core.djangoapps.content_libraries.tests.base import ContentLibrariesRestApiTest
|
||||||
from common.djangoapps.student.roles import CourseInstructorRole
|
from common.djangoapps.student.roles import CourseInstructorRole
|
||||||
from cms.lib.xblock.runtime import handler_url # lint-amnesty, pylint: disable=unused-import
|
|
||||||
from xmodule.modulestore.django import modulestore
|
from xmodule.modulestore.django import modulestore
|
||||||
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
|
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
|
||||||
from xmodule.tests import get_test_system
|
from xmodule.tests import get_test_system
|
||||||
from xmodule.x_module import AUTHOR_VIEW, STUDENT_VIEW # lint-amnesty, pylint: disable=unused-import
|
from xmodule.x_module import STUDENT_VIEW # lint-amnesty, pylint: disable=unused-import
|
||||||
|
|
||||||
|
|
||||||
class LibrarySourcedBlockTestCase(ContentLibrariesRestApiTest):
|
class LibrarySourcedBlockTestCase(ContentLibrariesRestApiTest):
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ from six.moves import range
|
|||||||
from web_fragments.fragment import Fragment
|
from web_fragments.fragment import Fragment
|
||||||
|
|
||||||
from edx_toggles.toggles.testutils import override_waffle_flag
|
from edx_toggles.toggles.testutils import override_waffle_flag
|
||||||
from common.djangoapps.student.tests.factories import UserFactory
|
|
||||||
from openedx.features.content_type_gating.models import ContentTypeGatingConfig
|
from openedx.features.content_type_gating.models import ContentTypeGatingConfig
|
||||||
from xmodule.seq_module import TIMED_EXAM_GATING_WAFFLE_FLAG, SequenceModule
|
from xmodule.seq_module import TIMED_EXAM_GATING_WAFFLE_FLAG, SequenceModule
|
||||||
from xmodule.tests import get_test_system
|
from xmodule.tests import get_test_system
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ from xblock.fields import Dict, Scope, ScopeIds
|
|||||||
from xblock.runtime import KvsFieldData
|
from xblock.runtime import KvsFieldData
|
||||||
from xmodule.modulestore import EdxJSONEncoder
|
from xmodule.modulestore import EdxJSONEncoder
|
||||||
from xmodule.modulestore.inheritance import InheritanceKeyValueStore, own_metadata
|
from xmodule.modulestore.inheritance import InheritanceKeyValueStore, own_metadata
|
||||||
from xmodule.x_module import DEPRECATION_VSCOMPAT_EVENT, XModuleDescriptor # lint-amnesty, pylint: disable=unused-import
|
from xmodule.x_module import XModuleDescriptor # lint-amnesty, pylint: disable=unused-import
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user