fixed warnings for wrong-import-order

This commit is contained in:
Aarif
2020-04-06 00:46:45 +05:00
parent e8d4f93635
commit 6ee2089077
125 changed files with 366 additions and 453 deletions

View File

@@ -10,12 +10,12 @@ from django.conf import settings
from django.urls import resolve
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_lazy
from eventtracking import tracker
from search.search_engine_base import SearchEngine
from six import add_metaclass, string_types, text_type
from contentstore.course_group_config import GroupConfiguration
from course_modes.models import CourseMode
from eventtracking import tracker
from openedx.core.lib.courses import course_image_url
from xmodule.annotator_mixin import html_to_text
from xmodule.library_tools import normalize_key_for_search

View File

@@ -6,13 +6,13 @@ Tests for exporting OLX content.
import shutil
import tarfile
import unittest
from six import StringIO
from tempfile import mkdtemp
import ddt
import six
from django.core.management import CommandError, call_command
from path import Path as path
from six import StringIO
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.django import modulestore

View File

@@ -6,7 +6,6 @@ Unittests for exporting to git via management command.
import copy
import os
import shutil
from six import StringIO
import subprocess
import unittest
from uuid import uuid4
@@ -17,6 +16,7 @@ from django.core.management import call_command
from django.core.management.base import CommandError
from django.test.utils import override_settings
from opaque_keys.edx.locator import CourseLocator
from six import StringIO
import contentstore.git_export_utils as git_export_utils
from contentstore.git_export_utils import GitExportError

View File

@@ -2,12 +2,11 @@
Tests for sync courses management command
"""
import mock
from django.core.management import call_command
from opaque_keys.edx.keys import CourseKey
from testfixtures import LogCapture
from contentstore.views.course import create_new_course_in_store
from opaque_keys.edx.keys import CourseKey
from openedx.core.djangoapps.catalog.tests.factories import CourseRunFactory
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
from student.tests.factories import UserFactory

View File

@@ -26,11 +26,11 @@ from django.test import RequestFactory
from django.utils.text import get_valid_filename
from django.utils.translation import ugettext as _
from opaque_keys.edx.keys import CourseKey
from opaque_keys.edx.locator import LibraryLocator, BlockUsageLocator
from opaque_keys.edx.locator import LibraryLocator
from organizations.models import OrganizationCourse
from path import Path as path
from pytz import UTC
from six import iteritems, text_type, binary_type
from six import iteritems, text_type
from six.moves import range
from user_tasks.models import UserTaskArtifact, UserTaskStatus
from user_tasks.tasks import UserTask
@@ -55,19 +55,9 @@ from xmodule.modulestore.xml_exporter import export_course_to_xml, export_librar
from xmodule.modulestore.xml_importer import import_course_from_xml, import_library_from_xml
from xmodule.video_module.transcripts_utils import (
Transcript,
TranscriptsGenerationException,
clean_video_id,
get_transcript_from_contentstore,
TranscriptsGenerationException
)
from xmodule.modulestore import ModuleStoreEnum
from xmodule.exceptions import NotFoundError
from edxval.api import (
ValCannotCreateError,
create_video_transcript,
is_video_available,
is_transcript_available,
create_or_update_video_transcript,
create_external_video,
get_transcript_from_contentstore
)
User = get_user_model()

View File

@@ -7,14 +7,15 @@ import datetime
import time
import mock
from contentstore.tests.test_course_settings import CourseTestCase
from contentstore.tests.utils import AjaxEnabledTestClient, parse_json, registration, user
from ddt import data, ddt, unpack
from django.conf import settings
from django.core.cache import cache
from django.test.utils import override_settings
from django.urls import reverse
from pytz import UTC
from contentstore.tests.test_course_settings import CourseTestCase
from contentstore.tests.utils import AjaxEnabledTestClient, parse_json, registration, user
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory

View File

@@ -19,7 +19,6 @@ from opaque_keys.edx.keys import AssetKey, CourseKey
from pymongo import ASCENDING, DESCENDING
from six import text_type
from ..utils import reverse_course_url
from contentstore.views.exception import AssetNotFoundException, AssetSizeTooLargeException
from edxmako.shortcuts import render_to_response
from openedx.core.djangoapps.contentserver.caching import del_cached_content
@@ -32,6 +31,8 @@ from xmodule.exceptions import NotFoundError
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.exceptions import ItemNotFoundError
from ..utils import reverse_course_url
__all__ = ['assets_handler']
REQUEST_DEFAULTS = {

View File

@@ -15,14 +15,17 @@ from django.core.exceptions import PermissionDenied
from django.http import Http404, HttpResponse, HttpResponseBadRequest
from django.utils.translation import ugettext as _
from django.views.decorators.http import require_http_methods
from edx_proctoring.api import does_backend_support_onboarding, get_exam_configuration_dashboard_url
from help_tokens.core import HelpUrlExpert
from opaque_keys.edx.keys import CourseKey
from opaque_keys.edx.locator import LibraryUsageLocator
from pytz import UTC
from six import text_type, binary_type
from six import binary_type, text_type
from web_fragments.fragment import Fragment
from xblock.core import XBlock
from xblock.fields import Scope
from cms.djangoapps.contentstore.config.waffle import SHOW_REVIEW_RULES_FLAG
from cms.lib.xblock.authoring_mixin import VISIBILITY_VIEW
from contentstore.utils import (
ancestor_has_staff_lock,
@@ -46,17 +49,11 @@ from contentstore.views.helpers import (
)
from contentstore.views.preview import get_preview_fragment
from edxmako.shortcuts import render_to_string
from help_tokens.core import HelpUrlExpert
from models.settings.course_grading import CourseGradingModel
from openedx.core.djangoapps.schedules.config import COURSE_UPDATE_WAFFLE_FLAG
from openedx.core.djangoapps.waffle_utils import WaffleSwitch
from openedx.core.lib.gating import api as gating_api
from openedx.core.lib.xblock_utils import (
hash_resource,
request_token,
wrap_xblock,
wrap_xblock_aside,
)
from openedx.core.lib.xblock_utils import hash_resource, request_token, wrap_xblock, wrap_xblock_aside
from static_replace import replace_static_urls
from student.auth import has_studio_read_access, has_studio_write_access
from util.date_utils import get_default_time_display
@@ -73,8 +70,6 @@ from xmodule.modulestore.inheritance import own_metadata
from xmodule.services import ConfigurationService, SettingsService, TeamsConfigurationService
from xmodule.tabs import CourseTabList
from xmodule.x_module import AUTHOR_VIEW, PREVIEW_VIEWS, STUDENT_VIEW, STUDIO_VIEW
from edx_proctoring.api import get_exam_configuration_dashboard_url, does_backend_support_onboarding
from cms.djangoapps.contentstore.config.waffle import SHOW_REVIEW_RULES_FLAG
__all__ = [
'orphan_handler', 'xblock_handler', 'xblock_view_handler', 'xblock_outline_handler', 'xblock_container_handler'

View File

@@ -9,7 +9,6 @@ import logging
import os
import re
import shutil
from six import StringIO
import tarfile
import tempfile
from uuid import uuid4