Merge pull request #29435 from edx/jawayria/bom-2606-31

chore: Applied lint-amnesty on openedx/core/djangoapps
This commit is contained in:
Jawayria
2021-12-06 15:23:46 +05:00
committed by GitHub
15 changed files with 38 additions and 38 deletions

View File

@@ -20,11 +20,11 @@ from opaque_keys.edx.locator import AssetLocator
from openedx.core.djangoapps.header_control import force_header_for_response
from common.djangoapps.student.models import CourseEnrollment
from xmodule.assetstore.assetmgr import AssetManager
from xmodule.contentstore.content import XASSET_LOCATION_TAG, StaticContent
from xmodule.exceptions import NotFoundError
from xmodule.modulestore import InvalidLocationError
from xmodule.modulestore.exceptions import ItemNotFoundError
from xmodule.assetstore.assetmgr import AssetManager # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.contentstore.content import XASSET_LOCATION_TAG, StaticContent # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.exceptions import NotFoundError # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.modulestore import InvalidLocationError # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.modulestore.exceptions import ItemNotFoundError # lint-amnesty, pylint: disable=wrong-import-order
from .caching import get_cached_content, set_cached_content
from .models import CdnUserAgentsConfig, CourseAssetCacheTtlConfig

View File

@@ -8,7 +8,7 @@ from django.conf import settings
from lms.djangoapps.edxnotes.plugins import EdxNotesCourseApp
from openedx.core.djangoapps.course_apps.tests.utils import TabBasedCourseAppTestMixin
from openedx.core.djangolib.testing.utils import skip_unless_cms
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
@skip_unless_cms

View File

@@ -8,8 +8,8 @@ from django.conf import settings
from lms.djangoapps.courseware.plugins import ProctoringCourseApp
from openedx.core.djangolib.testing.utils import skip_unless_cms
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, CourseUserType
from xmodule.modulestore.tests.factories import CourseFactory
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, CourseUserType # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order
@skip_unless_cms

View File

@@ -5,7 +5,7 @@ Tests for wiki course app.
from lms.djangoapps.course_wiki.plugins.course_app import WikiCourseApp
from openedx.core.djangoapps.course_apps.tests.utils import TabBasedCourseAppTestMixin
from openedx.core.djangolib.testing.utils import skip_unless_cms
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
@skip_unless_cms

View File

