Merge pull request #29436 from edx/jawayria/bom-2606-30
chore: Applied lint-amnesty on openedx/core/djangoapps/content
This commit is contained in:
@@ -16,7 +16,7 @@ from openedx.core.lib.command_utils import (
|
||||
parse_course_keys,
|
||||
validate_dependent_option
|
||||
)
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ from openedx.core.djangoapps.content.block_structure.tests.helpers import (
|
||||
is_course_in_block_structure_cache,
|
||||
is_course_in_block_structure_storage
|
||||
)
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
from .. import generate_course_blocks
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ from opaque_keys.edx.keys import CourseKey
|
||||
from capa.responsetypes import LoncapaProblemError
|
||||
from openedx.core.djangoapps.content.block_structure import api
|
||||
from openedx.core.djangoapps.content.block_structure.config import enable_storage_backing_for_cache_in_request
|
||||
from xmodule.modulestore.exceptions import ItemNotFoundError
|
||||
from xmodule.modulestore.exceptions import ItemNotFoundError # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
log = logging.getLogger('edx.celery.task')
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ from opaque_keys import InvalidKeyError
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
from openedx.core.djangoapps.content.course_overviews.models import SimulateCoursePublishConfig
|
||||
from lms.djangoapps.ccx.tasks import course_published_handler as ccx_receiver_fn
|
||||
from xmodule.modulestore.django import SignalHandler, modulestore
|
||||
from xmodule.modulestore.django import SignalHandler, modulestore # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
log = logging.getLogger('simulate_publish')
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ from django.core.management.base import CommandError
|
||||
|
||||
from openedx.core.djangoapps.content.course_overviews.management.commands import generate_course_overview
|
||||
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
class TestGenerateCourseOverview(ModuleStoreTestCase):
|
||||
|
||||
@@ -9,10 +9,10 @@ import lms.djangoapps.ccx.tasks
|
||||
import openedx.core.djangoapps.content.course_overviews.signals
|
||||
from openedx.core.djangoapps.content.course_overviews.management.commands.simulate_publish import Command, name_from_fn
|
||||
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview, SimulateCoursePublishConfig
|
||||
from xmodule.modulestore import ModuleStoreEnum
|
||||
from xmodule.modulestore.django import SwitchedSignal
|
||||
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory
|
||||
from xmodule.modulestore import ModuleStoreEnum # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.django import SwitchedSignal # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
LOGGER_NAME = 'simulate_publish'
|
||||
|
||||
|
||||
@@ -30,11 +30,11 @@ from openedx.core.djangoapps.lang_pref.api import get_closest_released_language
|
||||
from openedx.core.djangoapps.models.course_details import CourseDetails
|
||||
from openedx.core.lib.cache_utils import request_cached, RequestCache
|
||||
from common.djangoapps.static_replace.models import AssetBaseUrlConfig
|
||||
from xmodule import block_metadata_utils, course_metadata_utils
|
||||
from xmodule.course_module import DEFAULT_START_DATE, CourseBlock
|
||||
from xmodule.error_module import ErrorBlock
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.tabs import CourseTab
|
||||
from xmodule import block_metadata_utils, course_metadata_utils # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.course_module import DEFAULT_START_DATE, CourseBlock # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.error_module import ErrorBlock # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.tabs import CourseTab # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ from django.dispatch import Signal
|
||||
from django.dispatch.dispatcher import receiver
|
||||
|
||||
from openedx.core.djangoapps.signals.signals import COURSE_CERT_DATE_CHANGE
|
||||
from xmodule.modulestore.django import SignalHandler
|
||||
from xmodule.modulestore.django import SignalHandler # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
from .models import CourseOverview
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ from edx_django_utils.monitoring import set_code_owner_attribute
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
|
||||
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ from openedx.core.djangoapps.content.course_overviews.api import (
|
||||
get_pseudo_course_overview,
|
||||
)
|
||||
from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
class TestCourseOverviewsApi(ModuleStoreTestCase):
|
||||
|
||||
@@ -24,20 +24,20 @@ from openedx.core.djangoapps.models.course_details import CourseDetails
|
||||
from openedx.core.djangolib.testing.utils import CacheIsolationTestCase
|
||||
from openedx.core.lib.courses import course_image_url
|
||||
from common.djangoapps.static_replace.models import AssetBaseUrlConfig
|
||||
from xmodule.assetstore.assetmgr import AssetManager
|
||||
from xmodule.contentstore.content import StaticContent
|
||||
from xmodule.contentstore.django import contentstore
|
||||
from xmodule.course_metadata_utils import DEFAULT_START_DATE
|
||||
from xmodule.course_module import (
|
||||
from xmodule.assetstore.assetmgr import AssetManager # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.contentstore.content import StaticContent # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.contentstore.django import contentstore # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.course_metadata_utils import DEFAULT_START_DATE # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.course_module import ( # lint-amnesty, pylint: disable=wrong-import-order
|
||||
CATALOG_VISIBILITY_ABOUT,
|
||||
CATALOG_VISIBILITY_CATALOG_AND_ABOUT,
|
||||
CATALOG_VISIBILITY_NONE
|
||||
)
|
||||
from xmodule.error_module import ErrorBlock
|
||||
from xmodule.modulestore import ModuleStoreEnum
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory, check_mongo_calls_range
|
||||
from xmodule.error_module import ErrorBlock # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore import ModuleStoreEnum # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.modulestore.django import modulestore # 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, check_mongo_calls_range # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
from ..models import CourseOverview, CourseOverviewImageConfig, CourseOverviewImageSet, CourseOverviewTab
|
||||
from .factories import CourseOverviewFactory
|
||||
|
||||
@@ -6,14 +6,14 @@ from typing import Dict
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
from openedx.core import types
|
||||
|
||||
from xmodule.partitions.enrollment_track_partition_generator import (
|
||||
from xmodule.partitions.enrollment_track_partition_generator import ( # lint-amnesty, pylint: disable=wrong-import-order
|
||||
create_enrollment_track_partition_with_course_id
|
||||
)
|
||||
from xmodule.partitions.partitions import (
|
||||
from xmodule.partitions.partitions import ( # lint-amnesty, pylint: disable=wrong-import-order
|
||||
ENROLLMENT_TRACK_PARTITION_ID,
|
||||
)
|
||||
from xmodule.partitions.partitions_service import get_user_partition_groups
|
||||
from xmodule.partitions.partitions import Group
|
||||
from xmodule.partitions.partitions_service import get_user_partition_groups # lint-amnesty, pylint: disable=wrong-import-order
|
||||
from xmodule.partitions.partitions import Group # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
from .base import OutlineProcessor
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ from common.djangoapps.course_modes.signals import update_masters_access_course
|
||||
from common.djangoapps.student.auth import user_has_role
|
||||
from common.djangoapps.student.roles import CourseBetaTesterRole
|
||||
from common.djangoapps.student.tests.factories import BetaTesterFactory, UserFactory
|
||||
from xmodule.partitions.partitions import (
|
||||
from xmodule.partitions.partitions import ( # lint-amnesty, pylint: disable=wrong-import-order
|
||||
ENROLLMENT_TRACK_PARTITION_ID,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user