From 59002b5702b84a9b1e612a65506f33de6f069fd3 Mon Sep 17 00:00:00 2001 From: Jawayria Date: Mon, 22 Nov 2021 15:33:33 +0500 Subject: [PATCH] chore: Applied lint-amnesty on lms/djangoapps/{course_api, course_blocks} --- lms/djangoapps/course_api/api.py | 4 ++-- lms/djangoapps/course_api/blocks/forms.py | 2 +- lms/djangoapps/course_api/blocks/permissions.py | 2 +- lms/djangoapps/course_api/blocks/tests/test_api.py | 8 ++++---- lms/djangoapps/course_api/blocks/tests/test_forms.py | 4 ++-- .../course_api/blocks/tests/test_serializers.py | 6 +++--- lms/djangoapps/course_api/blocks/tests/test_views.py | 4 ++-- .../blocks/transformers/tests/test_block_completion.py | 2 +- .../blocks/transformers/tests/test_block_counts.py | 4 ++-- .../blocks/transformers/tests/test_extra_fields.py | 4 ++-- .../blocks/transformers/tests/test_navigation.py | 6 +++--- .../blocks/transformers/tests/test_student_view.py | 4 ++-- .../blocks/transformers/tests/test_video_urls.py | 4 ++-- .../course_api/blocks/transformers/video_urls.py | 2 +- lms/djangoapps/course_api/blocks/views.py | 4 ++-- lms/djangoapps/course_api/tests/mixins.py | 2 +- lms/djangoapps/course_api/tests/test_api.py | 6 +++--- lms/djangoapps/course_api/tests/test_forms.py | 4 ++-- lms/djangoapps/course_api/tests/test_serializers.py | 6 +++--- lms/djangoapps/course_api/tests/test_views.py | 4 ++-- .../course_blocks/transformers/hidden_content.py | 2 +- .../course_blocks/transformers/library_content.py | 4 ++-- lms/djangoapps/course_blocks/transformers/start_date.py | 2 +- .../course_blocks/transformers/tests/helpers.py | 8 ++++---- .../transformers/tests/test_load_override_data.py | 6 +++--- .../course_blocks/transformers/tests/test_split_test.py | 6 +++--- .../transformers/tests/test_user_partitions.py | 4 ++-- .../course_blocks/transformers/user_partitions.py | 2 +- 28 files changed, 58 insertions(+), 58 deletions(-) diff --git a/lms/djangoapps/course_api/api.py b/lms/djangoapps/course_api/api.py index 6b0ae672c6..4b5eeb942f 100644 --- a/lms/djangoapps/course_api/api.py +++ b/lms/djangoapps/course_api/api.py @@ -25,8 +25,8 @@ from openedx.core.djangoapps.content.course_overviews.models import CourseOvervi from openedx.core.djangoapps.content.learning_sequences.api import get_course_outline from openedx.core.djangoapps.content.learning_sequences.data import CourseOutlineData from openedx.core.lib.api.view_utils import LazySequence -from xmodule.modulestore.django import modulestore -from xmodule.modulestore.exceptions import ItemNotFoundError +from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.exceptions import ItemNotFoundError # lint-amnesty, pylint: disable=wrong-import-order from .exceptions import OverEnrollmentLimitException from .permissions import can_view_courses_for_username diff --git a/lms/djangoapps/course_api/blocks/forms.py b/lms/djangoapps/course_api/blocks/forms.py index 0d7006a005..b6d14ec9fb 100644 --- a/lms/djangoapps/course_api/blocks/forms.py +++ b/lms/djangoapps/course_api/blocks/forms.py @@ -12,7 +12,7 @@ from opaque_keys.edx.keys import UsageKey from rest_framework.exceptions import PermissionDenied from openedx.core.djangoapps.util.forms import ExtendedNullBooleanField, MultiValueField -from xmodule.modulestore.django import modulestore +from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order from . import permissions diff --git a/lms/djangoapps/course_api/blocks/permissions.py b/lms/djangoapps/course_api/blocks/permissions.py index 4b8e976aae..45156de411 100644 --- a/lms/djangoapps/course_api/blocks/permissions.py +++ b/lms/djangoapps/course_api/blocks/permissions.py @@ -13,7 +13,7 @@ from lms.djangoapps.courseware.courses import get_course from lms.djangoapps.courseware.exceptions import CourseRunNotFound from openedx.core.djangoapps.content.course_overviews.models import \ CourseOverview # lint-amnesty, pylint: disable=unused-import -from xmodule.course_module import COURSE_VISIBILITY_PUBLIC +from xmodule.course_module import COURSE_VISIBILITY_PUBLIC # lint-amnesty, pylint: disable=wrong-import-order def can_access_all_blocks(requesting_user, course_key): diff --git a/lms/djangoapps/course_api/blocks/tests/test_api.py b/lms/djangoapps/course_api/blocks/tests/test_api.py index 71c5905b8c..6ae491ea30 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_api.py +++ b/lms/djangoapps/course_api/blocks/tests/test_api.py @@ -13,10 +13,10 @@ from edx_toggles.toggles.testutils import override_waffle_switch from common.djangoapps.student.tests.factories import UserFactory from openedx.core.djangoapps.content.block_structure.api import clear_course_from_cache from openedx.core.djangoapps.content.block_structure.config import STORAGE_BACKING_FOR_CACHE -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import SampleCourseFactory, check_mongo_calls -from xmodule.modulestore.tests.sample_courses import BlockInfo +from xmodule.modulestore import ModuleStoreEnum # 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 SampleCourseFactory, check_mongo_calls # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.sample_courses import BlockInfo # lint-amnesty, pylint: disable=wrong-import-order from ..api import get_blocks diff --git a/lms/djangoapps/course_api/blocks/tests/test_forms.py b/lms/djangoapps/course_api/blocks/tests/test_forms.py index 683a384e7a..1a45b40292 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_forms.py +++ b/lms/djangoapps/course_api/blocks/tests/test_forms.py @@ -14,8 +14,8 @@ from rest_framework.exceptions import PermissionDenied from common.djangoapps.student.models import CourseEnrollment from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from openedx.core.djangoapps.util.test_forms import FormTestMixin -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory +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 from ..forms import BlockListGetForm diff --git a/lms/djangoapps/course_api/blocks/tests/test_serializers.py b/lms/djangoapps/course_api/blocks/tests/test_serializers.py index 192bb53d13..e3bae70e23 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_serializers.py +++ b/lms/djangoapps/course_api/blocks/tests/test_serializers.py @@ -9,9 +9,9 @@ from common.djangoapps.student.roles import CourseStaffRole from common.djangoapps.student.tests.factories import UserFactory from lms.djangoapps.course_blocks.api import get_course_block_access_transformers, get_course_blocks from openedx.core.djangoapps.content.block_structure.transformers import BlockStructureTransformers -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import ToyCourseFactory +from xmodule.modulestore import ModuleStoreEnum # 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 ToyCourseFactory # lint-amnesty, pylint: disable=wrong-import-order from ..serializers import BlockDictSerializer, BlockSerializer from ..transformers.blocks_api import BlocksAPITransformer diff --git a/lms/djangoapps/course_api/blocks/tests/test_views.py b/lms/djangoapps/course_api/blocks/tests/test_views.py index 6e17e83dd4..0a329ad426 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_views.py +++ b/lms/djangoapps/course_api/blocks/tests/test_views.py @@ -16,8 +16,8 @@ from opaque_keys.edx.locator import CourseLocator from common.djangoapps.student.models import CourseEnrollment from common.djangoapps.student.roles import CourseDataResearcherRole from common.djangoapps.student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import ToyCourseFactory +from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import ToyCourseFactory # lint-amnesty, pylint: disable=wrong-import-order from .helpers import deserialize_usage_key diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_completion.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_completion.py index 8c57739c44..5804fdaf2e 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_completion.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_completion.py @@ -12,7 +12,7 @@ from common.djangoapps.student.tests.factories import UserFactory from lms.djangoapps.course_api.blocks.transformers.block_completion import BlockCompletionTransformer from lms.djangoapps.course_blocks.api import get_course_blocks from lms.djangoapps.course_blocks.transformers.tests.helpers import ModuleStoreTestCase, TransformerRegistryTestMixin -from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory +from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory # lint-amnesty, pylint: disable=wrong-import-order class StubAggregatorXBlock(XBlock): diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_counts.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_counts.py index bfd2ea4a3e..78b3f70b33 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_counts.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_counts.py @@ -6,8 +6,8 @@ Tests for BlockCountsTransformer. from openedx.core.djangoapps.content.block_structure.factory import BlockStructureFactory -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from xmodule.modulestore.tests.factories import SampleCourseFactory +from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import SampleCourseFactory # lint-amnesty, pylint: disable=wrong-import-order from ..block_counts import BlockCountsTransformer diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_extra_fields.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_extra_fields.py index 0fee9166dd..620dc5fe74 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_extra_fields.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_extra_fields.py @@ -5,8 +5,8 @@ from django.test import override_settings # pylint: disable=protected-access from openedx.core.djangoapps.content.block_structure.factory import BlockStructureFactory -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from xmodule.modulestore.tests.factories import SampleCourseFactory +from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import SampleCourseFactory # lint-amnesty, pylint: disable=wrong-import-order from ..extra_fields import ExtraFieldsTransformer diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_navigation.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_navigation.py index 6d1110d678..634743abbd 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_navigation.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_navigation.py @@ -13,9 +13,9 @@ from lms.djangoapps.course_api.blocks.transformers.navigation import BlockNaviga from openedx.core.djangoapps.content.block_structure.block_structure import BlockStructureModulestoreData from openedx.core.djangoapps.content.block_structure.factory import BlockStructureFactory from openedx.core.djangoapps.content.block_structure.tests.helpers import ChildrenMapTestMixin -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from xmodule.modulestore.tests.factories import SampleCourseFactory +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 SampleCourseFactory # lint-amnesty, pylint: disable=wrong-import-order @ddt.ddt diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_student_view.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_student_view.py index 91977c0c77..8fe9075eec 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_student_view.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_student_view.py @@ -7,8 +7,8 @@ import ddt # pylint: disable=protected-access from openedx.core.djangoapps.content.block_structure.factory import BlockStructureFactory -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from xmodule.modulestore.tests.factories import ToyCourseFactory +from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import ToyCourseFactory # lint-amnesty, pylint: disable=wrong-import-order from ..student_view import StudentViewTransformer diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_video_urls.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_video_urls.py index bd327d0cc3..44c3536e15 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_video_urls.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_video_urls.py @@ -6,8 +6,8 @@ Tests for VideoBlockURLTransformer. from unittest import mock from openedx.core.djangoapps.content.block_structure.factory import BlockStructureFactory -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from xmodule.modulestore.tests.factories import ToyCourseFactory +from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import ToyCourseFactory # lint-amnesty, pylint: disable=wrong-import-order from ..student_view import StudentViewTransformer from ..video_urls import VideoBlockURLTransformer diff --git a/lms/djangoapps/course_api/blocks/transformers/video_urls.py b/lms/djangoapps/course_api/blocks/transformers/video_urls.py index 843aa9fa3f..60e0f3ed82 100644 --- a/lms/djangoapps/course_api/blocks/transformers/video_urls.py +++ b/lms/djangoapps/course_api/blocks/transformers/video_urls.py @@ -6,7 +6,7 @@ Video block URL Transformer from django.conf import settings from openedx.core.djangoapps.content.block_structure.transformer import BlockStructureTransformer -from xmodule.video_module.video_utils import rewrite_video_url +from xmodule.video_module.video_utils import rewrite_video_url # lint-amnesty, pylint: disable=wrong-import-order from .student_view import StudentViewTransformer diff --git a/lms/djangoapps/course_api/blocks/views.py b/lms/djangoapps/course_api/blocks/views.py index 45a7638e19..437ebfc3dc 100644 --- a/lms/djangoapps/course_api/blocks/views.py +++ b/lms/djangoapps/course_api/blocks/views.py @@ -15,8 +15,8 @@ from rest_framework.response import Response from lms.djangoapps.course_goals.models import UserActivity from openedx.core.lib.api.view_utils import DeveloperErrorViewMixin, view_auth_classes -from xmodule.modulestore.django import modulestore -from xmodule.modulestore.exceptions import ItemNotFoundError +from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.exceptions import ItemNotFoundError # lint-amnesty, pylint: disable=wrong-import-order from .api import get_blocks from .forms import BlockListGetForm diff --git a/lms/djangoapps/course_api/tests/mixins.py b/lms/djangoapps/course_api/tests/mixins.py index 614b56743b..eb1cef2612 100644 --- a/lms/djangoapps/course_api/tests/mixins.py +++ b/lms/djangoapps/course_api/tests/mixins.py @@ -6,7 +6,7 @@ Common mixins for Course API Tests from datetime import datetime from common.djangoapps.student.tests.factories import UserFactory, CourseEnrollmentFactory, CourseAccessRoleFactory -from xmodule.modulestore.tests.factories import ToyCourseFactory +from xmodule.modulestore.tests.factories import ToyCourseFactory # lint-amnesty, pylint: disable=wrong-import-order TEST_PASSWORD = 'edx' diff --git a/lms/djangoapps/course_api/tests/test_api.py b/lms/djangoapps/course_api/tests/test_api.py index fc037fb055..690042f661 100644 --- a/lms/djangoapps/course_api/tests/test_api.py +++ b/lms/djangoapps/course_api/tests/test_api.py @@ -16,9 +16,9 @@ from rest_framework.request import Request from rest_framework.test import APIRequestFactory from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from xmodule.modulestore.exceptions import ItemNotFoundError -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import ItemFactory, check_mongo_calls +from xmodule.modulestore.exceptions import ItemNotFoundError # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import ItemFactory, check_mongo_calls # lint-amnesty, pylint: disable=wrong-import-order from ..api import UNKNOWN_BLOCK_DISPLAY_NAME, course_detail, get_due_dates, list_courses, get_course_members from ..exceptions import OverEnrollmentLimitException diff --git a/lms/djangoapps/course_api/tests/test_forms.py b/lms/djangoapps/course_api/tests/test_forms.py index fe5db50637..76c2fd0812 100644 --- a/lms/djangoapps/course_api/tests/test_forms.py +++ b/lms/djangoapps/course_api/tests/test_forms.py @@ -11,8 +11,8 @@ from django.http import QueryDict from common.djangoapps.student.tests.factories import UserFactory from openedx.core.djangoapps.util.test_forms import FormTestMixin -from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory +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 from ..forms import CourseDetailGetForm, CourseIdListGetForm, CourseListGetForm diff --git a/lms/djangoapps/course_api/tests/test_serializers.py b/lms/djangoapps/course_api/tests/test_serializers.py index 834c975218..61892b37c3 100644 --- a/lms/djangoapps/course_api/tests/test_serializers.py +++ b/lms/djangoapps/course_api/tests/test_serializers.py @@ -14,9 +14,9 @@ from xblock.core import XBlock from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.models.course_details import CourseDetails -from xmodule.course_module import DEFAULT_START_DATE -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from xmodule.modulestore.tests.factories import check_mongo_calls +from xmodule.course_module import DEFAULT_START_DATE # 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 check_mongo_calls # lint-amnesty, pylint: disable=wrong-import-order from ..serializers import CourseDetailSerializer, CourseKeySerializer, CourseSerializer from .mixins import CourseApiFactoryMixin diff --git a/lms/djangoapps/course_api/tests/test_views.py b/lms/djangoapps/course_api/tests/test_views.py index 425cab611d..5fed5d5fe6 100644 --- a/lms/djangoapps/course_api/tests/test_views.py +++ b/lms/djangoapps/course_api/tests/test_views.py @@ -26,8 +26,8 @@ from common.djangoapps.student.tests.factories import AdminFactory from openedx.core.lib.api.view_utils import LazySequence from openedx.features.content_type_gating.models import ContentTypeGatingConfig from openedx.features.course_duration_limits.models import CourseDurationLimitConfig -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase -from xmodule.modulestore.tests.factories import CourseFactory +from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order from ..views import CourseDetailView, CourseListUserThrottle, LazyPageNumberPagination from .mixins import TEST_PASSWORD, CourseApiFactoryMixin diff --git a/lms/djangoapps/course_blocks/transformers/hidden_content.py b/lms/djangoapps/course_blocks/transformers/hidden_content.py index f8b6ddc131..6f031fc608 100644 --- a/lms/djangoapps/course_blocks/transformers/hidden_content.py +++ b/lms/djangoapps/course_blocks/transformers/hidden_content.py @@ -8,7 +8,7 @@ from datetime import datetime from pytz import utc from openedx.core.djangoapps.content.block_structure.transformer import BlockStructureTransformer -from xmodule.seq_module import SequenceBlock +from xmodule.seq_module import SequenceBlock # lint-amnesty, pylint: disable=wrong-import-order from .utils import collect_merged_boolean_field diff --git a/lms/djangoapps/course_blocks/transformers/library_content.py b/lms/djangoapps/course_blocks/transformers/library_content.py index 455a60e8ad..7a9dbddc46 100644 --- a/lms/djangoapps/course_blocks/transformers/library_content.py +++ b/lms/djangoapps/course_blocks/transformers/library_content.py @@ -14,8 +14,8 @@ from openedx.core.djangoapps.content.block_structure.transformer import ( BlockStructureTransformer, FilteringTransformerMixin ) -from xmodule.library_content_module import LibraryContentBlock -from xmodule.modulestore.django import modulestore +from xmodule.library_content_module import LibraryContentBlock # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order from ..utils import get_student_module_as_dict diff --git a/lms/djangoapps/course_blocks/transformers/start_date.py b/lms/djangoapps/course_blocks/transformers/start_date.py index f6086e6f82..cfcbe179bd 100644 --- a/lms/djangoapps/course_blocks/transformers/start_date.py +++ b/lms/djangoapps/course_blocks/transformers/start_date.py @@ -11,7 +11,7 @@ from openedx.core.djangoapps.content.block_structure.transformer import ( BlockStructureTransformer, FilteringTransformerMixin ) -from xmodule.course_metadata_utils import DEFAULT_START_DATE +from xmodule.course_metadata_utils import DEFAULT_START_DATE # lint-amnesty, pylint: disable=wrong-import-order from .utils import collect_merged_date_field diff --git a/lms/djangoapps/course_blocks/transformers/tests/helpers.py b/lms/djangoapps/course_blocks/transformers/tests/helpers.py index 2562a367f3..356030c6ed 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/helpers.py +++ b/lms/djangoapps/course_blocks/transformers/tests/helpers.py @@ -10,10 +10,10 @@ from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, U from lms.djangoapps.courseware.access import has_access from openedx.core.djangoapps.content.block_structure.tests.helpers import clear_registered_transformers_cache from openedx.core.djangoapps.content.block_structure.transformers import BlockStructureTransformers -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, ItemFactory +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, ItemFactory # lint-amnesty, pylint: disable=wrong-import-order from ...api import get_course_blocks diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py b/lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py index 97f232cabc..1cf18c29be 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py @@ -12,9 +12,9 @@ from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, U from lms.djangoapps.course_blocks.transformers.load_override_data import REQUESTED_FIELDS, OverrideDataTransformer from lms.djangoapps.courseware.student_field_overrides import get_override_for_user, override_field_for_user from openedx.core.djangoapps.content.block_structure.factory import BlockStructureFactory -from xmodule.modulestore.django import modulestore -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from xmodule.modulestore.tests.factories import ToyCourseFactory +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 ToyCourseFactory # lint-amnesty, pylint: disable=wrong-import-order expected_overrides = { 'start': datetime.datetime( diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py b/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py index 35bcfcc5bd..f7aafc1316 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py @@ -8,9 +8,9 @@ import ddt import openedx.core.djangoapps.user_api.course_tag.api as course_tag_api from common.djangoapps.student.tests.factories import CourseEnrollmentFactory from openedx.core.djangoapps.user_api.partition_schemes import RandomUserPartitionScheme -from xmodule.modulestore.tests.factories import check_mongo_calls -from xmodule.partitions.partitions import Group, UserPartition -from xmodule.partitions.partitions_service import get_user_partition_groups +from xmodule.modulestore.tests.factories import check_mongo_calls # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.partitions.partitions import Group, UserPartition # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.partitions.partitions_service import get_user_partition_groups # lint-amnesty, pylint: disable=wrong-import-order from ...api import get_course_blocks from ..user_partitions import UserPartitionTransformer diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py b/lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py index 47f7e7597e..410de94dc8 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py @@ -19,8 +19,8 @@ from openedx.core.djangoapps.course_groups.tests.helpers import CohortFactory, c from openedx.core.djangoapps.course_groups.views import link_cohort_to_partition_group from openedx.features.content_type_gating.models import ContentTypeGatingConfig from openedx.features.content_type_gating.partitions import create_content_gating_partition -from xmodule.modulestore.tests.factories import CourseFactory -from xmodule.partitions.partitions import Group, UserPartition +from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.partitions.partitions import Group, UserPartition # lint-amnesty, pylint: disable=wrong-import-order from ...api import get_course_blocks from ..user_partitions import UserPartitionTransformer, _MergedGroupAccess diff --git a/lms/djangoapps/course_blocks/transformers/user_partitions.py b/lms/djangoapps/course_blocks/transformers/user_partitions.py index 11151926bb..087c6e5fc7 100644 --- a/lms/djangoapps/course_blocks/transformers/user_partitions.py +++ b/lms/djangoapps/course_blocks/transformers/user_partitions.py @@ -7,7 +7,7 @@ from lms.djangoapps.courseware.access import has_access from openedx.core.djangoapps.content.block_structure.transformer import ( # lint-amnesty, pylint: disable=unused-import BlockStructureTransformer ) -from xmodule.partitions.partitions_service import ( +from xmodule.partitions.partitions_service import ( # lint-amnesty, pylint: disable=wrong-import-order get_all_partitions_for_course, get_partition_from_id, get_user_partition_groups