@@ -8,8 +8,8 @@ from opaque_keys.edx.keys import CourseKey
from common.djangoapps.student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory
from openedx.core.djangoapps.course_apps.plugins import CourseApp
from openedx.core.djangolib.testing.utils import skip_unless_cms
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.tests.factories import CourseFactory
from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order
def make_test_course_app(

View File

@@ -10,9 +10,9 @@ from xblock.fields import Scope
from cms.djangoapps.contentstore.config.waffle import CUSTOM_RELATIVE_DATES
from openedx.core.lib.graph_traversals import get_children, leaf_filter, traverse_pre_order
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.django import SignalHandler, modulestore
from xmodule.util.misc import is_xblock_an_assignment
from xmodule.modulestore import ModuleStoreEnum # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.modulestore.django import SignalHandler, modulestore # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.util.misc import is_xblock_an_assignment # lint-amnesty, pylint: disable=wrong-import-order
from .models import SelfPacedRelativeDatesConfig
from .utils import spaced_out_sections

View File

@@ -3,7 +3,7 @@ from datetime import timedelta
from unittest.mock import patch # lint-amnesty, pylint: disable=wrong-import-order
from cms.djangoapps.contentstore.config.waffle import CUSTOM_RELATIVE_DATES
from edx_toggles.toggles.testutils import override_waffle_flag
from edx_toggles.toggles.testutils import override_waffle_flag # lint-amnesty, pylint: disable=wrong-import-order
from openedx.core.djangoapps.course_date_signals.handlers import (
_gather_graded_items,
_get_custom_pacing_children,
@@ -11,8 +11,8 @@ from openedx.core.djangoapps.course_date_signals.handlers import (
extract_dates_from_course
)
from openedx.core.djangoapps.course_date_signals.models import SelfPacedRelativeDatesConfig
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
from . import utils

View File

@@ -16,8 +16,8 @@ from opaque_keys.edx.django.models import CourseKeyField
from openedx.core.djangolib.model_mixins import DeletableByUserValue
from openedx_events.learning.data import CohortData, CourseData, UserData, UserPersonalData
from openedx_events.learning.signals import COHORT_MEMBERSHIP_CHANGED
from openedx_events.learning.data import CohortData, CourseData, UserData, UserPersonalData # lint-amnesty, pylint: disable=wrong-import-order
from openedx_events.learning.signals import COHORT_MEMBERSHIP_CHANGED # lint-amnesty, pylint: disable=wrong-import-order
log = logging.getLogger(__name__)

View File

@@ -10,7 +10,7 @@ from lms.djangoapps.courseware.masquerade import (
get_masquerading_user_group,
is_masquerading_as_specific_student
)
from xmodule.partitions.partitions import NoSuchUserPartitionGroupError
from xmodule.partitions.partitions import NoSuchUserPartitionGroupError # lint-amnesty, pylint: disable=wrong-import-order
from .cohorts import get_cohort, get_group_info_for_cohort

View File

@@ -10,8 +10,8 @@ from factory.django import DjangoModelFactory
from opaque_keys.edx.locator import CourseLocator
from openedx.core.djangoapps.django_comment_common.models import CourseDiscussionSettings
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.django import modulestore
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 ..cohorts import set_course_cohorted
from ..models import CohortMembership, CourseCohort, CourseCohortsSettings, CourseUserGroup

View File

@@ -12,8 +12,8 @@ from django.urls import reverse
from openedx.core.djangoapps.oauth_dispatch.tests.factories import ApplicationFactory, AccessTokenFactory
from openedx.core.djangolib.testing.utils import skip_unless_lms
from common.djangoapps.student.tests.factories import 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 .. import cohorts
from .helpers import CohortFactory

View File

@@ -16,9 +16,9 @@ from openedx_events.tests.utils import OpenEdxEventsTestMixin
from common.djangoapps.student.models import CourseEnrollment
from common.djangoapps.student.tests.factories import UserFactory
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.tests.django_utils import TEST_DATA_MIXED_MODULESTORE, 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 TEST_DATA_MIXED_MODULESTORE, ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.modulestore.tests.factories import ToyCourseFactory # lint-amnesty, pylint: disable=wrong-import-order
from .. import cohorts
from ..models import CourseCohort, CourseUserGroup, CourseUserGroupPartitionGroup, UnregisteredLearnerCohortAssignments

View File

@@ -5,11 +5,11 @@ Classes:
CohortEventTest: Test event sent after cohort membership changes.
"""
from openedx.core.djangoapps.course_groups.models import CohortMembership
from unittest.mock import Mock
from unittest.mock import Mock # lint-amnesty, pylint: disable=wrong-import-order
from openedx_events.learning.data import CohortData, CourseData, UserData, UserPersonalData
from openedx_events.learning.signals import COHORT_MEMBERSHIP_CHANGED
from openedx_events.tests.utils import OpenEdxEventsTestMixin
from openedx_events.learning.data import CohortData, CourseData, UserData, UserPersonalData # lint-amnesty, pylint: disable=wrong-import-order
from openedx_events.learning.signals import COHORT_MEMBERSHIP_CHANGED # lint-amnesty, pylint: disable=wrong-import-order
from openedx_events.tests.utils import OpenEdxEventsTestMixin # lint-amnesty, pylint: disable=wrong-import-order
from common.djangoapps.student.tests.factories import UserFactory
from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory
@@ -17,7 +17,7 @@ from openedx.core.djangolib.testing.utils import skip_unless_lms
from openedx.core.djangoapps.course_groups.tests.helpers import CohortFactory
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
@skip_unless_lms

View File

@@ -11,10 +11,10 @@ from lms.djangoapps.courseware.tests.test_masquerade import StaffMasqueradeTestC
from openedx.core.djangoapps.user_api.partition_schemes import RandomUserPartitionScheme
from openedx.core.djangolib.testing.utils import skip_unless_lms
from common.djangoapps.student.tests.factories import UserFactory
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.tests.django_utils import TEST_DATA_MIXED_MODULESTORE, ModuleStoreTestCase
from xmodule.modulestore.tests.factories import ToyCourseFactory
from xmodule.partitions.partitions import Group, UserPartition, UserPartitionError
from xmodule.modulestore.django import modulestore # 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 ToyCourseFactory # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.partitions.partitions import Group, UserPartition, UserPartitionError # lint-amnesty, pylint: disable=wrong-import-order
from ..cohorts import add_user_to_cohort, get_course_cohorts, remove_user_from_cohort
from ..models import CourseUserGroupPartitionGroup

View File

@@ -18,8 +18,8 @@ from common.djangoapps.student.models import CourseEnrollment
from common.djangoapps.student.tests.factories import InstructorFactory
from common.djangoapps.student.tests.factories import StaffFactory
from common.djangoapps.student.tests.factories import UserFactory
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 ..cohorts import DEFAULT_COHORT_NAME, get_cohort, get_cohort_by_id, get_cohort_by_name, get_group_info_for_cohort
from ..models import CourseCohort, CourseUserGroup