chore: Applied lint-amnesty on lms/{envs, lib} (#29392)
This commit is contained in:
@@ -20,7 +20,7 @@ from django.utils.translation import gettext_lazy
|
||||
from path import Path as path
|
||||
|
||||
from openedx.core.release import RELEASE_LINE
|
||||
from xmodule.modulestore.modulestore_settings import update_module_store_settings
|
||||
from xmodule.modulestore.modulestore_settings import update_module_store_settings # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
CONFIG_ROOT = path(__file__).abspath().dirname()
|
||||
TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root"
|
||||
|
||||
@@ -1453,12 +1453,10 @@ COURSE_LISTINGS = {}
|
||||
############# XBlock Configuration ##########
|
||||
|
||||
# Import after sys.path fixup
|
||||
# pylint: disable=wrong-import-position
|
||||
from xmodule.modulestore.edit_info import EditInfoMixin
|
||||
from xmodule.modulestore.inheritance import InheritanceMixin
|
||||
from xmodule.modulestore import prefer_xmodules
|
||||
from xmodule.x_module import XModuleMixin
|
||||
# pylint: enable=wrong-import-position
|
||||
from xmodule.modulestore.edit_info import EditInfoMixin # lint-amnesty, pylint: disable=wrong-import-order, wrong-import-position
|
||||
from xmodule.modulestore.inheritance import InheritanceMixin # lint-amnesty, pylint: disable=wrong-import-order, wrong-import-position
|
||||
from xmodule.modulestore import prefer_xmodules # lint-amnesty, pylint: disable=wrong-import-order, wrong-import-position
|
||||
from xmodule.x_module import XModuleMixin # lint-amnesty, pylint: disable=wrong-import-order, wrong-import-position
|
||||
|
||||
# These are the Mixins that should be added to every XBlock.
|
||||
# This should be moved into an XBlock Runtime/Application object
|
||||
|
||||
@@ -30,7 +30,7 @@ from path import Path as path
|
||||
from openedx.core.djangoapps.plugins.constants import ProjectType, SettingsType
|
||||
from openedx.core.lib.derived import derive_settings
|
||||
from openedx.core.lib.logsettings import get_logger_config
|
||||
from xmodule.modulestore.modulestore_settings import convert_module_store_setting_if_needed
|
||||
from xmodule.modulestore.modulestore_settings import convert_module_store_setting_if_needed # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
from .common import *
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ from path import Path as path
|
||||
from openedx.core.djangoapps.plugins.constants import ProjectType, SettingsType
|
||||
from openedx.core.lib.derived import derive_settings
|
||||
from openedx.core.lib.tempdir import mkdtemp_clean
|
||||
from xmodule.modulestore.modulestore_settings import update_module_store_settings
|
||||
from xmodule.modulestore.modulestore_settings import update_module_store_settings # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
from .common import *
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ from search.result_processor import SearchResultProcessor
|
||||
|
||||
from lms.djangoapps.course_blocks.api import get_course_blocks
|
||||
from lms.djangoapps.courseware.access import has_access
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
class LmsSearchResultProcessor(SearchResultProcessor):
|
||||
|
||||
@@ -6,8 +6,8 @@ from unittest.mock import Mock, patch
|
||||
from lms.lib.courseware_search.lms_filter_generator import LmsSearchFilterGenerator
|
||||
from common.djangoapps.student.models import CourseEnrollment
|
||||
from common.djangoapps.student.tests.factories import UserFactory
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
class LmsSearchFilterGeneratorTestCase(ModuleStoreTestCase):
|
||||
|
||||
@@ -5,8 +5,8 @@ import pytest
|
||||
|
||||
from common.djangoapps.student.tests.factories import UserFactory
|
||||
from lms.lib.courseware_search.lms_result_processor import LmsSearchResultProcessor
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
class LmsSearchResultProcessorTestCase(ModuleStoreTestCase):
|
||||
|
||||
@@ -4,9 +4,9 @@ Tests for the LMS/lib utils
|
||||
|
||||
|
||||
from lms.lib import utils
|
||||
from xmodule.modulestore import ModuleStoreEnum
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
|
||||
from xmodule.modulestore import ModuleStoreEnum # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
class LmsUtilsTest(ModuleStoreTestCase):
|
||||
|
||||
@@ -13,10 +13,10 @@ from lms.djangoapps.lms_xblock.mixin import (
|
||||
INVALID_USER_PARTITION_VALIDATION_UNIT,
|
||||
NONSENSICAL_ACCESS_RESTRICTION
|
||||
)
|
||||
from xmodule.modulestore import ModuleStoreEnum
|
||||
from xmodule.modulestore.tests.django_utils import TEST_DATA_MIXED_MODULESTORE, ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory, ToyCourseFactory
|
||||
from xmodule.partitions.partitions import Group, UserPartition
|
||||
from xmodule.modulestore import ModuleStoreEnum # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.django_utils import TEST_DATA_MIXED_MODULESTORE, ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory, ToyCourseFactory # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.partitions.partitions import Group, UserPartition # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
class LmsXBlockMixinTestCase(ModuleStoreTestCase):
|
||||
|
||||
Reference in New Issue
Block a user