diff --git a/cms/conftest.py b/cms/conftest.py index e1e4f8abb5..03a0490d7b 100644 --- a/cms/conftest.py +++ b/cms/conftest.py @@ -7,7 +7,6 @@ only running cms tests. """ - import importlib import os import contracts diff --git a/cms/djangoapps/api/apps.py b/cms/djangoapps/api/apps.py index 717e68383a..0466e12967 100644 --- a/cms/djangoapps/api/apps.py +++ b/cms/djangoapps/api/apps.py @@ -3,7 +3,6 @@ Configuration for Studio API Django application """ - from django.apps import AppConfig diff --git a/cms/djangoapps/api/urls.py b/cms/djangoapps/api/urls.py index a29902c90c..71f8289085 100644 --- a/cms/djangoapps/api/urls.py +++ b/cms/djangoapps/api/urls.py @@ -3,7 +3,6 @@ URLs for the Studio API app """ - from django.conf.urls import include, url diff --git a/cms/djangoapps/api/v1/tests/test_serializers/test_course_runs.py b/cms/djangoapps/api/v1/tests/test_serializers/test_course_runs.py index cc276c5749..acadff7df8 100644 --- a/cms/djangoapps/api/v1/tests/test_serializers/test_course_runs.py +++ b/cms/djangoapps/api/v1/tests/test_serializers/test_course_runs.py @@ -1,7 +1,6 @@ """Tests for course run serializers""" - import datetime import ddt diff --git a/cms/djangoapps/api/v1/tests/test_views/test_course_runs.py b/cms/djangoapps/api/v1/tests/test_views/test_course_runs.py index 72094e5e01..1933a75fdf 100644 --- a/cms/djangoapps/api/v1/tests/test_views/test_course_runs.py +++ b/cms/djangoapps/api/v1/tests/test_views/test_course_runs.py @@ -1,7 +1,6 @@ """Tests for Course run views""" - import datetime import ddt diff --git a/cms/djangoapps/api/v1/urls.py b/cms/djangoapps/api/v1/urls.py index d56934fb8f..44038e4cdb 100644 --- a/cms/djangoapps/api/v1/urls.py +++ b/cms/djangoapps/api/v1/urls.py @@ -3,7 +3,6 @@ URLs for the Studio API [Course Run] """ - from rest_framework.routers import DefaultRouter from .views.course_runs import CourseRunViewSet diff --git a/cms/djangoapps/api/v1/views/course_runs.py b/cms/djangoapps/api/v1/views/course_runs.py index c22aff323e..889ff9e335 100644 --- a/cms/djangoapps/api/v1/views/course_runs.py +++ b/cms/djangoapps/api/v1/views/course_runs.py @@ -1,7 +1,6 @@ """HTTP endpoints for the Course Run API.""" - from django.conf import settings from django.http import Http404 from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication diff --git a/cms/djangoapps/cms_user_tasks/apps.py b/cms/djangoapps/cms_user_tasks/apps.py index e314b76611..a35e142aaa 100644 --- a/cms/djangoapps/cms_user_tasks/apps.py +++ b/cms/djangoapps/cms_user_tasks/apps.py @@ -4,7 +4,6 @@ Signal handlers are connected here. """ - from django.apps import AppConfig diff --git a/cms/djangoapps/cms_user_tasks/tasks.py b/cms/djangoapps/cms_user_tasks/tasks.py index 9232706915..0a8f1db9bf 100644 --- a/cms/djangoapps/cms_user_tasks/tasks.py +++ b/cms/djangoapps/cms_user_tasks/tasks.py @@ -3,7 +3,6 @@ Celery tasks used by cms_user_tasks """ - from boto.exception import NoAuthHandlerFound from celery.exceptions import MaxRetriesExceededError from celery.task import task diff --git a/cms/djangoapps/cms_user_tasks/tests.py b/cms/djangoapps/cms_user_tasks/tests.py index a90e1ce3e1..2d6c962563 100644 --- a/cms/djangoapps/cms_user_tasks/tests.py +++ b/cms/djangoapps/cms_user_tasks/tests.py @@ -3,7 +3,6 @@ Unit tests for integration of the django-user-tasks app and its REST API. """ - import logging from uuid import uuid4 diff --git a/cms/djangoapps/contentstore/admin.py b/cms/djangoapps/contentstore/admin.py index 1716f31aff..33019da0c0 100644 --- a/cms/djangoapps/contentstore/admin.py +++ b/cms/djangoapps/contentstore/admin.py @@ -3,7 +3,6 @@ Admin site bindings for contentstore """ - from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/cms/djangoapps/contentstore/apps.py b/cms/djangoapps/contentstore/apps.py index 940a69ac2c..00ad73d377 100644 --- a/cms/djangoapps/contentstore/apps.py +++ b/cms/djangoapps/contentstore/apps.py @@ -5,7 +5,6 @@ Above-modulestore level signal handlers are connected here. """ - from django.apps import AppConfig diff --git a/cms/djangoapps/contentstore/config/waffle_utils.py b/cms/djangoapps/contentstore/config/waffle_utils.py index 4c734b1436..a63057c62a 100644 --- a/cms/djangoapps/contentstore/config/waffle_utils.py +++ b/cms/djangoapps/contentstore/config/waffle_utils.py @@ -1,7 +1,6 @@ """Util methods for Waffle checks""" - from cms.djangoapps.contentstore.config.waffle import ENABLE_CHECKLISTS_QUALITY diff --git a/cms/djangoapps/contentstore/course_info_model.py b/cms/djangoapps/contentstore/course_info_model.py index 4b056b6fcc..b32605f912 100644 --- a/cms/djangoapps/contentstore/course_info_model.py +++ b/cms/djangoapps/contentstore/course_info_model.py @@ -13,7 +13,6 @@ Current db representation: """ - import logging import re diff --git a/cms/djangoapps/contentstore/debug_file_uploader.py b/cms/djangoapps/contentstore/debug_file_uploader.py index b0226aa654..39d18cefe8 100644 --- a/cms/djangoapps/contentstore/debug_file_uploader.py +++ b/cms/djangoapps/contentstore/debug_file_uploader.py @@ -1,7 +1,6 @@ """ Upload file handler to help test progress bars in uploads. """ - import time from django.core.files.uploadhandler import FileUploadHandler diff --git a/cms/djangoapps/contentstore/git_export_utils.py b/cms/djangoapps/contentstore/git_export_utils.py index 3ad246d6a9..78141fc761 100644 --- a/cms/djangoapps/contentstore/git_export_utils.py +++ b/cms/djangoapps/contentstore/git_export_utils.py @@ -4,7 +4,6 @@ committing and pushing the changes. """ - import logging import os import subprocess diff --git a/cms/djangoapps/contentstore/management/commands/clean_cert_name.py b/cms/djangoapps/contentstore/management/commands/clean_cert_name.py index 1a9224c247..9ef6d7990c 100644 --- a/cms/djangoapps/contentstore/management/commands/clean_cert_name.py +++ b/cms/djangoapps/contentstore/management/commands/clean_cert_name.py @@ -4,7 +4,6 @@ erroneous certificate names. """ - from collections import namedtuple from django.core.management.base import BaseCommand diff --git a/cms/djangoapps/contentstore/management/commands/empty_asset_trashcan.py b/cms/djangoapps/contentstore/management/commands/empty_asset_trashcan.py index e6e2b27ce9..c0031ce390 100644 --- a/cms/djangoapps/contentstore/management/commands/empty_asset_trashcan.py +++ b/cms/djangoapps/contentstore/management/commands/empty_asset_trashcan.py @@ -1,7 +1,6 @@ """Script to Empty the trashcan""" - from django.core.management.base import BaseCommand from opaque_keys.edx.keys import CourseKey diff --git a/cms/djangoapps/contentstore/management/commands/export_olx.py b/cms/djangoapps/contentstore/management/commands/export_olx.py index 61abcdcf9d..503efb9add 100644 --- a/cms/djangoapps/contentstore/management/commands/export_olx.py +++ b/cms/djangoapps/contentstore/management/commands/export_olx.py @@ -15,7 +15,6 @@ At present, it differs from Studio exports in several ways: """ - import os import re import shutil diff --git a/cms/djangoapps/contentstore/management/commands/git_export.py b/cms/djangoapps/contentstore/management/commands/git_export.py index 42b9f70854..02b41cb8e4 100644 --- a/cms/djangoapps/contentstore/management/commands/git_export.py +++ b/cms/djangoapps/contentstore/management/commands/git_export.py @@ -14,7 +14,6 @@ attribute is set and the FEATURE['ENABLE_EXPORT_GIT'] is set. """ - import logging from django.core.management.base import BaseCommand, CommandError diff --git a/cms/djangoapps/contentstore/management/commands/migrate_transcripts.py b/cms/djangoapps/contentstore/management/commands/migrate_transcripts.py index da2515f8cf..ccc7c17266 100644 --- a/cms/djangoapps/contentstore/management/commands/migrate_transcripts.py +++ b/cms/djangoapps/contentstore/management/commands/migrate_transcripts.py @@ -3,7 +3,6 @@ Command to migrate transcripts to django storage. """ - import logging from django.core.management import BaseCommand, CommandError diff --git a/cms/djangoapps/contentstore/management/commands/restore_asset_from_trashcan.py b/cms/djangoapps/contentstore/management/commands/restore_asset_from_trashcan.py index 7cbb39c009..d1f4cb685c 100644 --- a/cms/djangoapps/contentstore/management/commands/restore_asset_from_trashcan.py +++ b/cms/djangoapps/contentstore/management/commands/restore_asset_from_trashcan.py @@ -1,7 +1,6 @@ """Management command to restore assets from trash""" - from django.core.management.base import BaseCommand from xmodule.contentstore.utils import restore_asset_from_trashcan diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py b/cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py index 7f1aa44671..fcdcbf07bb 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py @@ -1,7 +1,6 @@ """Tests running the delete_orphan command""" - import ddt import six from django.core.management import CommandError, call_command diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_export_olx.py b/cms/djangoapps/contentstore/management/commands/tests/test_export_olx.py index 819af90be5..747f011e49 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_export_olx.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_export_olx.py @@ -3,7 +3,6 @@ Tests for exporting OLX content. """ - import shutil import tarfile import unittest diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_fix_not_found.py b/cms/djangoapps/contentstore/management/commands/tests/test_fix_not_found.py index 08afba0afb..734841e384 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_fix_not_found.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_fix_not_found.py @@ -3,7 +3,6 @@ Tests for the fix_not_found management command """ - import six from django.core.management import CommandError, call_command diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_git_export.py b/cms/djangoapps/contentstore/management/commands/tests/test_git_export.py index 24e8c72f3f..f84dcc1086 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_git_export.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_git_export.py @@ -3,7 +3,6 @@ Unittests for exporting to git via management command. """ - import copy import os import shutil diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_import.py b/cms/djangoapps/contentstore/management/commands/tests/test_import.py index 8011976652..1d2263c3f4 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_import.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_import.py @@ -3,7 +3,6 @@ Unittests for importing a course via management command """ - import os import shutil import tempfile diff --git a/cms/djangoapps/contentstore/models.py b/cms/djangoapps/contentstore/models.py index e5d5510e97..c69643d27e 100644 --- a/cms/djangoapps/contentstore/models.py +++ b/cms/djangoapps/contentstore/models.py @@ -3,7 +3,6 @@ Models for contentstore """ - from config_models.models import ConfigurationModel from django.db.models.fields import TextField diff --git a/cms/djangoapps/contentstore/proctoring.py b/cms/djangoapps/contentstore/proctoring.py index 49ceeb021c..622ce23310 100644 --- a/cms/djangoapps/contentstore/proctoring.py +++ b/cms/djangoapps/contentstore/proctoring.py @@ -3,7 +3,6 @@ Code related to the handling of Proctored Exams in Studio """ - import logging import six diff --git a/cms/djangoapps/contentstore/rules.py b/cms/djangoapps/contentstore/rules.py index 6b63eb0932..cb9238c5f7 100644 --- a/cms/djangoapps/contentstore/rules.py +++ b/cms/djangoapps/contentstore/rules.py @@ -3,7 +3,6 @@ Authorization rules related to content management. """ - import user_tasks.rules user_tasks.rules.add_rules() diff --git a/cms/djangoapps/contentstore/signals/handlers.py b/cms/djangoapps/contentstore/signals/handlers.py index 253487052a..53e0c429c2 100644 --- a/cms/djangoapps/contentstore/signals/handlers.py +++ b/cms/djangoapps/contentstore/signals/handlers.py @@ -1,7 +1,6 @@ """ receivers of course_published and library_updated events in order to trigger indexing task """ - import logging from datetime import datetime from functools import wraps diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index c944082184..f7f9b4da0f 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- - import copy import shutil from datetime import timedelta diff --git a/cms/djangoapps/contentstore/tests/test_core_caching.py b/cms/djangoapps/contentstore/tests/test_core_caching.py index 28d4797669..a66782006c 100644 --- a/cms/djangoapps/contentstore/tests/test_core_caching.py +++ b/cms/djangoapps/contentstore/tests/test_core_caching.py @@ -3,7 +3,6 @@ Tests core caching facilities. """ - from django.test import TestCase from opaque_keys.edx.locator import AssetLocator, CourseLocator diff --git a/cms/djangoapps/contentstore/tests/test_crud.py b/cms/djangoapps/contentstore/tests/test_crud.py index 12c6485cad..2c0d4fc4fe 100644 --- a/cms/djangoapps/contentstore/tests/test_crud.py +++ b/cms/djangoapps/contentstore/tests/test_crud.py @@ -1,7 +1,6 @@ """Tests for CRUD Operations""" - from xmodule import templates from xmodule.capa_module import ProblemBlock from xmodule.course_module import CourseDescriptor diff --git a/cms/djangoapps/contentstore/tests/test_export_git.py b/cms/djangoapps/contentstore/tests/test_export_git.py index 6bb1ea5817..d5b2e391ce 100644 --- a/cms/djangoapps/contentstore/tests/test_export_git.py +++ b/cms/djangoapps/contentstore/tests/test_export_git.py @@ -3,7 +3,6 @@ Test the ability to export courses to xml from studio """ - import copy import os import shutil diff --git a/cms/djangoapps/contentstore/tests/test_import_pure_xblock.py b/cms/djangoapps/contentstore/tests/test_import_pure_xblock.py index 9e76e43080..a4a4368bdf 100644 --- a/cms/djangoapps/contentstore/tests/test_import_pure_xblock.py +++ b/cms/djangoapps/contentstore/tests/test_import_pure_xblock.py @@ -3,7 +3,6 @@ Integration tests for importing courses containing pure XBlocks. """ - from django.conf import settings from xblock.core import XBlock from xblock.fields import String diff --git a/cms/djangoapps/contentstore/tests/test_proctoring.py b/cms/djangoapps/contentstore/tests/test_proctoring.py index 4c1948e223..49e2664c10 100644 --- a/cms/djangoapps/contentstore/tests/test_proctoring.py +++ b/cms/djangoapps/contentstore/tests/test_proctoring.py @@ -3,7 +3,6 @@ Tests for the edx_proctoring integration into Studio """ - from datetime import datetime, timedelta import ddt diff --git a/cms/djangoapps/contentstore/tests/test_signals.py b/cms/djangoapps/contentstore/tests/test_signals.py index 8c26e1d853..561468e476 100644 --- a/cms/djangoapps/contentstore/tests/test_signals.py +++ b/cms/djangoapps/contentstore/tests/test_signals.py @@ -1,7 +1,6 @@ """Tests for verifying availability of resources for locking""" - import ddt import six from mock import Mock, patch diff --git a/cms/djangoapps/contentstore/tests/test_video_utils.py b/cms/djangoapps/contentstore/tests/test_video_utils.py index 7c12366e50..556b9b4ed6 100644 --- a/cms/djangoapps/contentstore/tests/test_video_utils.py +++ b/cms/djangoapps/contentstore/tests/test_video_utils.py @@ -4,7 +4,6 @@ Unit tests for video utils. """ - from datetime import datetime from unittest import TestCase diff --git a/cms/djangoapps/contentstore/views/access.py b/cms/djangoapps/contentstore/views/access.py index 4d4fda6032..b49edef6e7 100644 --- a/cms/djangoapps/contentstore/views/access.py +++ b/cms/djangoapps/contentstore/views/access.py @@ -1,7 +1,6 @@ """ Helper methods for determining user access permissions in Studio """ - from student import auth from student.roles import CourseInstructorRole diff --git a/cms/djangoapps/contentstore/views/error.py b/cms/djangoapps/contentstore/views/error.py index d855d4624f..6d884d4a21 100644 --- a/cms/djangoapps/contentstore/views/error.py +++ b/cms/djangoapps/contentstore/views/error.py @@ -1,7 +1,6 @@ # pylint: disable=missing-docstring,unused-argument - import functools from django.http import HttpResponse, HttpResponseNotFound, HttpResponseServerError diff --git a/cms/djangoapps/contentstore/views/export_git.py b/cms/djangoapps/contentstore/views/export_git.py index 187ef4f7bb..47417c30e6 100644 --- a/cms/djangoapps/contentstore/views/export_git.py +++ b/cms/djangoapps/contentstore/views/export_git.py @@ -4,7 +4,6 @@ the giturl attribute is set. """ - import logging import six diff --git a/cms/djangoapps/contentstore/views/helpers.py b/cms/djangoapps/contentstore/views/helpers.py index 13d88c4ffc..1a30ac322c 100644 --- a/cms/djangoapps/contentstore/views/helpers.py +++ b/cms/djangoapps/contentstore/views/helpers.py @@ -3,7 +3,6 @@ Helper methods for Studio views. """ - from uuid import uuid4 import six diff --git a/cms/djangoapps/contentstore/views/tests/test_credit_eligibility.py b/cms/djangoapps/contentstore/views/tests/test_credit_eligibility.py index 2296ba31ae..1383255af0 100644 --- a/cms/djangoapps/contentstore/views/tests/test_credit_eligibility.py +++ b/cms/djangoapps/contentstore/views/tests/test_credit_eligibility.py @@ -3,7 +3,6 @@ Unit tests for credit eligibility UI in Studio. """ - import mock import six diff --git a/cms/djangoapps/contentstore/views/tests/test_helpers.py b/cms/djangoapps/contentstore/views/tests/test_helpers.py index 8c2646d589..8c38ad02cb 100644 --- a/cms/djangoapps/contentstore/views/tests/test_helpers.py +++ b/cms/djangoapps/contentstore/views/tests/test_helpers.py @@ -3,7 +3,6 @@ Unit tests for helpers.py. """ - import six from django.utils import http diff --git a/cms/djangoapps/contentstore/views/tests/test_tabs.py b/cms/djangoapps/contentstore/views/tests/test_tabs.py index 561997df15..fe55fb8152 100644 --- a/cms/djangoapps/contentstore/views/tests/test_tabs.py +++ b/cms/djangoapps/contentstore/views/tests/test_tabs.py @@ -1,7 +1,6 @@ """ Tests for tab functions (just primitive). """ - import json from contentstore.tests.utils import CourseTestCase diff --git a/cms/djangoapps/contentstore/views/tests/test_textbooks.py b/cms/djangoapps/contentstore/views/tests/test_textbooks.py index 5840a62a43..17ca062b31 100644 --- a/cms/djangoapps/contentstore/views/tests/test_textbooks.py +++ b/cms/djangoapps/contentstore/views/tests/test_textbooks.py @@ -1,7 +1,6 @@ """ Test cases for the textbook index page. """ - import json from unittest import TestCase diff --git a/cms/djangoapps/contentstore/views/tests/test_transcripts.py b/cms/djangoapps/contentstore/views/tests/test_transcripts.py index 5053afdc8e..535c0a39d6 100644 --- a/cms/djangoapps/contentstore/views/tests/test_transcripts.py +++ b/cms/djangoapps/contentstore/views/tests/test_transcripts.py @@ -1,7 +1,6 @@ """Tests for items views.""" - import copy import json import tempfile diff --git a/cms/djangoapps/contentstore/views/tests/test_unit_page.py b/cms/djangoapps/contentstore/views/tests/test_unit_page.py index 0ff303ed6e..4af96f5ef6 100644 --- a/cms/djangoapps/contentstore/views/tests/test_unit_page.py +++ b/cms/djangoapps/contentstore/views/tests/test_unit_page.py @@ -3,7 +3,6 @@ Unit tests for the unit page. """ - from contentstore.views.tests.utils import StudioPageTestCase from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.factories import ItemFactory diff --git a/cms/djangoapps/contentstore/views/tests/utils.py b/cms/djangoapps/contentstore/views/tests/utils.py index bbfa28b99e..3ae9386b88 100644 --- a/cms/djangoapps/contentstore/views/tests/utils.py +++ b/cms/djangoapps/contentstore/views/tests/utils.py @@ -3,7 +3,6 @@ Utilities for view tests. """ - import json from contentstore.tests.utils import CourseTestCase diff --git a/cms/djangoapps/contentstore/views/user.py b/cms/djangoapps/contentstore/views/user.py index 3617b2f921..ff37bd6756 100644 --- a/cms/djangoapps/contentstore/views/user.py +++ b/cms/djangoapps/contentstore/views/user.py @@ -1,7 +1,6 @@ """Views for users""" - from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core.exceptions import PermissionDenied diff --git a/cms/djangoapps/course_creators/admin.py b/cms/djangoapps/course_creators/admin.py index 81b8a6e048..345fb52325 100644 --- a/cms/djangoapps/course_creators/admin.py +++ b/cms/djangoapps/course_creators/admin.py @@ -3,7 +3,6 @@ django admin page for the course creators table """ - import logging from smtplib import SMTPException diff --git a/cms/djangoapps/course_creators/tests/test_admin.py b/cms/djangoapps/course_creators/tests/test_admin.py index 8d31d74ef8..eff9c1c65a 100644 --- a/cms/djangoapps/course_creators/tests/test_admin.py +++ b/cms/djangoapps/course_creators/tests/test_admin.py @@ -3,7 +3,6 @@ Tests course_creators.admin.py. """ - import mock from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User diff --git a/cms/djangoapps/course_creators/tests/test_views.py b/cms/djangoapps/course_creators/tests/test_views.py index 85b3ef9a76..7b19570618 100644 --- a/cms/djangoapps/course_creators/tests/test_views.py +++ b/cms/djangoapps/course_creators/tests/test_views.py @@ -3,7 +3,6 @@ Tests course_creators.views.py. """ - import mock from django.contrib.auth.models import User from django.core.exceptions import PermissionDenied diff --git a/cms/djangoapps/pipeline_js/utils.py b/cms/djangoapps/pipeline_js/utils.py index c281d8a67d..2584b023ac 100644 --- a/cms/djangoapps/pipeline_js/utils.py +++ b/cms/djangoapps/pipeline_js/utils.py @@ -3,7 +3,6 @@ Utilities for returning XModule JS (used by requirejs) """ - from django.conf import settings from django.contrib.staticfiles.storage import staticfiles_storage diff --git a/cms/djangoapps/xblock_config/admin.py b/cms/djangoapps/xblock_config/admin.py index 1a3a24f73f..4d83bb5b24 100644 --- a/cms/djangoapps/xblock_config/admin.py +++ b/cms/djangoapps/xblock_config/admin.py @@ -3,7 +3,6 @@ Django admin dashboard configuration for LMS XBlock infrastructure. """ - from config_models.admin import ConfigurationModelAdmin, KeyedConfigurationModelAdmin from django.contrib import admin diff --git a/cms/djangoapps/xblock_config/models.py b/cms/djangoapps/xblock_config/models.py index 57943b0880..630210dfc5 100644 --- a/cms/djangoapps/xblock_config/models.py +++ b/cms/djangoapps/xblock_config/models.py @@ -6,7 +6,6 @@ Includes: """ - import six from config_models.models import ConfigurationModel from django.db.models import TextField diff --git a/cms/envs/bok_choy.py b/cms/envs/bok_choy.py index f9ffd8cc6c..df332b4513 100644 --- a/cms/envs/bok_choy.py +++ b/cms/envs/bok_choy.py @@ -12,7 +12,6 @@ from the same directory. """ - # Silence noisy logs import logging import os diff --git a/cms/envs/common.py b/cms/envs/common.py index a48a06a8a0..c2f77d38da 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -40,7 +40,6 @@ When refering to XBlocks, we use the entry-point name. For example, # pylint: disable=unused-import - import imp import os import sys diff --git a/cms/envs/devstack.py b/cms/envs/devstack.py index 0aa93cc69e..cb5c4b410f 100644 --- a/cms/envs/devstack.py +++ b/cms/envs/devstack.py @@ -3,7 +3,6 @@ Specific overrides to the base prod settings to make development easier. """ - import logging from os.path import abspath, dirname, join diff --git a/cms/envs/devstack_optimized.py b/cms/envs/devstack_optimized.py index 2dc4f42f42..3dab8bd20c 100644 --- a/cms/envs/devstack_optimized.py +++ b/cms/envs/devstack_optimized.py @@ -19,7 +19,6 @@ invoked each time that changes have been made. """ - import os ########################## Devstack settings ################################### diff --git a/cms/envs/devstack_with_worker.py b/cms/envs/devstack_with_worker.py index f94303b296..f9cf40316e 100644 --- a/cms/envs/devstack_with_worker.py +++ b/cms/envs/devstack_with_worker.py @@ -12,7 +12,6 @@ In two separate processes on devstack: """ - import os # We intentionally define lots of variables that aren't used, and diff --git a/cms/envs/production.py b/cms/envs/production.py index 6fd835e25b..018ecca4e8 100644 --- a/cms/envs/production.py +++ b/cms/envs/production.py @@ -7,7 +7,6 @@ This is the default template for our main set of AWS servers. # pylint: disable=wildcard-import, unused-wildcard-import, wrong-import-order - import codecs import os import yaml diff --git a/cms/envs/test.py b/cms/envs/test.py index 80a2d7b2fa..a94687c008 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -14,7 +14,6 @@ sessions. Assumes structure: # pylint: disable=wildcard-import, unused-wildcard-import, wrong-import-order - from .common import * import os from uuid import uuid4 diff --git a/cms/lib/xblock/authoring_mixin.py b/cms/lib/xblock/authoring_mixin.py index 24ebe3175e..767c2ed377 100644 --- a/cms/lib/xblock/authoring_mixin.py +++ b/cms/lib/xblock/authoring_mixin.py @@ -3,7 +3,6 @@ Mixin class that provides authoring capabilities for XBlocks. """ - import logging from django.conf import settings diff --git a/cms/lib/xblock/field_data.py b/cms/lib/xblock/field_data.py index d5d920c63e..c4bfcc6456 100644 --- a/cms/lib/xblock/field_data.py +++ b/cms/lib/xblock/field_data.py @@ -3,7 +3,6 @@ """ - from xblock.field_data import SplitFieldData from xblock.fields import Scope diff --git a/cms/lib/xblock/runtime.py b/cms/lib/xblock/runtime.py index 6137bac0ea..0c2c28e6c3 100644 --- a/cms/lib/xblock/runtime.py +++ b/cms/lib/xblock/runtime.py @@ -3,7 +3,6 @@ XBlock runtime implementations for edX Studio """ - import six from django.urls import reverse diff --git a/cms/lib/xblock/tagging/tagging.py b/cms/lib/xblock/tagging/tagging.py index ad678f645c..3643e78a32 100644 --- a/cms/lib/xblock/tagging/tagging.py +++ b/cms/lib/xblock/tagging/tagging.py @@ -4,7 +4,6 @@ Structured Tagging based on XBlockAsides """ - import six from django.conf import settings from web_fragments.fragment import Fragment diff --git a/cms/lib/xblock/tagging/test.py b/cms/lib/xblock/tagging/test.py index e8f3e391ed..13f175417b 100644 --- a/cms/lib/xblock/tagging/test.py +++ b/cms/lib/xblock/tagging/test.py @@ -3,7 +3,6 @@ Tests for the Studio Tagging XBlockAside """ - import json from datetime import datetime from six import StringIO diff --git a/cms/startup.py b/cms/startup.py index 6a8d767934..5500dc6424 100644 --- a/cms/startup.py +++ b/cms/startup.py @@ -3,7 +3,6 @@ Module for code that should run during Studio startup (deprecated) """ - import django from django.conf import settings diff --git a/common/djangoapps/course_action_state/tests/test_rerun_manager.py b/common/djangoapps/course_action_state/tests/test_rerun_manager.py index eab8ffd7ba..b0e26b85d5 100644 --- a/common/djangoapps/course_action_state/tests/test_rerun_manager.py +++ b/common/djangoapps/course_action_state/tests/test_rerun_manager.py @@ -3,7 +3,6 @@ Tests specific to the CourseRerunState Model and Manager. """ - from django.test import TestCase from opaque_keys.edx.locations import CourseLocator from six import text_type diff --git a/common/djangoapps/course_modes/api/v1/views.py b/common/djangoapps/course_modes/api/v1/views.py index 03a38f1076..641ecb74c4 100644 --- a/common/djangoapps/course_modes/api/v1/views.py +++ b/common/djangoapps/course_modes/api/v1/views.py @@ -3,7 +3,6 @@ Defines the "ReSTful" API for course modes. """ - import logging from django.shortcuts import get_object_or_404 diff --git a/common/djangoapps/course_modes/tests/test_views.py b/common/djangoapps/course_modes/tests/test_views.py index f180e2a775..81b09be55d 100644 --- a/common/djangoapps/course_modes/tests/test_views.py +++ b/common/djangoapps/course_modes/tests/test_views.py @@ -3,7 +3,6 @@ Tests for course_modes views. """ - import decimal import unittest from datetime import datetime, timedelta diff --git a/common/djangoapps/edxmako/paths.py b/common/djangoapps/edxmako/paths.py index 6254db39e0..ca7e4cfc55 100644 --- a/common/djangoapps/edxmako/paths.py +++ b/common/djangoapps/edxmako/paths.py @@ -3,7 +3,6 @@ Set up lookup paths for mako templates. """ - import contextlib import hashlib import os diff --git a/common/djangoapps/edxmako/request_context.py b/common/djangoapps/edxmako/request_context.py index 04d345c958..5be4c1fd47 100644 --- a/common/djangoapps/edxmako/request_context.py +++ b/common/djangoapps/edxmako/request_context.py @@ -19,8 +19,6 @@ Methods for creating RequestContext for using with Mako templates. """ - - from crum import get_current_request from django.template import RequestContext diff --git a/common/djangoapps/edxmako/shortcuts.py b/common/djangoapps/edxmako/shortcuts.py index dce0c1c5b4..4aaea4b0b4 100644 --- a/common/djangoapps/edxmako/shortcuts.py +++ b/common/djangoapps/edxmako/shortcuts.py @@ -13,7 +13,6 @@ # limitations under the License. - import logging import six diff --git a/common/djangoapps/edxmako/template.py b/common/djangoapps/edxmako/template.py index 32ac011971..a9b8016deb 100644 --- a/common/djangoapps/edxmako/template.py +++ b/common/djangoapps/edxmako/template.py @@ -13,7 +13,6 @@ # limitations under the License. - from django.conf import settings from django.template import Context, engines from mako.template import Template as MakoTemplate diff --git a/common/djangoapps/entitlements/api/v1/permissions.py b/common/djangoapps/entitlements/api/v1/permissions.py index fc6d89e226..67ca04aae1 100644 --- a/common/djangoapps/entitlements/api/v1/permissions.py +++ b/common/djangoapps/entitlements/api/v1/permissions.py @@ -4,7 +4,6 @@ requiring Superuser access for all other Request types on an API endpoint. """ - from rest_framework.permissions import SAFE_METHODS, BasePermission from lms.djangoapps.courseware.access import has_access diff --git a/common/djangoapps/entitlements/apps.py b/common/djangoapps/entitlements/apps.py index 8e5e1e4548..9f158cc7bd 100644 --- a/common/djangoapps/entitlements/apps.py +++ b/common/djangoapps/entitlements/apps.py @@ -5,7 +5,6 @@ Signal handlers are connected here. """ - from django.apps import AppConfig diff --git a/common/djangoapps/entitlements/management/commands/expire_old_entitlements.py b/common/djangoapps/entitlements/management/commands/expire_old_entitlements.py index 93e5505238..3b76a5ec17 100644 --- a/common/djangoapps/entitlements/management/commands/expire_old_entitlements.py +++ b/common/djangoapps/entitlements/management/commands/expire_old_entitlements.py @@ -3,7 +3,6 @@ Management command for expiring old entitlements. """ - import logging from textwrap import dedent diff --git a/common/djangoapps/entitlements/management/commands/tests/test_expire_old_entitlements.py b/common/djangoapps/entitlements/management/commands/tests/test_expire_old_entitlements.py index 64483a8b02..7e1e6e489b 100644 --- a/common/djangoapps/entitlements/management/commands/tests/test_expire_old_entitlements.py +++ b/common/djangoapps/entitlements/management/commands/tests/test_expire_old_entitlements.py @@ -1,7 +1,6 @@ """Test Entitlements models""" - import mock from django.core.management import call_command from django.test import TestCase diff --git a/common/djangoapps/entitlements/models.py b/common/djangoapps/entitlements/models.py index 844ec9bd9b..9efe7bb432 100644 --- a/common/djangoapps/entitlements/models.py +++ b/common/djangoapps/entitlements/models.py @@ -1,7 +1,6 @@ """Entitlement Models""" - import logging import uuid as uuid_tools from datetime import timedelta diff --git a/common/djangoapps/entitlements/signals.py b/common/djangoapps/entitlements/signals.py index 9beef439de..8a3c80b1ff 100644 --- a/common/djangoapps/entitlements/signals.py +++ b/common/djangoapps/entitlements/signals.py @@ -3,7 +3,6 @@ Entitlements related signal handlers. """ - from django.dispatch import receiver from entitlements.models import CourseEntitlement diff --git a/common/djangoapps/entitlements/tasks.py b/common/djangoapps/entitlements/tasks.py index d70c8344e2..2d3724ce2f 100644 --- a/common/djangoapps/entitlements/tasks.py +++ b/common/djangoapps/entitlements/tasks.py @@ -3,7 +3,6 @@ This file contains celery tasks for entitlements-related functionality. """ - from celery import task from celery.utils.log import get_task_logger from django.conf import settings diff --git a/common/djangoapps/entitlements/tests/test_models.py b/common/djangoapps/entitlements/tests/test_models.py index 319ca79f3f..4879723ffe 100644 --- a/common/djangoapps/entitlements/tests/test_models.py +++ b/common/djangoapps/entitlements/tests/test_models.py @@ -1,7 +1,6 @@ """Test Entitlements models""" - import unittest from datetime import timedelta from uuid import uuid4 diff --git a/common/djangoapps/entitlements/tests/test_tasks.py b/common/djangoapps/entitlements/tests/test_tasks.py index 58f6a77698..7465cee637 100644 --- a/common/djangoapps/entitlements/tests/test_tasks.py +++ b/common/djangoapps/entitlements/tests/test_tasks.py @@ -3,7 +3,6 @@ Test entitlements tasks """ - from datetime import datetime, timedelta import mock diff --git a/common/djangoapps/entitlements/tests/test_utils.py b/common/djangoapps/entitlements/tests/test_utils.py index f3bd668d8e..84d62374d1 100644 --- a/common/djangoapps/entitlements/tests/test_utils.py +++ b/common/djangoapps/entitlements/tests/test_utils.py @@ -3,7 +3,6 @@ Test entitlements utilities """ - from datetime import timedelta from django.conf import settings diff --git a/common/djangoapps/entitlements/utils.py b/common/djangoapps/entitlements/utils.py index 6839bab687..0e8a933b80 100644 --- a/common/djangoapps/entitlements/utils.py +++ b/common/djangoapps/entitlements/utils.py @@ -3,7 +3,6 @@ Utility methods for the entitlement application. """ - import logging from django.utils import timezone diff --git a/common/djangoapps/pipeline_mako/tests/test_render.py b/common/djangoapps/pipeline_mako/tests/test_render.py index 5ff9d2addb..7e661a9feb 100644 --- a/common/djangoapps/pipeline_mako/tests/test_render.py +++ b/common/djangoapps/pipeline_mako/tests/test_render.py @@ -1,7 +1,6 @@ """ Tests for rendering functions in the mako pipeline. """ - import ddt from mock import patch from six.moves import map diff --git a/common/djangoapps/pipeline_mako/tests/test_static_content.py b/common/djangoapps/pipeline_mako/tests/test_static_content.py index 796ced76d9..88eec2c718 100644 --- a/common/djangoapps/pipeline_mako/tests/test_static_content.py +++ b/common/djangoapps/pipeline_mako/tests/test_static_content.py @@ -3,7 +3,6 @@ Tests of pipeline_mako/templates/static_content.html """ - import unittest from edxmako.shortcuts import render_to_string diff --git a/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py b/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py index 44edd4d2d7..7a1d5a2125 100644 --- a/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py +++ b/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py @@ -3,7 +3,6 @@ Django management command to clear the 'staticfiles' Django cache """ - from django.core.management.base import BaseCommand from django.core.cache import caches diff --git a/common/djangoapps/static_replace/models.py b/common/djangoapps/static_replace/models.py index 6af8216190..d905043ff2 100644 --- a/common/djangoapps/static_replace/models.py +++ b/common/djangoapps/static_replace/models.py @@ -3,7 +3,6 @@ Models for static_replace """ - import six from six.moves import map diff --git a/common/djangoapps/status/models.py b/common/djangoapps/status/models.py index 35c9a5e842..e48af5394c 100644 --- a/common/djangoapps/status/models.py +++ b/common/djangoapps/status/models.py @@ -3,7 +3,6 @@ Store status messages in the database. """ - import six from config_models.admin import ConfigurationModelAdmin from config_models.models import ConfigurationModel diff --git a/common/djangoapps/status/status.py b/common/djangoapps/status/status.py index 7f48435e3a..a23a49dba8 100644 --- a/common/djangoapps/status/status.py +++ b/common/djangoapps/status/status.py @@ -3,7 +3,6 @@ A tiny app that checks for a status message. """ - import logging from .models import GlobalStatusMessage diff --git a/common/djangoapps/student/management/commands/anonymized_id_mapping.py b/common/djangoapps/student/management/commands/anonymized_id_mapping.py index 8411401676..c29b17d0fe 100644 --- a/common/djangoapps/student/management/commands/anonymized_id_mapping.py +++ b/common/djangoapps/student/management/commands/anonymized_id_mapping.py @@ -9,7 +9,6 @@ the following: """ - import csv from django.contrib.auth.models import User diff --git a/common/djangoapps/student/management/commands/change_eligibility_deadline.py b/common/djangoapps/student/management/commands/change_eligibility_deadline.py index 7cf381acf0..680667bd3d 100644 --- a/common/djangoapps/student/management/commands/change_eligibility_deadline.py +++ b/common/djangoapps/student/management/commands/change_eligibility_deadline.py @@ -1,7 +1,6 @@ """ Command line script to change credit course eligibility deadline. """ - import logging from datetime import datetime, timedelta diff --git a/common/djangoapps/student/management/commands/change_enrollment.py b/common/djangoapps/student/management/commands/change_enrollment.py index 5b3e7a149e..1fdcc98eb1 100644 --- a/common/djangoapps/student/management/commands/change_enrollment.py +++ b/common/djangoapps/student/management/commands/change_enrollment.py @@ -1,7 +1,6 @@ """ Command line script to change user enrollments. """ - import logging from django.core.management.base import BaseCommand, CommandError diff --git a/common/djangoapps/student/management/commands/delete_historical_enrollment_data.py b/common/djangoapps/student/management/commands/delete_historical_enrollment_data.py index 3fdc879f3a..52b60c3296 100644 --- a/common/djangoapps/student/management/commands/delete_historical_enrollment_data.py +++ b/common/djangoapps/student/management/commands/delete_historical_enrollment_data.py @@ -3,7 +3,6 @@ Command to delete all rows from the student_historicalcourseenrollment table. """ - import logging from openedx.core.djangoapps.util.row_delete import BaseDeletionCommand, delete_rows diff --git a/common/djangoapps/student/management/commands/manage_group.py b/common/djangoapps/student/management/commands/manage_group.py index 6e4b0e5104..157037692e 100644 --- a/common/djangoapps/student/management/commands/manage_group.py +++ b/common/djangoapps/student/management/commands/manage_group.py @@ -4,7 +4,6 @@ and set their permissions by name. """ - from django.apps import apps from django.contrib.auth.models import Group, Permission from django.contrib.contenttypes.models import ContentType diff --git a/common/djangoapps/student/management/commands/manage_user.py b/common/djangoapps/student/management/commands/manage_user.py index 4d1f36c58d..46ee7501ce 100644 --- a/common/djangoapps/student/management/commands/manage_user.py +++ b/common/djangoapps/student/management/commands/manage_user.py @@ -4,7 +4,6 @@ Django users, set/unset permission bits, and associate groups by name. """ - from django.contrib.auth import get_user_model from django.contrib.auth.hashers import is_password_usable from django.contrib.auth.models import Group diff --git a/common/djangoapps/student/management/tests/test_change_eligibility_deadline.py b/common/djangoapps/student/management/tests/test_change_eligibility_deadline.py index f6274b1e48..20fc611fdb 100644 --- a/common/djangoapps/student/management/tests/test_change_eligibility_deadline.py +++ b/common/djangoapps/student/management/tests/test_change_eligibility_deadline.py @@ -1,7 +1,6 @@ """ Test the change_eligibility_deadline command line script.""" - from datetime import datetime, timedelta from django.core.management import call_command diff --git a/common/djangoapps/student/management/tests/test_change_enrollment.py b/common/djangoapps/student/management/tests/test_change_enrollment.py index c4a4689f15..6a27f2dd3b 100644 --- a/common/djangoapps/student/management/tests/test_change_enrollment.py +++ b/common/djangoapps/student/management/tests/test_change_enrollment.py @@ -1,7 +1,6 @@ """ Test the change_enrollment command line script.""" - import ddt from django.core.management import call_command from mock import patch diff --git a/common/djangoapps/student/management/tests/test_create_random_users.py b/common/djangoapps/student/management/tests/test_create_random_users.py index fdd1012464..3fc3dae83b 100644 --- a/common/djangoapps/student/management/tests/test_create_random_users.py +++ b/common/djangoapps/student/management/tests/test_create_random_users.py @@ -3,7 +3,6 @@ Test the create_random_users command line script """ - import pytest from django.contrib.auth import get_user_model from django.core.management import call_command diff --git a/common/djangoapps/student/message_types.py b/common/djangoapps/student/message_types.py index 9feb19cfd4..03c88eb5d9 100644 --- a/common/djangoapps/student/message_types.py +++ b/common/djangoapps/student/message_types.py @@ -3,7 +3,6 @@ ACE message types for the student module. """ - from openedx.core.djangoapps.ace_common.message import BaseMessageType diff --git a/common/djangoapps/student/roles.py b/common/djangoapps/student/roles.py index eb347a92e1..ff4f03d512 100644 --- a/common/djangoapps/student/roles.py +++ b/common/djangoapps/student/roles.py @@ -4,7 +4,6 @@ adding users, removing users, and listing members """ - import logging from abc import ABCMeta, abstractmethod from collections import defaultdict diff --git a/common/djangoapps/student/tests/factories.py b/common/djangoapps/student/tests/factories.py index 66817b13db..6c5f34a3fb 100644 --- a/common/djangoapps/student/tests/factories.py +++ b/common/djangoapps/student/tests/factories.py @@ -1,7 +1,6 @@ """Provides factories for student models.""" - from datetime import datetime from uuid import uuid4 diff --git a/common/djangoapps/student/tests/test_certificates.py b/common/djangoapps/student/tests/test_certificates.py index e643ffb2bf..e7efe1c67c 100644 --- a/common/djangoapps/student/tests/test_certificates.py +++ b/common/djangoapps/student/tests/test_certificates.py @@ -1,7 +1,6 @@ """Tests for display of certificates on the student dashboard. """ - import datetime import unittest diff --git a/common/djangoapps/student/tests/test_helpers.py b/common/djangoapps/student/tests/test_helpers.py index bcb8dcbf83..01d64dd8e6 100644 --- a/common/djangoapps/student/tests/test_helpers.py +++ b/common/djangoapps/student/tests/test_helpers.py @@ -1,7 +1,6 @@ """ Test Student helpers """ - import logging import ddt diff --git a/common/djangoapps/student/tests/test_linkedin.py b/common/djangoapps/student/tests/test_linkedin.py index bd30ad4417..a237ead911 100644 --- a/common/djangoapps/student/tests/test_linkedin.py +++ b/common/djangoapps/student/tests/test_linkedin.py @@ -2,7 +2,6 @@ """Tests for LinkedIn Add to Profile configuration. """ - import ddt from django.conf import settings from django.test import TestCase diff --git a/common/djangoapps/student/tests/test_long_username_email.py b/common/djangoapps/student/tests/test_long_username_email.py index fc44221618..6c5793f538 100644 --- a/common/djangoapps/student/tests/test_long_username_email.py +++ b/common/djangoapps/student/tests/test_long_username_email.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- - import json from django.test import TestCase diff --git a/common/djangoapps/student/tests/test_models.py b/common/djangoapps/student/tests/test_models.py index 549893e7d5..072fdbfbec 100644 --- a/common/djangoapps/student/tests/test_models.py +++ b/common/djangoapps/student/tests/test_models.py @@ -1,7 +1,6 @@ # pylint: disable=missing-docstring - import datetime import hashlib diff --git a/common/djangoapps/student/tests/test_parental_controls.py b/common/djangoapps/student/tests/test_parental_controls.py index 858608e1c5..236ba998e7 100644 --- a/common/djangoapps/student/tests/test_parental_controls.py +++ b/common/djangoapps/student/tests/test_parental_controls.py @@ -1,7 +1,6 @@ """Unit tests for parental controls.""" - import datetime from django.test import TestCase diff --git a/common/djangoapps/student/tests/test_tasks.py b/common/djangoapps/student/tests/test_tasks.py index 265a48f041..727d940207 100644 --- a/common/djangoapps/student/tests/test_tasks.py +++ b/common/djangoapps/student/tests/test_tasks.py @@ -3,7 +3,6 @@ Tests for the Sending activation email celery tasks """ - import mock from django.conf import settings from django.test import TestCase diff --git a/common/djangoapps/student/tests/test_user_profile_properties.py b/common/djangoapps/student/tests/test_user_profile_properties.py index 1cd08b7426..77bcf25127 100644 --- a/common/djangoapps/student/tests/test_user_profile_properties.py +++ b/common/djangoapps/student/tests/test_user_profile_properties.py @@ -1,7 +1,6 @@ """Unit tests for custom UserProfile properties.""" - import datetime import ddt diff --git a/common/djangoapps/student/urls.py b/common/djangoapps/student/urls.py index 973ece9fbd..3b42642013 100644 --- a/common/djangoapps/student/urls.py +++ b/common/djangoapps/student/urls.py @@ -3,7 +3,6 @@ URLs for student app """ - from django.conf import settings from django.conf.urls import url diff --git a/common/djangoapps/student/views/__init__.py b/common/djangoapps/student/views/__init__.py index d5d5933ab4..c11803e8f9 100644 --- a/common/djangoapps/student/views/__init__.py +++ b/common/djangoapps/student/views/__init__.py @@ -3,6 +3,5 @@ Combines all of the broken out student views """ - from .dashboard import * # pylint: disable=wildcard-import from .management import * # pylint: disable=wildcard-import diff --git a/common/djangoapps/student/views/dashboard.py b/common/djangoapps/student/views/dashboard.py index 7088b6d49a..a31ac3952a 100644 --- a/common/djangoapps/student/views/dashboard.py +++ b/common/djangoapps/student/views/dashboard.py @@ -3,7 +3,6 @@ Dashboard view and supporting methods """ - import datetime import logging from collections import defaultdict diff --git a/common/djangoapps/student/views/management.py b/common/djangoapps/student/views/management.py index c1f09b6f73..10ff1dfe70 100644 --- a/common/djangoapps/student/views/management.py +++ b/common/djangoapps/student/views/management.py @@ -3,7 +3,6 @@ Student Views """ - import datetime import logging import uuid diff --git a/common/djangoapps/terrain/stubs/comments.py b/common/djangoapps/terrain/stubs/comments.py index 191c046ef0..57f022f974 100644 --- a/common/djangoapps/terrain/stubs/comments.py +++ b/common/djangoapps/terrain/stubs/comments.py @@ -3,7 +3,6 @@ Stub implementation of cs_comments_service for acceptance tests """ - import re from collections import OrderedDict diff --git a/common/djangoapps/terrain/stubs/ecommerce.py b/common/djangoapps/terrain/stubs/ecommerce.py index c0c2e44b69..bda35a7ae0 100644 --- a/common/djangoapps/terrain/stubs/ecommerce.py +++ b/common/djangoapps/terrain/stubs/ecommerce.py @@ -3,7 +3,6 @@ Stub implementation of ecommerce service for acceptance tests """ - import re import six.moves.urllib.parse # pylint: disable=import-error diff --git a/common/djangoapps/terrain/stubs/edxnotes.py b/common/djangoapps/terrain/stubs/edxnotes.py index 8820f3407b..b32f3b174f 100644 --- a/common/djangoapps/terrain/stubs/edxnotes.py +++ b/common/djangoapps/terrain/stubs/edxnotes.py @@ -3,7 +3,6 @@ Stub implementation of EdxNotes for acceptance tests """ - import json import re from copy import deepcopy diff --git a/common/djangoapps/terrain/stubs/http.py b/common/djangoapps/terrain/stubs/http.py index 5ca4e820ed..0517ab0d2b 100644 --- a/common/djangoapps/terrain/stubs/http.py +++ b/common/djangoapps/terrain/stubs/http.py @@ -3,7 +3,6 @@ Stub implementation of an HTTP service. """ - import json import threading from functools import wraps diff --git a/common/djangoapps/terrain/stubs/lti.py b/common/djangoapps/terrain/stubs/lti.py index 27b1c51e5a..b7418545cf 100644 --- a/common/djangoapps/terrain/stubs/lti.py +++ b/common/djangoapps/terrain/stubs/lti.py @@ -10,7 +10,6 @@ not possible to have this LTI multiple times on a single page in LMS. """ - import base64 import hashlib import logging diff --git a/common/djangoapps/terrain/stubs/tests/test_http.py b/common/djangoapps/terrain/stubs/tests/test_http.py index 4d6ba12023..5568a297b5 100644 --- a/common/djangoapps/terrain/stubs/tests/test_http.py +++ b/common/djangoapps/terrain/stubs/tests/test_http.py @@ -3,7 +3,6 @@ Unit tests for stub HTTP server base class. """ - import json import unittest diff --git a/common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py b/common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py index b792c04a83..d88fe4c48f 100644 --- a/common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py +++ b/common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py @@ -3,7 +3,6 @@ Unit tests for stub XQueue implementation. """ - import ast import json import unittest diff --git a/common/djangoapps/terrain/stubs/tests/test_youtube_stub.py b/common/djangoapps/terrain/stubs/tests/test_youtube_stub.py index bb7f9dd745..713b8ad351 100644 --- a/common/djangoapps/terrain/stubs/tests/test_youtube_stub.py +++ b/common/djangoapps/terrain/stubs/tests/test_youtube_stub.py @@ -3,7 +3,6 @@ Unit test for stub YouTube implementation. """ - import unittest import requests diff --git a/common/djangoapps/terrain/stubs/xqueue.py b/common/djangoapps/terrain/stubs/xqueue.py index 433e180798..d24965b3bd 100644 --- a/common/djangoapps/terrain/stubs/xqueue.py +++ b/common/djangoapps/terrain/stubs/xqueue.py @@ -10,7 +10,6 @@ If no grade response is configured, a default response will be returned. """ - import copy import json from threading import Timer diff --git a/common/djangoapps/third_party_auth/__init__.py b/common/djangoapps/third_party_auth/__init__.py index 56de1c60cd..d133c10a26 100644 --- a/common/djangoapps/third_party_auth/__init__.py +++ b/common/djangoapps/third_party_auth/__init__.py @@ -1,7 +1,6 @@ """Third party authentication. """ - from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers default_app_config = 'third_party_auth.apps.ThirdPartyAuthConfig' diff --git a/common/djangoapps/third_party_auth/api/serializers.py b/common/djangoapps/third_party_auth/api/serializers.py index bcbb737a81..e4c9398c70 100644 --- a/common/djangoapps/third_party_auth/api/serializers.py +++ b/common/djangoapps/third_party_auth/api/serializers.py @@ -1,7 +1,6 @@ """ Django REST Framework Serializers """ - from rest_framework import serializers diff --git a/common/djangoapps/third_party_auth/api/urls.py b/common/djangoapps/third_party_auth/api/urls.py index 642a86a904..01b12c35da 100644 --- a/common/djangoapps/third_party_auth/api/urls.py +++ b/common/djangoapps/third_party_auth/api/urls.py @@ -1,7 +1,6 @@ """ URL configuration for the third party auth API """ - from django.conf import settings from django.conf.urls import url diff --git a/common/djangoapps/third_party_auth/api/views.py b/common/djangoapps/third_party_auth/api/views.py index e5c21627f7..9f3d799bcf 100644 --- a/common/djangoapps/third_party_auth/api/views.py +++ b/common/djangoapps/third_party_auth/api/views.py @@ -3,7 +3,6 @@ Third Party Auth REST API views """ - from collections import namedtuple from django.conf import settings diff --git a/common/djangoapps/third_party_auth/apps.py b/common/djangoapps/third_party_auth/apps.py index d05a19217c..40fc9ca3c6 100644 --- a/common/djangoapps/third_party_auth/apps.py +++ b/common/djangoapps/third_party_auth/apps.py @@ -1,6 +1,5 @@ - from django.apps import AppConfig from django.conf import settings diff --git a/common/djangoapps/third_party_auth/middleware.py b/common/djangoapps/third_party_auth/middleware.py index b680055c30..7205340758 100644 --- a/common/djangoapps/third_party_auth/middleware.py +++ b/common/djangoapps/third_party_auth/middleware.py @@ -1,7 +1,6 @@ """Middleware classes for third_party_auth.""" - import six.moves.urllib.parse # pylint: disable=import-error from django.contrib import messages from django.shortcuts import redirect diff --git a/common/djangoapps/third_party_auth/pipeline.py b/common/djangoapps/third_party_auth/pipeline.py index bcc35727b7..908c0d06ba 100644 --- a/common/djangoapps/third_party_auth/pipeline.py +++ b/common/djangoapps/third_party_auth/pipeline.py @@ -58,7 +58,6 @@ See https://python-social-auth.readthedocs.io/en/latest/pipeline.html for more d """ - import base64 import hashlib import hmac diff --git a/common/djangoapps/third_party_auth/strategy.py b/common/djangoapps/third_party_auth/strategy.py index a7d72ad0e4..f578291b99 100644 --- a/common/djangoapps/third_party_auth/strategy.py +++ b/common/djangoapps/third_party_auth/strategy.py @@ -4,7 +4,6 @@ ConfigurationModels rather than django.settings """ - from social_core.backends.oauth import OAuthAuth from social_django.strategy import DjangoStrategy diff --git a/common/djangoapps/third_party_auth/tasks.py b/common/djangoapps/third_party_auth/tasks.py index a8b83e97dc..f2c779e410 100644 --- a/common/djangoapps/third_party_auth/tasks.py +++ b/common/djangoapps/third_party_auth/tasks.py @@ -4,7 +4,6 @@ Code to manage fetching and storing the metadata of IdPs. """ - import datetime import logging diff --git a/common/djangoapps/third_party_auth/tests/data/saml_identity_provider_mock_data.py b/common/djangoapps/third_party_auth/tests/data/saml_identity_provider_mock_data.py index 690535b4b5..dc05b549e2 100644 --- a/common/djangoapps/third_party_auth/tests/data/saml_identity_provider_mock_data.py +++ b/common/djangoapps/third_party_auth/tests/data/saml_identity_provider_mock_data.py @@ -1,7 +1,6 @@ """Mock data for SAMLIdentityProvider""" - from social_core.backends.saml import OID_MAIL, OID_GIVEN_NAME, OID_SURNAME, OID_COMMON_NAME, OID_USERID expected_user_details = { diff --git a/common/djangoapps/third_party_auth/tests/test_lti.py b/common/djangoapps/third_party_auth/tests/test_lti.py index 0a3190057f..8d61a5ae07 100644 --- a/common/djangoapps/third_party_auth/tests/test_lti.py +++ b/common/djangoapps/third_party_auth/tests/test_lti.py @@ -3,7 +3,6 @@ Unit tests for third_party_auth LTI auth providers """ - import unittest from oauthlib.common import Request diff --git a/common/djangoapps/third_party_auth/tests/test_pipeline.py b/common/djangoapps/third_party_auth/tests/test_pipeline.py index b5d6e1daed..436c3455f1 100644 --- a/common/djangoapps/third_party_auth/tests/test_pipeline.py +++ b/common/djangoapps/third_party_auth/tests/test_pipeline.py @@ -1,7 +1,6 @@ """Unit tests for third_party_auth/pipeline.py.""" - import unittest from third_party_auth import pipeline diff --git a/common/djangoapps/third_party_auth/tests/test_pipeline_integration.py b/common/djangoapps/third_party_auth/tests/test_pipeline_integration.py index 3982f5328e..4f09ad8c14 100644 --- a/common/djangoapps/third_party_auth/tests/test_pipeline_integration.py +++ b/common/djangoapps/third_party_auth/tests/test_pipeline_integration.py @@ -1,7 +1,6 @@ """Integration tests for pipeline.py.""" - import datetime import unittest diff --git a/common/djangoapps/third_party_auth/tests/test_provider.py b/common/djangoapps/third_party_auth/tests/test_provider.py index a7900e54fa..b1a3deaa2c 100644 --- a/common/djangoapps/third_party_auth/tests/test_provider.py +++ b/common/djangoapps/third_party_auth/tests/test_provider.py @@ -1,7 +1,6 @@ """Unit tests for provider.py.""" - import unittest from django.contrib.sites.models import Site diff --git a/common/djangoapps/third_party_auth/tests/test_saml.py b/common/djangoapps/third_party_auth/tests/test_saml.py index cf0d89c872..7579b5e0ce 100644 --- a/common/djangoapps/third_party_auth/tests/test_saml.py +++ b/common/djangoapps/third_party_auth/tests/test_saml.py @@ -3,7 +3,6 @@ Unit tests for third_party_auth SAML auth providers """ - import mock from third_party_auth.saml import EdXSAMLIdentityProvider, get_saml_idp_class diff --git a/common/djangoapps/third_party_auth/tests/test_settings.py b/common/djangoapps/third_party_auth/tests/test_settings.py index e0484345ba..9c1158e611 100644 --- a/common/djangoapps/third_party_auth/tests/test_settings.py +++ b/common/djangoapps/third_party_auth/tests/test_settings.py @@ -1,7 +1,6 @@ """Unit tests for settings.py.""" - import unittest from mock import patch diff --git a/common/djangoapps/third_party_auth/tests/test_views.py b/common/djangoapps/third_party_auth/tests/test_views.py index 6051f97225..2f2687db88 100644 --- a/common/djangoapps/third_party_auth/tests/test_views.py +++ b/common/djangoapps/third_party_auth/tests/test_views.py @@ -3,7 +3,6 @@ Test the views served by third_party_auth. """ - import unittest import ddt diff --git a/common/djangoapps/third_party_auth/tests/testutil.py b/common/djangoapps/third_party_auth/tests/testutil.py index dd66e550ed..b613d26d64 100644 --- a/common/djangoapps/third_party_auth/tests/testutil.py +++ b/common/djangoapps/third_party_auth/tests/testutil.py @@ -5,7 +5,6 @@ Used by Django and non-Django tests; must not have Django deps. """ - import os.path from contextlib import contextmanager diff --git a/common/djangoapps/third_party_auth/urls.py b/common/djangoapps/third_party_auth/urls.py index 88ab33e85f..00175c18fe 100644 --- a/common/djangoapps/third_party_auth/urls.py +++ b/common/djangoapps/third_party_auth/urls.py @@ -1,7 +1,6 @@ """Url configuration for the auth module.""" - from django.conf.urls import include, url from .views import ( diff --git a/common/djangoapps/third_party_auth/utils.py b/common/djangoapps/third_party_auth/utils.py index 614c46f565..026d1b66f6 100644 --- a/common/djangoapps/third_party_auth/utils.py +++ b/common/djangoapps/third_party_auth/utils.py @@ -3,7 +3,6 @@ Utility functions for third_party_auth """ - from django.contrib.auth.models import User diff --git a/common/djangoapps/track/admin.py b/common/djangoapps/track/admin.py index 8406dd8ec7..1b2d920065 100644 --- a/common/djangoapps/track/admin.py +++ b/common/djangoapps/track/admin.py @@ -3,7 +3,6 @@ django admin pages for courseware model ''' - from django.contrib import admin from track.models import TrackingLog diff --git a/common/djangoapps/track/backends/__init__.py b/common/djangoapps/track/backends/__init__.py index 5adb2d00ee..da9825a60b 100644 --- a/common/djangoapps/track/backends/__init__.py +++ b/common/djangoapps/track/backends/__init__.py @@ -7,7 +7,6 @@ backends. """ - import abc import six diff --git a/common/djangoapps/track/backends/django.py b/common/djangoapps/track/backends/django.py index 4dffd586de..bb155f5045 100644 --- a/common/djangoapps/track/backends/django.py +++ b/common/djangoapps/track/backends/django.py @@ -8,7 +8,6 @@ Event tracker backend that saves events to a Django database. # schema changes or eventually deprecated. - import logging from django.db import models diff --git a/common/djangoapps/track/backends/logger.py b/common/djangoapps/track/backends/logger.py index eecb81743b..baec3bbb2f 100644 --- a/common/djangoapps/track/backends/logger.py +++ b/common/djangoapps/track/backends/logger.py @@ -1,7 +1,6 @@ """Event tracker backend that saves events to a python logger.""" - import json import logging diff --git a/common/djangoapps/track/backends/mongodb.py b/common/djangoapps/track/backends/mongodb.py index 2cec2557b2..b8f3e65748 100644 --- a/common/djangoapps/track/backends/mongodb.py +++ b/common/djangoapps/track/backends/mongodb.py @@ -1,7 +1,6 @@ """MongoDB event tracker backend.""" - import logging import pymongo diff --git a/common/djangoapps/track/management/commands/tracked_dummy_command.py b/common/djangoapps/track/management/commands/tracked_dummy_command.py index a1d6d2ceb4..f3fa95e711 100644 --- a/common/djangoapps/track/management/commands/tracked_dummy_command.py +++ b/common/djangoapps/track/management/commands/tracked_dummy_command.py @@ -3,7 +3,6 @@ Command used for testing TrackedCommands """ - import json from textwrap import dedent diff --git a/common/djangoapps/track/management/tracked_command.py b/common/djangoapps/track/management/tracked_command.py index 54f06f89a3..51f85809b8 100644 --- a/common/djangoapps/track/management/tracked_command.py +++ b/common/djangoapps/track/management/tracked_command.py @@ -1,7 +1,6 @@ """Provides management command calling info to tracking context.""" - from django.core.management.base import BaseCommand from eventtracking import tracker diff --git a/common/djangoapps/track/middleware.py b/common/djangoapps/track/middleware.py index 4c3135edbf..61e0efdfd9 100644 --- a/common/djangoapps/track/middleware.py +++ b/common/djangoapps/track/middleware.py @@ -6,8 +6,6 @@ framework. """ - - import hashlib import hmac import json diff --git a/common/djangoapps/track/shim.py b/common/djangoapps/track/shim.py index a402163e3f..97e7e02ca8 100644 --- a/common/djangoapps/track/shim.py +++ b/common/djangoapps/track/shim.py @@ -1,7 +1,6 @@ """Map new event context values to old top-level field values. Ensures events can be parsed by legacy parsers.""" - import json from .transformers import EventTransformerRegistry diff --git a/common/djangoapps/track/tests/__init__.py b/common/djangoapps/track/tests/__init__.py index 386f8dd8e6..f6c4d1e098 100644 --- a/common/djangoapps/track/tests/__init__.py +++ b/common/djangoapps/track/tests/__init__.py @@ -1,7 +1,6 @@ """Helpers for tests related to emitting events to the tracking logs.""" - from datetime import datetime from django.test import TestCase diff --git a/common/djangoapps/track/tests/test_contexts.py b/common/djangoapps/track/tests/test_contexts.py index 6b5bcf8fb2..e93425e907 100644 --- a/common/djangoapps/track/tests/test_contexts.py +++ b/common/djangoapps/track/tests/test_contexts.py @@ -1,7 +1,6 @@ # pylint: disable=missing-docstring - from unittest import TestCase import ddt diff --git a/common/djangoapps/track/tests/test_segment.py b/common/djangoapps/track/tests/test_segment.py index 87b309fbb6..5afc38660b 100644 --- a/common/djangoapps/track/tests/test_segment.py +++ b/common/djangoapps/track/tests/test_segment.py @@ -1,7 +1,6 @@ """Ensure emitted events contain the fields legacy processors expect to find.""" - import ddt from django.test import TestCase from django.test.utils import override_settings diff --git a/common/djangoapps/track/tests/test_shim.py b/common/djangoapps/track/tests/test_shim.py index fb7679a866..af52b2ff91 100644 --- a/common/djangoapps/track/tests/test_shim.py +++ b/common/djangoapps/track/tests/test_shim.py @@ -1,7 +1,6 @@ """Ensure emitted events contain the fields legacy processors expect to find.""" - from collections import namedtuple import ddt diff --git a/common/djangoapps/track/tracker.py b/common/djangoapps/track/tracker.py index 444c5556b0..e6f2e95524 100644 --- a/common/djangoapps/track/tracker.py +++ b/common/djangoapps/track/tracker.py @@ -19,7 +19,6 @@ below:: """ - import inspect from importlib import import_module diff --git a/common/djangoapps/track/transformers.py b/common/djangoapps/track/transformers.py index 3c1d667cb9..7511913a02 100644 --- a/common/djangoapps/track/transformers.py +++ b/common/djangoapps/track/transformers.py @@ -6,7 +6,6 @@ apply them to the appropriate events. """ - import json import logging diff --git a/common/djangoapps/track/urls.py b/common/djangoapps/track/urls.py index 093f0df560..7e74c87fdf 100644 --- a/common/djangoapps/track/urls.py +++ b/common/djangoapps/track/urls.py @@ -3,7 +3,6 @@ URLs for track app """ - from django.conf import settings from django.conf.urls import url diff --git a/common/djangoapps/track/utils.py b/common/djangoapps/track/utils.py index c49b132281..b7475aef35 100644 --- a/common/djangoapps/track/utils.py +++ b/common/djangoapps/track/utils.py @@ -1,7 +1,6 @@ """Utility functions and classes for track backends""" - import json from datetime import date, datetime diff --git a/common/djangoapps/track/views/segmentio.py b/common/djangoapps/track/views/segmentio.py index df1946f258..d358b574e7 100644 --- a/common/djangoapps/track/views/segmentio.py +++ b/common/djangoapps/track/views/segmentio.py @@ -1,7 +1,6 @@ """Handle events that were forwarded from the Segment webhook integration""" - import json import logging diff --git a/common/djangoapps/track/views/tests/test_views.py b/common/djangoapps/track/views/tests/test_views.py index 99ce27fc0e..44cb9e0ffb 100644 --- a/common/djangoapps/track/views/tests/test_views.py +++ b/common/djangoapps/track/views/tests/test_views.py @@ -1,7 +1,6 @@ # pylint: disable=missing-docstring,maybe-no-member - import ddt import six from django.contrib.auth.models import User diff --git a/common/djangoapps/util/admin.py b/common/djangoapps/util/admin.py index 634c0daaaf..99782fac1f 100644 --- a/common/djangoapps/util/admin.py +++ b/common/djangoapps/util/admin.py @@ -1,7 +1,6 @@ """Admin interface for the util app. """ - from django.contrib import admin from util.models import RateLimitConfiguration diff --git a/common/djangoapps/util/date_utils.py b/common/djangoapps/util/date_utils.py index 1446b207fe..37f1955838 100644 --- a/common/djangoapps/util/date_utils.py +++ b/common/djangoapps/util/date_utils.py @@ -3,7 +3,6 @@ Convenience methods for working with datetime objects """ - import re from datetime import datetime, timedelta diff --git a/common/djangoapps/util/file.py b/common/djangoapps/util/file.py index 49c7162a49..ac0ab235be 100644 --- a/common/djangoapps/util/file.py +++ b/common/djangoapps/util/file.py @@ -3,7 +3,6 @@ Utility methods related to file handling. """ - import os from datetime import datetime diff --git a/common/djangoapps/util/keyword_substitution.py b/common/djangoapps/util/keyword_substitution.py index 9554ce7c76..97a08f7ea4 100644 --- a/common/djangoapps/util/keyword_substitution.py +++ b/common/djangoapps/util/keyword_substitution.py @@ -19,7 +19,6 @@ Usage: """ - from django.contrib.auth.models import User from student.models import anonymous_id_for_user diff --git a/common/djangoapps/util/organizations_helpers.py b/common/djangoapps/util/organizations_helpers.py index 033b99d337..3990af513d 100644 --- a/common/djangoapps/util/organizations_helpers.py +++ b/common/djangoapps/util/organizations_helpers.py @@ -3,7 +3,6 @@ Utility library for working with the edx-organizations app """ - from django.conf import settings from django.db.utils import DatabaseError diff --git a/common/djangoapps/util/testing.py b/common/djangoapps/util/testing.py index 4dd3d073ef..fc158fe85a 100644 --- a/common/djangoapps/util/testing.py +++ b/common/djangoapps/util/testing.py @@ -3,7 +3,6 @@ Utility Mixins for unit tests """ - import json import sys diff --git a/common/djangoapps/util/tests/test_date_utils.py b/common/djangoapps/util/tests/test_date_utils.py index 7f8016d290..e0e0ef66d3 100644 --- a/common/djangoapps/util/tests/test_date_utils.py +++ b/common/djangoapps/util/tests/test_date_utils.py @@ -4,7 +4,6 @@ Tests for util.date_utils """ - import unittest from datetime import datetime, timedelta, tzinfo diff --git a/common/djangoapps/util/tests/test_db.py b/common/djangoapps/util/tests/test_db.py index 6115784614..230875a02a 100644 --- a/common/djangoapps/util/tests/test_db.py +++ b/common/djangoapps/util/tests/test_db.py @@ -1,7 +1,6 @@ """Tests for util.db module.""" - import threading import time import unittest diff --git a/common/djangoapps/util/tests/test_json_request.py b/common/djangoapps/util/tests/test_json_request.py index 775f49acdf..50ceea67f2 100644 --- a/common/djangoapps/util/tests/test_json_request.py +++ b/common/djangoapps/util/tests/test_json_request.py @@ -3,7 +3,6 @@ Test for JsonResponse and JsonResponseBadRequest util classes. """ - import json import unittest diff --git a/common/djangoapps/util/tests/test_keyword_sub_utils.py b/common/djangoapps/util/tests/test_keyword_sub_utils.py index 38e767bf6d..aa33b0fe88 100644 --- a/common/djangoapps/util/tests/test_keyword_sub_utils.py +++ b/common/djangoapps/util/tests/test_keyword_sub_utils.py @@ -3,7 +3,6 @@ Tests for keyword_substitution.py """ - import six from ddt import ddt, file_data from mock import patch diff --git a/common/djangoapps/util/tests/test_memcache.py b/common/djangoapps/util/tests/test_memcache.py index ec31c23d74..da9dc92bd7 100644 --- a/common/djangoapps/util/tests/test_memcache.py +++ b/common/djangoapps/util/tests/test_memcache.py @@ -3,7 +3,6 @@ Tests for memcache in util app """ - from django.core.cache import caches from django.test import TestCase from six import unichr diff --git a/common/djangoapps/util/tests/test_milestones_helpers.py b/common/djangoapps/util/tests/test_milestones_helpers.py index 17a0afe52b..cca096dda1 100644 --- a/common/djangoapps/util/tests/test_milestones_helpers.py +++ b/common/djangoapps/util/tests/test_milestones_helpers.py @@ -3,7 +3,6 @@ Tests for the milestones helpers library, which is the integration point for the """ - import ddt import pytest import six diff --git a/common/djangoapps/util/tests/test_password_policy_validators.py b/common/djangoapps/util/tests/test_password_policy_validators.py index e96bf89694..ae368330b8 100644 --- a/common/djangoapps/util/tests/test_password_policy_validators.py +++ b/common/djangoapps/util/tests/test_password_policy_validators.py @@ -2,7 +2,6 @@ """Tests for util.password_policy_validators module.""" - import unittest from ddt import data, ddt, unpack diff --git a/common/djangoapps/util/tests/test_sandboxing.py b/common/djangoapps/util/tests/test_sandboxing.py index 64c3906191..0edd014464 100644 --- a/common/djangoapps/util/tests/test_sandboxing.py +++ b/common/djangoapps/util/tests/test_sandboxing.py @@ -3,7 +3,6 @@ Tests for sandboxing.py in util app """ - from django.test import TestCase from django.test.utils import override_settings from opaque_keys.edx.keys import CourseKey diff --git a/common/djangoapps/util/tests/test_string_utils.py b/common/djangoapps/util/tests/test_string_utils.py index 8f52c49c15..87b3909837 100644 --- a/common/djangoapps/util/tests/test_string_utils.py +++ b/common/djangoapps/util/tests/test_string_utils.py @@ -3,7 +3,6 @@ Tests for string_utils.py """ - from django.test import TestCase from util.string_utils import str_to_bool diff --git a/common/djangoapps/util/url.py b/common/djangoapps/util/url.py index 81ac2aae4d..73046ad7ac 100644 --- a/common/djangoapps/util/url.py +++ b/common/djangoapps/util/url.py @@ -3,7 +3,6 @@ Utility functions related to urls. """ - import sys import six from importlib import import_module diff --git a/common/djangoapps/xblock_django/admin.py b/common/djangoapps/xblock_django/admin.py index ebf07d53b2..bd03d2676e 100644 --- a/common/djangoapps/xblock_django/admin.py +++ b/common/djangoapps/xblock_django/admin.py @@ -3,7 +3,6 @@ Django admin dashboard configuration. """ - from config_models.admin import ConfigurationModelAdmin, KeyedConfigurationModelAdmin from django.contrib import admin from django.utils.translation import ugettext_lazy as _ diff --git a/common/djangoapps/xblock_django/api.py b/common/djangoapps/xblock_django/api.py index 7d982a88a7..88a2b47e9d 100644 --- a/common/djangoapps/xblock_django/api.py +++ b/common/djangoapps/xblock_django/api.py @@ -3,7 +3,6 @@ API methods related to xblock state. """ - from xblock_django.models import XBlockConfiguration, XBlockStudioConfiguration diff --git a/common/djangoapps/xblock_django/models.py b/common/djangoapps/xblock_django/models.py index bd451f657b..a3d8b3764b 100644 --- a/common/djangoapps/xblock_django/models.py +++ b/common/djangoapps/xblock_django/models.py @@ -3,7 +3,6 @@ Models. """ - from config_models.models import ConfigurationModel from django.db import models from django.utils.translation import ugettext_lazy as _ diff --git a/common/lib/capa/capa/capa_problem.py b/common/lib/capa/capa/capa_problem.py index 78f5421591..5f44750ccb 100644 --- a/common/lib/capa/capa/capa_problem.py +++ b/common/lib/capa/capa/capa_problem.py @@ -14,7 +14,6 @@ This is used by capa_module. """ - import logging import os.path import re diff --git a/common/lib/capa/capa/customrender.py b/common/lib/capa/capa/customrender.py index 8a2bcb7644..9615abbaa5 100644 --- a/common/lib/capa/capa/customrender.py +++ b/common/lib/capa/capa/customrender.py @@ -7,7 +7,6 @@ and the xml element. """ - import logging import re import xml.sax.saxutils as saxutils diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index a98baed3c5..d7586836e3 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -39,7 +39,6 @@ graded status as'status' # general css and layout strategy for capa, document it, then implement it. - import json import logging import re diff --git a/common/lib/capa/capa/safe_exec/safe_exec.py b/common/lib/capa/capa/safe_exec/safe_exec.py index 6532fe1d9d..d5f5651f6f 100644 --- a/common/lib/capa/capa/safe_exec/safe_exec.py +++ b/common/lib/capa/capa/safe_exec/safe_exec.py @@ -1,7 +1,6 @@ """Capa's specialized use of codejail.safe_exec.""" - import hashlib from codejail.safe_exec import SafeExecException, json_safe diff --git a/common/lib/capa/capa/safe_exec/tests/test_lazymod.py b/common/lib/capa/capa/safe_exec/tests/test_lazymod.py index 9bf218aef0..a6b5e0551b 100644 --- a/common/lib/capa/capa/safe_exec/tests/test_lazymod.py +++ b/common/lib/capa/capa/safe_exec/tests/test_lazymod.py @@ -1,7 +1,6 @@ """Test lazymod.py""" - import sys import unittest diff --git a/common/lib/capa/capa/safe_exec/tests/test_safe_exec.py b/common/lib/capa/capa/safe_exec/tests/test_safe_exec.py index 53b193c957..ba2ebc1a87 100644 --- a/common/lib/capa/capa/safe_exec/tests/test_safe_exec.py +++ b/common/lib/capa/capa/safe_exec/tests/test_safe_exec.py @@ -1,7 +1,6 @@ """Test safe_exec.py""" - import hashlib import os import os.path diff --git a/common/lib/capa/capa/tests/helpers.py b/common/lib/capa/capa/tests/helpers.py index 0def896e6a..403d05a00f 100644 --- a/common/lib/capa/capa/tests/helpers.py +++ b/common/lib/capa/capa/tests/helpers.py @@ -1,7 +1,6 @@ """Tools for helping with testing capa.""" - import gettext import io import os diff --git a/common/lib/capa/capa/tests/test_answer_pool.py b/common/lib/capa/capa/tests/test_answer_pool.py index 31e992067e..9328e8511c 100644 --- a/common/lib/capa/capa/tests/test_answer_pool.py +++ b/common/lib/capa/capa/tests/test_answer_pool.py @@ -4,7 +4,6 @@ Tests the logic of the "answer-pool" attribute, e.g. """ - import textwrap import unittest diff --git a/common/lib/capa/capa/tests/test_correctmap.py b/common/lib/capa/capa/tests/test_correctmap.py index 0ca17b7b5f..3801535516 100644 --- a/common/lib/capa/capa/tests/test_correctmap.py +++ b/common/lib/capa/capa/tests/test_correctmap.py @@ -3,7 +3,6 @@ Tests to verify that CorrectMap behaves correctly """ - import datetime import unittest diff --git a/common/lib/capa/capa/tests/test_hint_functionality.py b/common/lib/capa/capa/tests/test_hint_functionality.py index eae1efc0f5..c2d89eea79 100644 --- a/common/lib/capa/capa/tests/test_hint_functionality.py +++ b/common/lib/capa/capa/tests/test_hint_functionality.py @@ -4,7 +4,6 @@ Tests of extended hints """ - import unittest from ddt import data, ddt, unpack diff --git a/common/lib/capa/capa/tests/test_input_templates.py b/common/lib/capa/capa/tests/test_input_templates.py index 5b5b212cd4..f2b1784979 100644 --- a/common/lib/capa/capa/tests/test_input_templates.py +++ b/common/lib/capa/capa/tests/test_input_templates.py @@ -3,7 +3,6 @@ Tests for the logic in input type mako templates. """ - import json import unittest from collections import OrderedDict diff --git a/common/lib/capa/capa/tests/test_responsetypes.py b/common/lib/capa/capa/tests/test_responsetypes.py index 944573e6bb..2a3c5af3f5 100644 --- a/common/lib/capa/capa/tests/test_responsetypes.py +++ b/common/lib/capa/capa/tests/test_responsetypes.py @@ -4,7 +4,6 @@ Tests of responsetypes """ - import io import json import os diff --git a/common/lib/capa/capa/tests/test_targeted_feedback.py b/common/lib/capa/capa/tests/test_targeted_feedback.py index 755d88c302..3a33e7af46 100644 --- a/common/lib/capa/capa/tests/test_targeted_feedback.py +++ b/common/lib/capa/capa/tests/test_targeted_feedback.py @@ -4,7 +4,6 @@ i.e. those with the element """ - import textwrap import unittest diff --git a/common/lib/safe_lxml/safe_lxml/__init__.py b/common/lib/safe_lxml/safe_lxml/__init__.py index 476b451136..b17efb15cc 100644 --- a/common/lib/safe_lxml/safe_lxml/__init__.py +++ b/common/lib/safe_lxml/safe_lxml/__init__.py @@ -3,7 +3,6 @@ Defuse vulnerabilities in XML packages. """ - def defuse_xml_libs(): """ Monkey patch and defuse all stdlib xml packages and lxml. diff --git a/common/lib/safe_lxml/safe_lxml/etree.py b/common/lib/safe_lxml/safe_lxml/etree.py index fa2acae2c6..fef0694a77 100644 --- a/common/lib/safe_lxml/safe_lxml/etree.py +++ b/common/lib/safe_lxml/safe_lxml/etree.py @@ -12,7 +12,6 @@ For processing xml always prefer this over using lxml.etree directly. # pylint: disable=unused-import, wildcard-import, unused-wildcard-import - from lxml.etree import XMLParser as _XMLParser from lxml.etree import * from lxml.etree import _Element, _ElementTree diff --git a/common/lib/safe_lxml/safe_lxml/tests.py b/common/lib/safe_lxml/safe_lxml/tests.py index 64a03ee3a9..01ced5e163 100644 --- a/common/lib/safe_lxml/safe_lxml/tests.py +++ b/common/lib/safe_lxml/safe_lxml/tests.py @@ -1,7 +1,6 @@ """Test that we have defused XML.""" - import defusedxml from lxml import etree diff --git a/common/lib/sandbox-packages/loncapa/loncapa_check.py b/common/lib/sandbox-packages/loncapa/loncapa_check.py index 18e0eb7d16..fea82fdd4f 100644 --- a/common/lib/sandbox-packages/loncapa/loncapa_check.py +++ b/common/lib/sandbox-packages/loncapa/loncapa_check.py @@ -6,7 +6,6 @@ # Used in translating LON-CAPA problems to i4x problem specification language. - import math import random from six.moves import range diff --git a/common/lib/xmodule/xmodule/assetstore/__init__.py b/common/lib/xmodule/xmodule/assetstore/__init__.py index 614a1a27d7..7b4dd96c7e 100644 --- a/common/lib/xmodule/xmodule/assetstore/__init__.py +++ b/common/lib/xmodule/xmodule/assetstore/__init__.py @@ -3,7 +3,6 @@ Classes representing asset metadata. """ - import json from datetime import datetime diff --git a/common/lib/xmodule/xmodule/assetstore/assetmgr.py b/common/lib/xmodule/xmodule/assetstore/assetmgr.py index 7e5ed1716c..02af44787b 100644 --- a/common/lib/xmodule/xmodule/assetstore/assetmgr.py +++ b/common/lib/xmodule/xmodule/assetstore/assetmgr.py @@ -14,7 +14,6 @@ Note: Hotfix (PLAT-734) No asset calls find_asset_metadata, and directly accesse """ - from contracts import contract, new_contract from opaque_keys.edx.keys import AssetKey diff --git a/common/lib/xmodule/xmodule/assetstore/tests/test_asset_xml.py b/common/lib/xmodule/xmodule/assetstore/tests/test_asset_xml.py index 7a22b34cbd..baa1e5e61c 100644 --- a/common/lib/xmodule/xmodule/assetstore/tests/test_asset_xml.py +++ b/common/lib/xmodule/xmodule/assetstore/tests/test_asset_xml.py @@ -3,7 +3,6 @@ Test for asset XML generation / parsing. """ - import unittest from contracts import ContractNotRespected diff --git a/common/lib/xmodule/xmodule/conditional_module.py b/common/lib/xmodule/xmodule/conditional_module.py index 08473659a0..bb3f141caf 100644 --- a/common/lib/xmodule/xmodule/conditional_module.py +++ b/common/lib/xmodule/xmodule/conditional_module.py @@ -3,7 +3,6 @@ some xmodules by conditions. """ - import json import logging diff --git a/common/lib/xmodule/xmodule/editing_module.py b/common/lib/xmodule/xmodule/editing_module.py index 75ecc8e0fe..c32211584f 100644 --- a/common/lib/xmodule/xmodule/editing_module.py +++ b/common/lib/xmodule/xmodule/editing_module.py @@ -1,7 +1,6 @@ """Descriptors for XBlocks/Xmodules, that provide editing of atrributes""" - import logging from pkg_resources import resource_string diff --git a/common/lib/xmodule/xmodule/error_module.py b/common/lib/xmodule/xmodule/error_module.py index 74aa5a588c..604ba71f7d 100644 --- a/common/lib/xmodule/xmodule/error_module.py +++ b/common/lib/xmodule/xmodule/error_module.py @@ -4,7 +4,6 @@ loading or rendering other modules """ - import hashlib import json import logging diff --git a/common/lib/xmodule/xmodule/graders.py b/common/lib/xmodule/xmodule/graders.py index c043127e7d..2690618f47 100644 --- a/common/lib/xmodule/xmodule/graders.py +++ b/common/lib/xmodule/xmodule/graders.py @@ -3,7 +3,6 @@ Code used to calculate learner grades. """ - import abc import inspect import logging diff --git a/common/lib/xmodule/xmodule/lti_module.py b/common/lib/xmodule/xmodule/lti_module.py index 63d7df3b70..e201d6f93c 100644 --- a/common/lib/xmodule/xmodule/lti_module.py +++ b/common/lib/xmodule/xmodule/lti_module.py @@ -54,7 +54,6 @@ What is supported: """ - import base64 import datetime import hashlib diff --git a/common/lib/xmodule/xmodule/modulestore/__init__.py b/common/lib/xmodule/xmodule/modulestore/__init__.py index bee0f80e49..785beb9556 100644 --- a/common/lib/xmodule/xmodule/modulestore/__init__.py +++ b/common/lib/xmodule/xmodule/modulestore/__init__.py @@ -4,7 +4,6 @@ that are stored in a database an accessible using their Location as an identifie """ - import datetime import logging import re diff --git a/common/lib/xmodule/xmodule/modulestore/django.py b/common/lib/xmodule/xmodule/modulestore/django.py index 4074da9e0e..d00ad8991b 100644 --- a/common/lib/xmodule/xmodule/modulestore/django.py +++ b/common/lib/xmodule/xmodule/modulestore/django.py @@ -5,7 +5,6 @@ Passes settings.MODULESTORE as kwargs to MongoModuleStore """ - from importlib import import_module import gettext import logging diff --git a/common/lib/xmodule/xmodule/modulestore/draft_and_published.py b/common/lib/xmodule/xmodule/modulestore/draft_and_published.py index ad824f1ced..8cd3a28d40 100644 --- a/common/lib/xmodule/xmodule/modulestore/draft_and_published.py +++ b/common/lib/xmodule/xmodule/modulestore/draft_and_published.py @@ -3,7 +3,6 @@ This module provides an abstraction for Module Stores that support Draft and Pub """ - import logging import threading from abc import ABCMeta, abstractmethod diff --git a/common/lib/xmodule/xmodule/modulestore/mixed.py b/common/lib/xmodule/xmodule/modulestore/mixed.py index 8051a858b6..6297888c6d 100644 --- a/common/lib/xmodule/xmodule/modulestore/mixed.py +++ b/common/lib/xmodule/xmodule/modulestore/mixed.py @@ -6,7 +6,6 @@ In this way, courses can be served up via either SplitMongoModuleStore or MongoM """ - import functools import itertools import logging diff --git a/common/lib/xmodule/xmodule/modulestore/modulestore_settings.py b/common/lib/xmodule/xmodule/modulestore/modulestore_settings.py index a2056b8243..3ce3b5234f 100644 --- a/common/lib/xmodule/xmodule/modulestore/modulestore_settings.py +++ b/common/lib/xmodule/xmodule/modulestore/modulestore_settings.py @@ -3,7 +3,6 @@ This file contains helper functions for configuring module_store_setting setting """ - import copy import warnings diff --git a/common/lib/xmodule/xmodule/modulestore/mongo/__init__.py b/common/lib/xmodule/xmodule/modulestore/mongo/__init__.py index bf3fc5cef7..4fc645a4ca 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo/__init__.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo/__init__.py @@ -3,7 +3,6 @@ Provide names as exported by older mongo.py module """ - from xmodule.modulestore.mongo.base import MongoKeyValueStore, MongoModuleStore # Backwards compatibility for prod systems that refererence # xmodule.modulestore.mongo.DraftMongoModuleStore diff --git a/common/lib/xmodule/xmodule/modulestore/mongo/draft.py b/common/lib/xmodule/xmodule/modulestore/mongo/draft.py index 95063aba5c..ff5fba0e05 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo/draft.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo/draft.py @@ -7,7 +7,6 @@ and otherwise returns i4x://org/course/cat/name). """ - import logging import pymongo diff --git a/common/lib/xmodule/xmodule/modulestore/split_mongo/__init__.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/__init__.py index f0ccef18ee..47b772337d 100644 --- a/common/lib/xmodule/xmodule/modulestore/split_mongo/__init__.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/__init__.py @@ -3,7 +3,6 @@ General utilities """ - from collections import namedtuple from contracts import check, contract diff --git a/common/lib/xmodule/xmodule/modulestore/split_mongo/id_manager.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/id_manager.py index be0628b8ff..cdf5e6ed3a 100644 --- a/common/lib/xmodule/xmodule/modulestore/split_mongo/id_manager.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/id_manager.py @@ -4,7 +4,6 @@ mechanism. """ - from opaque_keys.edx.locator import DefinitionLocator, LocalId from xmodule.modulestore.split_mongo import BlockKey diff --git a/common/lib/xmodule/xmodule/modulestore/split_mongo/split.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/split.py index def9409d02..9ea7125874 100644 --- a/common/lib/xmodule/xmodule/modulestore/split_mongo/split.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/split.py @@ -976,7 +976,6 @@ class SplitMongoModuleStore(SplitBulkWriteMixin, ModuleStoreWriteBase): return version_guids, id_version_map def _get_structures_for_branch_and_locator(self, branch, locator_factory, **kwargs): - """ Internal generator for fetching lists of courses, libraries, etc. :param str branch: Branch to fetch structures from diff --git a/common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py index 43af6d9698..c537bc0244 100644 --- a/common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py @@ -3,7 +3,6 @@ Module for the dual-branch fall-back Draft->Published Versioning ModuleStore """ - from contracts import contract from opaque_keys.edx.locator import CourseLocator, LibraryLocator, LibraryUsageLocator diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_cross_modulestore_import_export.py b/common/lib/xmodule/xmodule/modulestore/tests/test_cross_modulestore_import_export.py index 2e12300605..507ac30435 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_cross_modulestore_import_export.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_cross_modulestore_import_export.py @@ -13,7 +13,6 @@ and then for each combination of modulestores, performing the sequence: """ - import itertools import os from shutil import rmtree diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_libraries.py b/common/lib/xmodule/xmodule/modulestore/tests/test_libraries.py index 9eefa7796b..94bd27c92e 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_libraries.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_libraries.py @@ -6,7 +6,6 @@ Higher-level tests are in `cms/djangoapps/contentstore`. """ - import ddt import six from bson.objectid import ObjectId diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py index c5ed5104b5..a5c054b161 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py @@ -3,7 +3,6 @@ Unit tests for the Mongo modulestore """ - import logging import shutil from datetime import datetime diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo_call_count.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo_call_count.py index 0d505a237a..36d4962c43 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo_call_count.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo_call_count.py @@ -4,7 +4,6 @@ when using the Split modulestore. """ - from shutil import rmtree from tempfile import mkdtemp from unittest import TestCase, skip diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_semantics.py b/common/lib/xmodule/xmodule/modulestore/tests/test_semantics.py index 29a3c3c2db..98ed3263c1 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_semantics.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_semantics.py @@ -3,7 +3,6 @@ Tests of modulestore semantics: How do the interfaces methods of ModuleStore rel """ - import itertools from collections import namedtuple diff --git a/common/lib/xmodule/xmodule/modulestore/xml_exporter.py b/common/lib/xmodule/xmodule/modulestore/xml_exporter.py index d314a54b09..745c82fbc5 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml_exporter.py +++ b/common/lib/xmodule/xmodule/modulestore/xml_exporter.py @@ -3,7 +3,6 @@ Methods for exporting course data to XML """ - import logging import os from abc import abstractmethod diff --git a/common/lib/xmodule/xmodule/partitions/partitions.py b/common/lib/xmodule/xmodule/partitions/partitions.py index 8bd9461cf2..891f5a2082 100644 --- a/common/lib/xmodule/xmodule/partitions/partitions.py +++ b/common/lib/xmodule/xmodule/partitions/partitions.py @@ -1,7 +1,6 @@ """Defines ``Group`` and ``UserPartition`` models for partitioning""" - from collections import namedtuple from stevedore.extension import ExtensionManager diff --git a/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py b/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py index c9e8c37a61..235917cc30 100644 --- a/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py +++ b/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py @@ -4,7 +4,6 @@ Test the partitions and partitions service """ - from datetime import datetime import six diff --git a/common/lib/xmodule/xmodule/poll_module.py b/common/lib/xmodule/xmodule/poll_module.py index ddbb912f87..db96ccbb70 100644 --- a/common/lib/xmodule/xmodule/poll_module.py +++ b/common/lib/xmodule/xmodule/poll_module.py @@ -7,7 +7,6 @@ If student have answered - Question with statistics for each answers. """ - import cgi import json import logging diff --git a/common/lib/xmodule/xmodule/progress.py b/common/lib/xmodule/xmodule/progress.py index 09b29a85b8..e43e6df085 100644 --- a/common/lib/xmodule/xmodule/progress.py +++ b/common/lib/xmodule/xmodule/progress.py @@ -6,7 +6,6 @@ frac() and __str__(). ''' - import numbers diff --git a/common/lib/xmodule/xmodule/split_test_module.py b/common/lib/xmodule/xmodule/split_test_module.py index 90dc2cb359..b3c0102bb0 100644 --- a/common/lib/xmodule/xmodule/split_test_module.py +++ b/common/lib/xmodule/xmodule/split_test_module.py @@ -3,7 +3,6 @@ Module for running content split tests """ - import json import logging from functools import reduce diff --git a/common/lib/xmodule/xmodule/static_content.py b/common/lib/xmodule/xmodule/static_content.py index dc92a78f8d..85855f831c 100755 --- a/common/lib/xmodule/xmodule/static_content.py +++ b/common/lib/xmodule/xmodule/static_content.py @@ -5,7 +5,6 @@ that is defined by XModules and XModuleDescriptors (javascript and css) """ - import errno import hashlib import json diff --git a/common/lib/xmodule/xmodule/stringify.py b/common/lib/xmodule/xmodule/stringify.py index bc2ccb67dc..3393a1107e 100644 --- a/common/lib/xmodule/xmodule/stringify.py +++ b/common/lib/xmodule/xmodule/stringify.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- - from lxml import etree diff --git a/common/lib/xmodule/xmodule/tests/__init__.py b/common/lib/xmodule/xmodule/tests/__init__.py index ba8f1f81cd..0a5fbf5585 100644 --- a/common/lib/xmodule/xmodule/tests/__init__.py +++ b/common/lib/xmodule/xmodule/tests/__init__.py @@ -8,7 +8,6 @@ Run like this: """ - import inspect import json import os diff --git a/common/lib/xmodule/xmodule/tests/helpers.py b/common/lib/xmodule/xmodule/tests/helpers.py index 9154c071e0..21ec72ec0c 100644 --- a/common/lib/xmodule/xmodule/tests/helpers.py +++ b/common/lib/xmodule/xmodule/tests/helpers.py @@ -3,7 +3,6 @@ Utility methods for unit tests. """ - import filecmp from path import Path as path diff --git a/common/lib/xmodule/xmodule/tests/test_annotatable_module.py b/common/lib/xmodule/xmodule/tests/test_annotatable_module.py index 5f54657214..05c6b51aba 100644 --- a/common/lib/xmodule/xmodule/tests/test_annotatable_module.py +++ b/common/lib/xmodule/xmodule/tests/test_annotatable_module.py @@ -1,7 +1,6 @@ """Module annotatable tests""" - import unittest from lxml import etree diff --git a/common/lib/xmodule/xmodule/tests/test_annotator_mixin.py b/common/lib/xmodule/xmodule/tests/test_annotator_mixin.py index 43c3ad9fda..b4903b0863 100644 --- a/common/lib/xmodule/xmodule/tests/test_annotator_mixin.py +++ b/common/lib/xmodule/xmodule/tests/test_annotator_mixin.py @@ -3,7 +3,6 @@ This test will run for annotator_mixin.py """ - import unittest from lxml import etree diff --git a/common/lib/xmodule/xmodule/tests/test_capa_module.py b/common/lib/xmodule/xmodule/tests/test_capa_module.py index 26256ada10..cf77564804 100644 --- a/common/lib/xmodule/xmodule/tests/test_capa_module.py +++ b/common/lib/xmodule/xmodule/tests/test_capa_module.py @@ -6,7 +6,6 @@ Tests of the Capa XModule # pylint: disable=invalid-name - import datetime import json import os diff --git a/common/lib/xmodule/xmodule/tests/test_conditional_logic.py b/common/lib/xmodule/xmodule/tests/test_conditional_logic.py index 5c483ed784..0f0eb20daa 100644 --- a/common/lib/xmodule/xmodule/tests/test_conditional_logic.py +++ b/common/lib/xmodule/xmodule/tests/test_conditional_logic.py @@ -2,7 +2,6 @@ """Test for Conditional Xmodule functional logic.""" - from xmodule.conditional_module import ConditionalDescriptor from . import LogicTest diff --git a/common/lib/xmodule/xmodule/tests/test_content.py b/common/lib/xmodule/xmodule/tests/test_content.py index 61dee870ad..64293b4419 100644 --- a/common/lib/xmodule/xmodule/tests/test_content.py +++ b/common/lib/xmodule/xmodule/tests/test_content.py @@ -1,7 +1,6 @@ """Tests for contents""" - import os import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_delay_between_attempts.py b/common/lib/xmodule/xmodule/tests/test_delay_between_attempts.py index 3e52f81525..0e93d6f146 100644 --- a/common/lib/xmodule/xmodule/tests/test_delay_between_attempts.py +++ b/common/lib/xmodule/xmodule/tests/test_delay_between_attempts.py @@ -8,7 +8,6 @@ submissions" setting is set to different values """ - import datetime import textwrap import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_fields.py b/common/lib/xmodule/xmodule/tests/test_fields.py index 3b73474c5a..e075c198dd 100644 --- a/common/lib/xmodule/xmodule/tests/test_fields.py +++ b/common/lib/xmodule/xmodule/tests/test_fields.py @@ -1,7 +1,6 @@ """Tests for classes defined in fields.py.""" - import datetime import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_graders.py b/common/lib/xmodule/xmodule/tests/test_graders.py index efe6e19640..578ca4fd0e 100644 --- a/common/lib/xmodule/xmodule/tests/test_graders.py +++ b/common/lib/xmodule/xmodule/tests/test_graders.py @@ -3,7 +3,6 @@ Grading tests """ - import unittest from datetime import datetime, timedelta diff --git a/common/lib/xmodule/xmodule/tests/test_import.py b/common/lib/xmodule/xmodule/tests/test_import.py index e15c00b6bd..6c9de48781 100644 --- a/common/lib/xmodule/xmodule/tests/test_import.py +++ b/common/lib/xmodule/xmodule/tests/test_import.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- - import datetime from tempfile import mkdtemp diff --git a/common/lib/xmodule/xmodule/tests/test_lti_unit.py b/common/lib/xmodule/xmodule/tests/test_lti_unit.py index 6ebd26f688..5a861ea25b 100644 --- a/common/lib/xmodule/xmodule/tests/test_lti_unit.py +++ b/common/lib/xmodule/xmodule/tests/test_lti_unit.py @@ -2,7 +2,6 @@ """Test for LTI Xmodule functional logic.""" - import datetime import textwrap from copy import copy diff --git a/common/lib/xmodule/xmodule/tests/test_mako_module.py b/common/lib/xmodule/xmodule/tests/test_mako_module.py index ef93e7aa6a..4cd77bb624 100644 --- a/common/lib/xmodule/xmodule/tests/test_mako_module.py +++ b/common/lib/xmodule/xmodule/tests/test_mako_module.py @@ -1,7 +1,6 @@ """ Test mako_module.py """ - from unittest import TestCase from mock import Mock diff --git a/common/lib/xmodule/xmodule/tests/test_progress.py b/common/lib/xmodule/xmodule/tests/test_progress.py index 64ba9bcbf1..2a06b87a33 100644 --- a/common/lib/xmodule/xmodule/tests/test_progress.py +++ b/common/lib/xmodule/xmodule/tests/test_progress.py @@ -1,7 +1,6 @@ """Module progress tests""" - import unittest from mock import Mock diff --git a/common/lib/xmodule/xmodule/tests/test_services.py b/common/lib/xmodule/xmodule/tests/test_services.py index 728d053beb..e7ab75c5c1 100644 --- a/common/lib/xmodule/xmodule/tests/test_services.py +++ b/common/lib/xmodule/xmodule/tests/test_services.py @@ -3,7 +3,6 @@ Tests for SettingsService """ - import unittest from django.test import TestCase diff --git a/common/lib/xmodule/xmodule/tests/test_studio_editable.py b/common/lib/xmodule/xmodule/tests/test_studio_editable.py index b2a7d301e5..467c99f5fb 100644 --- a/common/lib/xmodule/xmodule/tests/test_studio_editable.py +++ b/common/lib/xmodule/xmodule/tests/test_studio_editable.py @@ -3,7 +3,6 @@ Tests for StudioEditableModule. """ - from xmodule.tests.test_vertical import BaseVerticalBlockTest from xmodule.x_module import AUTHOR_VIEW diff --git a/common/lib/xmodule/xmodule/tests/test_validation.py b/common/lib/xmodule/xmodule/tests/test_validation.py index eb0f716f64..90e8faaadd 100644 --- a/common/lib/xmodule/xmodule/tests/test_validation.py +++ b/common/lib/xmodule/xmodule/tests/test_validation.py @@ -3,7 +3,6 @@ Test xblock/validation.py """ - import unittest import pytest diff --git a/common/lib/xmodule/xmodule/tests/test_word_cloud.py b/common/lib/xmodule/xmodule/tests/test_word_cloud.py index ee25dd0d4c..527699c348 100644 --- a/common/lib/xmodule/xmodule/tests/test_word_cloud.py +++ b/common/lib/xmodule/xmodule/tests/test_word_cloud.py @@ -2,7 +2,6 @@ """Test for Word cloud Xmodule functional logic.""" - from webob.multidict import MultiDict from xmodule.word_cloud_module import WordCloudDescriptor diff --git a/common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py b/common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py index 6039848e08..eab1dc969c 100644 --- a/common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py +++ b/common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py @@ -7,7 +7,6 @@ functionality # pylint: disable=protected-access - from unittest.case import SkipTest, TestCase import ddt diff --git a/common/lib/xmodule/xmodule/tests/test_xml_module.py b/common/lib/xmodule/xmodule/tests/test_xml_module.py index 1f9ba9cd7d..874d0367f0 100644 --- a/common/lib/xmodule/xmodule/tests/test_xml_module.py +++ b/common/lib/xmodule/xmodule/tests/test_xml_module.py @@ -2,7 +2,6 @@ # pylint: disable=missing-docstring - import unittest from mock import Mock diff --git a/common/lib/xmodule/xmodule/tests/xml/factories.py b/common/lib/xmodule/xmodule/tests/xml/factories.py index 67b71d7905..83816e1c99 100644 --- a/common/lib/xmodule/xmodule/tests/xml/factories.py +++ b/common/lib/xmodule/xmodule/tests/xml/factories.py @@ -3,7 +3,6 @@ Factories for generating edXML for testing XModule import """ - import inspect from tempfile import mkdtemp diff --git a/common/lib/xmodule/xmodule/tests/xml/test_policy.py b/common/lib/xmodule/xmodule/tests/xml/test_policy.py index eef42f3243..66f640e5d0 100644 --- a/common/lib/xmodule/xmodule/tests/xml/test_policy.py +++ b/common/lib/xmodule/xmodule/tests/xml/test_policy.py @@ -3,7 +3,6 @@ Tests that policy json files import correctly when loading XML """ - import pytest from xmodule.tests.xml import XModuleXmlImportTest diff --git a/common/lib/xmodule/xmodule/util/xmodule_django.py b/common/lib/xmodule/xmodule/util/xmodule_django.py index d7b3763dfb..e09ea3a6e9 100644 --- a/common/lib/xmodule/xmodule/util/xmodule_django.py +++ b/common/lib/xmodule/xmodule/util/xmodule_django.py @@ -5,7 +5,6 @@ runtime environment with the djangoapps in common configured to load """ - import webpack_loader # NOTE: we are importing this method so that any module that imports us has access to get_current_request from crum import get_current_request diff --git a/common/lib/xmodule/xmodule/vertical_block.py b/common/lib/xmodule/xmodule/vertical_block.py index b26cddd73a..81dabedded 100644 --- a/common/lib/xmodule/xmodule/vertical_block.py +++ b/common/lib/xmodule/xmodule/vertical_block.py @@ -3,7 +3,6 @@ VerticalBlock - an XBlock which renders its children in a column. """ - import logging from copy import copy from functools import reduce diff --git a/common/lib/xmodule/xmodule/video_module/video_handlers.py b/common/lib/xmodule/xmodule/video_module/video_handlers.py index 61497eb598..8056305f3f 100644 --- a/common/lib/xmodule/xmodule/video_module/video_handlers.py +++ b/common/lib/xmodule/xmodule/video_module/video_handlers.py @@ -6,7 +6,6 @@ StudioViewHandlers are handlers for video descriptor instance. """ - import json import logging diff --git a/common/lib/xmodule/xmodule/video_module/video_utils.py b/common/lib/xmodule/xmodule/video_module/video_utils.py index 9e8e47da7f..d05464ea68 100644 --- a/common/lib/xmodule/xmodule/video_module/video_utils.py +++ b/common/lib/xmodule/xmodule/video_module/video_utils.py @@ -4,7 +4,6 @@ Module contains utils specific for video_module but not for transcripts. """ - import logging from collections import OrderedDict diff --git a/common/lib/xmodule/xmodule/word_cloud_module.py b/common/lib/xmodule/xmodule/word_cloud_module.py index ec194371b7..920232e608 100644 --- a/common/lib/xmodule/xmodule/word_cloud_module.py +++ b/common/lib/xmodule/xmodule/word_cloud_module.py @@ -7,7 +7,6 @@ If student have answered - words he entered and cloud. """ - import json import logging diff --git a/common/lib/xmodule/xmodule/wrapper_module.py b/common/lib/xmodule/xmodule/wrapper_module.py index d235c7bc9d..6e35e1ba4e 100644 --- a/common/lib/xmodule/xmodule/wrapper_module.py +++ b/common/lib/xmodule/xmodule/wrapper_module.py @@ -2,7 +2,6 @@ # But w/o css delimiters between children - from xmodule.vertical_block import VerticalBlock # HACK: This shouldn't be hard-coded to two types diff --git a/common/test/acceptance/fixtures/certificates.py b/common/test/acceptance/fixtures/certificates.py index 174581c303..b8e613a766 100644 --- a/common/test/acceptance/fixtures/certificates.py +++ b/common/test/acceptance/fixtures/certificates.py @@ -3,7 +3,6 @@ Tools for creating certificates config fixture data. """ - import json from common.test.acceptance.fixtures import STUDIO_BASE_URL diff --git a/common/test/acceptance/fixtures/course.py b/common/test/acceptance/fixtures/course.py index 822ec2b742..5bc2ef728d 100644 --- a/common/test/acceptance/fixtures/course.py +++ b/common/test/acceptance/fixtures/course.py @@ -3,7 +3,6 @@ Fixture to create a course and course components (XBlocks). """ - import datetime import json import mimetypes diff --git a/common/test/acceptance/fixtures/discussion.py b/common/test/acceptance/fixtures/discussion.py index ad03133b2a..3e507c0bec 100644 --- a/common/test/acceptance/fixtures/discussion.py +++ b/common/test/acceptance/fixtures/discussion.py @@ -3,7 +3,6 @@ Tools for creating discussion content fixture data. """ - import json from datetime import datetime diff --git a/common/test/acceptance/fixtures/edxnotes.py b/common/test/acceptance/fixtures/edxnotes.py index c5d81bf9ad..1aae711ed6 100644 --- a/common/test/acceptance/fixtures/edxnotes.py +++ b/common/test/acceptance/fixtures/edxnotes.py @@ -3,7 +3,6 @@ Tools for creating edxnotes content fixture data. """ - import json import factory diff --git a/common/test/acceptance/fixtures/library.py b/common/test/acceptance/fixtures/library.py index 850bb88719..a00f972ef5 100644 --- a/common/test/acceptance/fixtures/library.py +++ b/common/test/acceptance/fixtures/library.py @@ -3,7 +3,6 @@ Fixture to create a Content Library """ - import six from opaque_keys.edx.keys import CourseKey diff --git a/common/test/acceptance/fixtures/xqueue.py b/common/test/acceptance/fixtures/xqueue.py index a46e42ba2c..930fb1f93c 100644 --- a/common/test/acceptance/fixtures/xqueue.py +++ b/common/test/acceptance/fixtures/xqueue.py @@ -3,7 +3,6 @@ Fixture to configure XQueue response. """ - import json import requests diff --git a/common/test/acceptance/pages/common/paging.py b/common/test/acceptance/pages/common/paging.py index ec8bfc2cb4..40bac9cea6 100644 --- a/common/test/acceptance/pages/common/paging.py +++ b/common/test/acceptance/pages/common/paging.py @@ -3,8 +3,6 @@ Common mixin for paginated UIs. """ - - import six from selenium.webdriver.common.keys import Keys diff --git a/common/test/acceptance/pages/lms/bookmarks.py b/common/test/acceptance/pages/lms/bookmarks.py index bfa2ae04a3..d57872c49b 100644 --- a/common/test/acceptance/pages/lms/bookmarks.py +++ b/common/test/acceptance/pages/lms/bookmarks.py @@ -3,7 +3,6 @@ Courseware Boomarks """ - from common.test.acceptance.pages.common.paging import PaginatedUIMixin from common.test.acceptance.pages.lms.course_page import CoursePage diff --git a/common/test/acceptance/pages/lms/certificate_page.py b/common/test/acceptance/pages/lms/certificate_page.py index 2a6f89420d..831f0e80d9 100644 --- a/common/test/acceptance/pages/lms/certificate_page.py +++ b/common/test/acceptance/pages/lms/certificate_page.py @@ -4,7 +4,6 @@ Module for Certificates pages. """ - from bok_choy.page_object import PageObject from common.test.acceptance.pages.lms import BASE_URL diff --git a/common/test/acceptance/pages/lms/course_about.py b/common/test/acceptance/pages/lms/course_about.py index b4c5e6f2f2..b738a259f0 100644 --- a/common/test/acceptance/pages/lms/course_about.py +++ b/common/test/acceptance/pages/lms/course_about.py @@ -3,7 +3,6 @@ Course about page (with registration button) """ - from common.test.acceptance.pages.lms.course_page import CoursePage from common.test.acceptance.pages.lms.login_and_register import RegisterPage diff --git a/common/test/acceptance/pages/lms/course_home.py b/common/test/acceptance/pages/lms/course_home.py index b77ae2ff68..beac645250 100644 --- a/common/test/acceptance/pages/lms/course_home.py +++ b/common/test/acceptance/pages/lms/course_home.py @@ -3,7 +3,6 @@ LMS Course Home page object """ - from collections import OrderedDict from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/lms/course_info.py b/common/test/acceptance/pages/lms/course_info.py index e1caeafefa..fa56ef6c3c 100644 --- a/common/test/acceptance/pages/lms/course_info.py +++ b/common/test/acceptance/pages/lms/course_info.py @@ -3,7 +3,6 @@ Course info page. """ - from common.test.acceptance.pages.lms.course_page import CoursePage diff --git a/common/test/acceptance/pages/lms/course_page.py b/common/test/acceptance/pages/lms/course_page.py index 10b6298aab..737ed78b16 100644 --- a/common/test/acceptance/pages/lms/course_page.py +++ b/common/test/acceptance/pages/lms/course_page.py @@ -3,7 +3,6 @@ Base class for pages in courseware. """ - from bok_choy.page_object import PageObject from common.test.acceptance.pages.lms import BASE_URL diff --git a/common/test/acceptance/pages/lms/course_wiki.py b/common/test/acceptance/pages/lms/course_wiki.py index 3bbf5d4de5..f15a67bc85 100644 --- a/common/test/acceptance/pages/lms/course_wiki.py +++ b/common/test/acceptance/pages/lms/course_wiki.py @@ -3,7 +3,6 @@ Wiki tab on courses """ - from common.test.acceptance.pages.lms.course_page import CoursePage from common.test.acceptance.pages.studio.utils import get_codemirror_value, type_in_codemirror diff --git a/common/test/acceptance/pages/lms/courseware.py b/common/test/acceptance/pages/lms/courseware.py index 4898605e17..a7f848621f 100644 --- a/common/test/acceptance/pages/lms/courseware.py +++ b/common/test/acceptance/pages/lms/courseware.py @@ -3,7 +3,6 @@ Courseware page. """ - import re from bok_choy.page_object import PageObject, unguarded diff --git a/common/test/acceptance/pages/lms/courseware_search.py b/common/test/acceptance/pages/lms/courseware_search.py index d18d60d8d1..9db8e016c4 100644 --- a/common/test/acceptance/pages/lms/courseware_search.py +++ b/common/test/acceptance/pages/lms/courseware_search.py @@ -3,7 +3,6 @@ Courseware search """ - from common.test.acceptance.pages.lms.course_page import CoursePage diff --git a/common/test/acceptance/pages/lms/create_mode.py b/common/test/acceptance/pages/lms/create_mode.py index 1b7426a774..3ec62d06d4 100644 --- a/common/test/acceptance/pages/lms/create_mode.py +++ b/common/test/acceptance/pages/lms/create_mode.py @@ -1,7 +1,6 @@ """Mode creation page (used to add modes to courses during testing).""" - import re from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/lms/dashboard_search.py b/common/test/acceptance/pages/lms/dashboard_search.py index 37b80143b4..d3590c9896 100644 --- a/common/test/acceptance/pages/lms/dashboard_search.py +++ b/common/test/acceptance/pages/lms/dashboard_search.py @@ -3,7 +3,6 @@ Dashboard search """ - from bok_choy.page_object import PageObject from common.test.acceptance.pages.lms import BASE_URL diff --git a/common/test/acceptance/pages/lms/discovery.py b/common/test/acceptance/pages/lms/discovery.py index 39f69d4d07..ad9c1eaeb7 100644 --- a/common/test/acceptance/pages/lms/discovery.py +++ b/common/test/acceptance/pages/lms/discovery.py @@ -3,7 +3,6 @@ Course discovery page. """ - from bok_choy.page_object import PageObject from common.test.acceptance.pages.lms import BASE_URL diff --git a/common/test/acceptance/pages/lms/find_courses.py b/common/test/acceptance/pages/lms/find_courses.py index db41b11360..1edb8c4e5e 100644 --- a/common/test/acceptance/pages/lms/find_courses.py +++ b/common/test/acceptance/pages/lms/find_courses.py @@ -3,7 +3,6 @@ Find courses page (main page of the LMS). """ - from bok_choy.page_object import PageObject from common.test.acceptance.pages.lms import BASE_URL diff --git a/common/test/acceptance/pages/lms/instructor_dashboard.py b/common/test/acceptance/pages/lms/instructor_dashboard.py index f226e92c80..7d71ea0fc2 100644 --- a/common/test/acceptance/pages/lms/instructor_dashboard.py +++ b/common/test/acceptance/pages/lms/instructor_dashboard.py @@ -4,7 +4,6 @@ Instructor (2) dashboard page. """ - import os import os.path diff --git a/common/test/acceptance/pages/lms/login.py b/common/test/acceptance/pages/lms/login.py index bba6e3d957..7d8dcc7dbb 100644 --- a/common/test/acceptance/pages/lms/login.py +++ b/common/test/acceptance/pages/lms/login.py @@ -3,7 +3,6 @@ Login page for the LMS. """ - from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise diff --git a/common/test/acceptance/pages/lms/login_and_register.py b/common/test/acceptance/pages/lms/login_and_register.py index 4b630af718..d4298507a2 100644 --- a/common/test/acceptance/pages/lms/login_and_register.py +++ b/common/test/acceptance/pages/lms/login_and_register.py @@ -1,7 +1,6 @@ """Login and Registration pages """ - from bok_choy.page_object import PageObject, unguarded from bok_choy.promise import EmptyPromise, Promise from six.moves.urllib.parse import urlencode # pylint: disable=import-error diff --git a/common/test/acceptance/pages/lms/pay_and_verify.py b/common/test/acceptance/pages/lms/pay_and_verify.py index a5be598688..5dea559840 100644 --- a/common/test/acceptance/pages/lms/pay_and_verify.py +++ b/common/test/acceptance/pages/lms/pay_and_verify.py @@ -1,7 +1,6 @@ """Payment and verification pages""" - import re from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/lms/peer_calibrate.py b/common/test/acceptance/pages/lms/peer_calibrate.py index 80a983a184..7d5bd7b1c1 100644 --- a/common/test/acceptance/pages/lms/peer_calibrate.py +++ b/common/test/acceptance/pages/lms/peer_calibrate.py @@ -4,7 +4,6 @@ Page that allows the student to grade calibration essays """ - from bok_choy.page_object import PageObject from bok_choy.promise import Promise diff --git a/common/test/acceptance/pages/lms/peer_confirm.py b/common/test/acceptance/pages/lms/peer_confirm.py index 7a0a1e4ec7..e055efadd2 100644 --- a/common/test/acceptance/pages/lms/peer_confirm.py +++ b/common/test/acceptance/pages/lms/peer_confirm.py @@ -3,7 +3,6 @@ Confirmation screen for peer calibration and grading. """ - from bok_choy.page_object import PageObject from bok_choy.promise import Promise diff --git a/common/test/acceptance/pages/lms/peer_grade.py b/common/test/acceptance/pages/lms/peer_grade.py index e39ee1e97b..b1824d8459 100644 --- a/common/test/acceptance/pages/lms/peer_grade.py +++ b/common/test/acceptance/pages/lms/peer_grade.py @@ -3,7 +3,6 @@ Students grade peer submissions. """ - from bok_choy.page_object import PageObject from bok_choy.promise import Promise diff --git a/common/test/acceptance/pages/lms/tab_nav.py b/common/test/acceptance/pages/lms/tab_nav.py index d3aa1becd4..99dadcb826 100644 --- a/common/test/acceptance/pages/lms/tab_nav.py +++ b/common/test/acceptance/pages/lms/tab_nav.py @@ -3,7 +3,6 @@ High-level tab navigation. """ - from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise, Promise diff --git a/common/test/acceptance/pages/lms/teams.py b/common/test/acceptance/pages/lms/teams.py index cb7816eba0..195cde1001 100644 --- a/common/test/acceptance/pages/lms/teams.py +++ b/common/test/acceptance/pages/lms/teams.py @@ -4,7 +4,6 @@ Teams pages. """ - from common.test.acceptance.pages.common.paging import PaginatedUIMixin from common.test.acceptance.pages.common.utils import click_css, confirm_prompt from common.test.acceptance.pages.lms.course_page import CoursePage diff --git a/common/test/acceptance/pages/lms/textbook_view.py b/common/test/acceptance/pages/lms/textbook_view.py index b7c31398a7..3620e31582 100644 --- a/common/test/acceptance/pages/lms/textbook_view.py +++ b/common/test/acceptance/pages/lms/textbook_view.py @@ -3,7 +3,6 @@ Course Textbooks page. """ - from bok_choy.promise import EmptyPromise from common.test.acceptance.pages.lms.course_page import CoursePage diff --git a/common/test/acceptance/pages/lms/video/video.py b/common/test/acceptance/pages/lms/video/video.py index bb9b6cc16b..4806b72c05 100644 --- a/common/test/acceptance/pages/lms/video/video.py +++ b/common/test/acceptance/pages/lms/video/video.py @@ -3,7 +3,6 @@ Video player in the courseware. """ - import json import logging import time diff --git a/common/test/acceptance/pages/studio/asset_index.py b/common/test/acceptance/pages/studio/asset_index.py index d33f7bb3cc..fa05f072cd 100644 --- a/common/test/acceptance/pages/studio/asset_index.py +++ b/common/test/acceptance/pages/studio/asset_index.py @@ -3,7 +3,6 @@ The Files and Uploads page for a course in Studio """ - import os import six diff --git a/common/test/acceptance/pages/studio/checklists.py b/common/test/acceptance/pages/studio/checklists.py index 7292384b80..bffa967a9f 100644 --- a/common/test/acceptance/pages/studio/checklists.py +++ b/common/test/acceptance/pages/studio/checklists.py @@ -3,7 +3,6 @@ Course Checklists page. """ - from common.test.acceptance.pages.studio.course_page import CoursePage diff --git a/common/test/acceptance/pages/studio/container.py b/common/test/acceptance/pages/studio/container.py index 0eb81f63cf..a0822788bd 100644 --- a/common/test/acceptance/pages/studio/container.py +++ b/common/test/acceptance/pages/studio/container.py @@ -3,7 +3,6 @@ Container page in Studio """ - from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise, Promise diff --git a/common/test/acceptance/pages/studio/course_rerun.py b/common/test/acceptance/pages/studio/course_rerun.py index 70d82fcea6..a3b7b541f8 100644 --- a/common/test/acceptance/pages/studio/course_rerun.py +++ b/common/test/acceptance/pages/studio/course_rerun.py @@ -3,7 +3,6 @@ Course rerun page in Studio """ - from common.test.acceptance.pages.studio.course_page import CoursePage from common.test.acceptance.pages.studio.utils import set_input_value diff --git a/common/test/acceptance/pages/studio/edit_subsection.py b/common/test/acceptance/pages/studio/edit_subsection.py index 507a3e17a2..2d4415e16c 100644 --- a/common/test/acceptance/pages/studio/edit_subsection.py +++ b/common/test/acceptance/pages/studio/edit_subsection.py @@ -3,7 +3,6 @@ Edit Subsection page in Studio """ - from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/studio/settings_advanced.py b/common/test/acceptance/pages/studio/settings_advanced.py index 33cb27c9d3..0227729522 100644 --- a/common/test/acceptance/pages/studio/settings_advanced.py +++ b/common/test/acceptance/pages/studio/settings_advanced.py @@ -3,7 +3,6 @@ Course Advanced Settings page """ - import six from bok_choy.promise import EmptyPromise diff --git a/common/test/acceptance/pages/studio/textbook_upload.py b/common/test/acceptance/pages/studio/textbook_upload.py index 99525c6218..56c29464d1 100644 --- a/common/test/acceptance/pages/studio/textbook_upload.py +++ b/common/test/acceptance/pages/studio/textbook_upload.py @@ -3,7 +3,6 @@ Course Textbooks page. """ - import requests from path import Path as path diff --git a/common/test/acceptance/pages/xblock/acid.py b/common/test/acceptance/pages/xblock/acid.py index a8efc6c241..31730fcdfc 100644 --- a/common/test/acceptance/pages/xblock/acid.py +++ b/common/test/acceptance/pages/xblock/acid.py @@ -3,7 +3,6 @@ PageObjects related to the AcidBlock """ - from bok_choy.page_object import PageObject from bok_choy.promise import BrokenPromise, EmptyPromise diff --git a/common/test/acceptance/setup.py b/common/test/acceptance/setup.py index f59be95882..711a9f9d35 100644 --- a/common/test/acceptance/setup.py +++ b/common/test/acceptance/setup.py @@ -5,7 +5,6 @@ Install bok-choy page objects for acceptance and end-to-end tests. """ - import os from setuptools import setup diff --git a/common/test/acceptance/tests/discussion/helpers.py b/common/test/acceptance/tests/discussion/helpers.py index 1319ec4af4..9557af6ed0 100644 --- a/common/test/acceptance/tests/discussion/helpers.py +++ b/common/test/acceptance/tests/discussion/helpers.py @@ -3,7 +3,6 @@ Helper functions and classes for discussion tests. """ - import json from uuid import uuid4 diff --git a/common/test/acceptance/tests/discussion/test_cohort_management.py b/common/test/acceptance/tests/discussion/test_cohort_management.py index 1e71fe1c9d..7beabb9d2a 100644 --- a/common/test/acceptance/tests/discussion/test_cohort_management.py +++ b/common/test/acceptance/tests/discussion/test_cohort_management.py @@ -4,7 +4,6 @@ End-to-end tests related to the cohort management on the LMS Instructor Dashboar """ - import os import os.path import uuid @@ -249,7 +248,6 @@ class CohortConfigurationTest(EventsTestMixin, UniqueCourseTest, CohortTestMixin new_assignment_type=None, verify_updated=False ): - """ Create a new cohort and verify the new and existing settings. """ diff --git a/common/test/acceptance/tests/discussion/test_discussion.py b/common/test/acceptance/tests/discussion/test_discussion.py index f1239b2353..0be1f78ff4 100644 --- a/common/test/acceptance/tests/discussion/test_discussion.py +++ b/common/test/acceptance/tests/discussion/test_discussion.py @@ -3,7 +3,6 @@ Tests for discussion pages """ - import datetime import time from unittest import skip diff --git a/common/test/acceptance/tests/discussion/test_discussion_management.py b/common/test/acceptance/tests/discussion/test_discussion_management.py index de4991bb30..0481872607 100644 --- a/common/test/acceptance/tests/discussion/test_discussion_management.py +++ b/common/test/acceptance/tests/discussion/test_discussion_management.py @@ -4,7 +4,6 @@ End-to-end tests related to the divided discussion management on the LMS Instruc """ - import uuid from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc diff --git a/common/test/acceptance/tests/helpers.py b/common/test/acceptance/tests/helpers.py index 522c032098..4cfabe913c 100644 --- a/common/test/acceptance/tests/helpers.py +++ b/common/test/acceptance/tests/helpers.py @@ -3,7 +3,6 @@ Test helper functions and base classes. """ - import functools import inspect import io diff --git a/common/test/acceptance/tests/lms/test_conditional.py b/common/test/acceptance/tests/lms/test_conditional.py index 6bd11c71d7..0fc4309ada 100644 --- a/common/test/acceptance/tests/lms/test_conditional.py +++ b/common/test/acceptance/tests/lms/test_conditional.py @@ -3,7 +3,6 @@ Bok choy acceptance tests for conditionals in the LMS """ - from capa.tests.response_xml_factory import StringResponseXMLFactory from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc from common.test.acceptance.pages.common.auto_auth import AutoAuthPage diff --git a/common/test/acceptance/tests/lms/test_lms_acid_xblock.py b/common/test/acceptance/tests/lms/test_lms_acid_xblock.py index 157d4f048e..8c70d71ae1 100644 --- a/common/test/acceptance/tests/lms/test_lms_acid_xblock.py +++ b/common/test/acceptance/tests/lms/test_lms_acid_xblock.py @@ -4,7 +4,6 @@ End-to-end tests for the LMS. """ - import pytest from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc diff --git a/common/test/acceptance/tests/lms/test_lms_cohorted_courseware_search.py b/common/test/acceptance/tests/lms/test_lms_cohorted_courseware_search.py index 6338787ddc..58b9786f1d 100644 --- a/common/test/acceptance/tests/lms/test_lms_cohorted_courseware_search.py +++ b/common/test/acceptance/tests/lms/test_lms_cohorted_courseware_search.py @@ -3,7 +3,6 @@ Test courseware search """ - import json import uuid diff --git a/common/test/acceptance/tests/lms/test_lms_course_home.py b/common/test/acceptance/tests/lms/test_lms_course_home.py index e6f719d2f2..03f5c34dc4 100644 --- a/common/test/acceptance/tests/lms/test_lms_course_home.py +++ b/common/test/acceptance/tests/lms/test_lms_course_home.py @@ -4,7 +4,6 @@ End-to-end tests for the LMS that utilize the course home page and course outlin """ - from datetime import datetime, timedelta import six diff --git a/common/test/acceptance/tests/lms/test_lms_courseware.py b/common/test/acceptance/tests/lms/test_lms_courseware.py index 8c46a3baef..73ea799a20 100644 --- a/common/test/acceptance/tests/lms/test_lms_courseware.py +++ b/common/test/acceptance/tests/lms/test_lms_courseware.py @@ -4,7 +4,6 @@ End-to-end tests for the LMS. """ - import json from datetime import datetime, timedelta diff --git a/common/test/acceptance/tests/lms/test_lms_help.py b/common/test/acceptance/tests/lms/test_lms_help.py index eba97b236c..93f68f4029 100644 --- a/common/test/acceptance/tests/lms/test_lms_help.py +++ b/common/test/acceptance/tests/lms/test_lms_help.py @@ -3,7 +3,6 @@ Test Help links in LMS """ - from common.test.acceptance.fixtures.course import CourseFixture from common.test.acceptance.pages.lms.instructor_dashboard import InstructorDashboardPage from common.test.acceptance.tests.discussion.helpers import CohortTestMixin diff --git a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py index a02a26e830..89490c3308 100644 --- a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py +++ b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py @@ -4,7 +4,6 @@ End-to-end tests for the LMS Instructor Dashboard. """ - import ddt from bok_choy.promise import EmptyPromise from six.moves import range diff --git a/common/test/acceptance/tests/lms/test_lms_split_test_courseware_search.py b/common/test/acceptance/tests/lms/test_lms_split_test_courseware_search.py index 014f7cea9d..05c629cd44 100644 --- a/common/test/acceptance/tests/lms/test_lms_split_test_courseware_search.py +++ b/common/test/acceptance/tests/lms/test_lms_split_test_courseware_search.py @@ -3,7 +3,6 @@ Test courseware search """ - import json from common.test.acceptance.fixtures.course import XBlockFixtureDesc diff --git a/common/test/acceptance/tests/lms/test_lms_user_preview.py b/common/test/acceptance/tests/lms/test_lms_user_preview.py index 95b020db46..4366caba25 100644 --- a/common/test/acceptance/tests/lms/test_lms_user_preview.py +++ b/common/test/acceptance/tests/lms/test_lms_user_preview.py @@ -4,7 +4,6 @@ Tests the "preview" selector in the LMS that allows changing between Staff, Lear """ - from textwrap import dedent from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc diff --git a/common/test/acceptance/tests/lms/test_oauth2.py b/common/test/acceptance/tests/lms/test_oauth2.py index 9d19a3b89f..edab5534ad 100644 --- a/common/test/acceptance/tests/lms/test_oauth2.py +++ b/common/test/acceptance/tests/lms/test_oauth2.py @@ -2,7 +2,6 @@ """Tests for OAuth2 permission delegation.""" - from six.moves.urllib.parse import parse_qsl, urlparse # pylint: disable=import-error from common.test.acceptance.pages.common.auto_auth import AutoAuthPage diff --git a/common/test/acceptance/tests/lms/test_unicode_username_admin.py b/common/test/acceptance/tests/lms/test_unicode_username_admin.py index cbe9a52cdb..6fccfa0f56 100644 --- a/common/test/acceptance/tests/lms/test_unicode_username_admin.py +++ b/common/test/acceptance/tests/lms/test_unicode_username_admin.py @@ -4,7 +4,6 @@ End-to-end tests for admin change view. """ - from common.test.acceptance.pages.common.auto_auth import AutoAuthPage from common.test.acceptance.pages.lms.admin import ChangeUserAdminPage from common.test.acceptance.tests.helpers import AcceptanceTest diff --git a/common/test/acceptance/tests/studio/test_studio_help.py b/common/test/acceptance/tests/studio/test_studio_help.py index 7f66f7753e..bfef085b43 100644 --- a/common/test/acceptance/tests/studio/test_studio_help.py +++ b/common/test/acceptance/tests/studio/test_studio_help.py @@ -4,7 +4,6 @@ Test the Studio help links. """ - from unittest import skip from six.moves import zip diff --git a/common/test/acceptance/tests/studio/test_studio_rerun.py b/common/test/acceptance/tests/studio/test_studio_rerun.py index 5f7b9bc357..18ab264ce9 100644 --- a/common/test/acceptance/tests/studio/test_studio_rerun.py +++ b/common/test/acceptance/tests/studio/test_studio_rerun.py @@ -3,7 +3,6 @@ Acceptance tests for Studio related to course reruns. """ - import random from bok_choy.promise import EmptyPromise diff --git a/common/test/acceptance/tests/studio/test_studio_split_test.py b/common/test/acceptance/tests/studio/test_studio_split_test.py index ddfa070bb8..e905910c31 100644 --- a/common/test/acceptance/tests/studio/test_studio_split_test.py +++ b/common/test/acceptance/tests/studio/test_studio_split_test.py @@ -3,7 +3,6 @@ Acceptance tests for Studio related to the split_test module. """ - import math from bok_choy.promise import Promise diff --git a/common/test/acceptance/tests/test_annotatable.py b/common/test/acceptance/tests/test_annotatable.py index 2acc916dcb..d39b44e792 100644 --- a/common/test/acceptance/tests/test_annotatable.py +++ b/common/test/acceptance/tests/test_annotatable.py @@ -4,7 +4,6 @@ E2E tests for the LMS. """ - from textwrap import dedent from six.moves import range diff --git a/common/test/acceptance/tests/test_cohorted_courseware.py b/common/test/acceptance/tests/test_cohorted_courseware.py index 43590f5cb5..d8104527cb 100644 --- a/common/test/acceptance/tests/test_cohorted_courseware.py +++ b/common/test/acceptance/tests/test_cohorted_courseware.py @@ -3,7 +3,6 @@ End-to-end test for cohorted courseware. This uses both Studio and LMS. """ - from bok_choy.page_object import XSS_INJECTION from common.test.acceptance.fixtures.course import XBlockFixtureDesc diff --git a/common/test/acceptance/tests/video/test_video_events.py b/common/test/acceptance/tests/video/test_video_events.py index 76d25c9ee5..7b95cfb460 100644 --- a/common/test/acceptance/tests/video/test_video_events.py +++ b/common/test/acceptance/tests/video/test_video_events.py @@ -1,7 +1,6 @@ """Ensure videos emit proper events""" - import datetime import json from unittest import skip diff --git a/docs/api/conf.py b/docs/api/conf.py index 1a63141884..7ac7e279ee 100644 --- a/docs/api/conf.py +++ b/docs/api/conf.py @@ -7,7 +7,6 @@ # http://www.sphinx-doc.org/en/master/config - import os import edx_theme diff --git a/docs/docs_settings.py b/docs/docs_settings.py index e7ed5495b3..be521a9d70 100644 --- a/docs/docs_settings.py +++ b/docs/docs_settings.py @@ -5,7 +5,6 @@ import all the Studio code. """ - import os if os.environ['EDX_PLATFORM_SETTINGS'] == 'devstack_docker': diff --git a/docs/guides/conf.py b/docs/guides/conf.py index fd77643339..6869940c3f 100644 --- a/docs/guides/conf.py +++ b/docs/guides/conf.py @@ -7,7 +7,6 @@ # http://www.sphinx-doc.org/en/master/config - import datetime import os import sys diff --git a/docs/sw2sphinxopenapi.py b/docs/sw2sphinxopenapi.py index 57b0e406e5..5aa95f9640 100644 --- a/docs/sw2sphinxopenapi.py +++ b/docs/sw2sphinxopenapi.py @@ -9,7 +9,6 @@ detailed segment page. """ - import functools import itertools import os diff --git a/lms/djangoapps/badges/apps.py b/lms/djangoapps/badges/apps.py index 7a0fd845bc..97f299e8b7 100644 --- a/lms/djangoapps/badges/apps.py +++ b/lms/djangoapps/badges/apps.py @@ -5,7 +5,6 @@ Signal handlers are connected here. """ - from django.apps import AppConfig diff --git a/lms/djangoapps/badges/events/course_meta.py b/lms/djangoapps/badges/events/course_meta.py index 72f7323612..6f013c8432 100644 --- a/lms/djangoapps/badges/events/course_meta.py +++ b/lms/djangoapps/badges/events/course_meta.py @@ -4,7 +4,6 @@ as enrolling in a certain number, completing a certain number, or completing a s """ - from badges.models import BadgeClass, CourseEventBadgesConfiguration from badges.utils import requires_badges_enabled diff --git a/lms/djangoapps/branding/__init__.py b/lms/djangoapps/branding/__init__.py index 22f0e3697d..b7ce3e1df5 100644 --- a/lms/djangoapps/branding/__init__.py +++ b/lms/djangoapps/branding/__init__.py @@ -8,7 +8,6 @@ such as the site visible courses, university name and logo. """ - from django.conf import settings from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/branding/api_urls.py b/lms/djangoapps/branding/api_urls.py index 39ee4c2213..5576ee2deb 100644 --- a/lms/djangoapps/branding/api_urls.py +++ b/lms/djangoapps/branding/api_urls.py @@ -3,7 +3,6 @@ Branding API endpoint urls. """ - from django.conf.urls import url from branding.views import footer diff --git a/lms/djangoapps/bulk_email/signals.py b/lms/djangoapps/bulk_email/signals.py index f017be5fc3..8a48acd0e2 100644 --- a/lms/djangoapps/bulk_email/signals.py +++ b/lms/djangoapps/bulk_email/signals.py @@ -3,7 +3,6 @@ Signal handlers for the bulk_email app """ - from django.dispatch import receiver from openedx.core.djangoapps.user_api.accounts.signals import USER_RETIRE_MAILINGS diff --git a/lms/djangoapps/bulk_email/tests/test_forms.py b/lms/djangoapps/bulk_email/tests/test_forms.py index 6aa8d89504..958d82414e 100644 --- a/lms/djangoapps/bulk_email/tests/test_forms.py +++ b/lms/djangoapps/bulk_email/tests/test_forms.py @@ -4,7 +4,6 @@ Unit tests for bulk-email-related forms. """ - from opaque_keys.edx.locator import CourseLocator from six import text_type diff --git a/lms/djangoapps/bulk_email/views.py b/lms/djangoapps/bulk_email/views.py index 75a2efb57a..3b784fe9f9 100644 --- a/lms/djangoapps/bulk_email/views.py +++ b/lms/djangoapps/bulk_email/views.py @@ -3,7 +3,6 @@ Views to support bulk email functionalities like opt-out. """ - import logging from six import text_type diff --git a/lms/djangoapps/ccx/api/v0/paginators.py b/lms/djangoapps/ccx/api/v0/paginators.py index a386a83cf9..17ddb56a1a 100644 --- a/lms/djangoapps/ccx/api/v0/paginators.py +++ b/lms/djangoapps/ccx/api/v0/paginators.py @@ -1,7 +1,6 @@ """ CCX API v0 Paginators. """ - from edx_rest_framework_extensions.paginators import DefaultPagination diff --git a/lms/djangoapps/ccx/api/v0/serializers.py b/lms/djangoapps/ccx/api/v0/serializers.py index 5df80fee79..10e7581fb5 100644 --- a/lms/djangoapps/ccx/api/v0/serializers.py +++ b/lms/djangoapps/ccx/api/v0/serializers.py @@ -1,7 +1,6 @@ """ CCX API v0 Serializers. """ - import six from ccx_keys.locator import CCXLocator from rest_framework import serializers diff --git a/lms/djangoapps/ccx/api/v0/views.py b/lms/djangoapps/ccx/api/v0/views.py index 660b2f6a0a..a6181002b4 100644 --- a/lms/djangoapps/ccx/api/v0/views.py +++ b/lms/djangoapps/ccx/api/v0/views.py @@ -1,7 +1,6 @@ """ API v0 views. """ - import datetime import json import logging diff --git a/lms/djangoapps/ccx/plugins.py b/lms/djangoapps/ccx/plugins.py index a45fb31010..73539f2b42 100644 --- a/lms/djangoapps/ccx/plugins.py +++ b/lms/djangoapps/ccx/plugins.py @@ -3,7 +3,6 @@ Registers the CCX feature for the edX platform. """ - from django.conf import settings from django.utils.translation import ugettext_noop diff --git a/lms/djangoapps/ccx/tasks.py b/lms/djangoapps/ccx/tasks.py index f71cb78bd9..347ff45bea 100644 --- a/lms/djangoapps/ccx/tasks.py +++ b/lms/djangoapps/ccx/tasks.py @@ -3,7 +3,6 @@ Asynchronous tasks for the CCX app. """ - import logging import six diff --git a/lms/djangoapps/certificates/apps.py b/lms/djangoapps/certificates/apps.py index f2d5f65a06..d259b088ab 100644 --- a/lms/djangoapps/certificates/apps.py +++ b/lms/djangoapps/certificates/apps.py @@ -5,7 +5,6 @@ Signal handlers are connected here. """ - from django.apps import AppConfig from django.conf import settings from edx_proctoring.runtime import set_runtime_service diff --git a/lms/djangoapps/certificates/queue.py b/lms/djangoapps/certificates/queue.py index 14c79d32e6..07632f65a8 100644 --- a/lms/djangoapps/certificates/queue.py +++ b/lms/djangoapps/certificates/queue.py @@ -174,7 +174,6 @@ class XQueueCertInterface(object): ) def del_cert(self, student, course_id): - """ Arguments: student - User.object diff --git a/lms/djangoapps/certificates/tests/test_create_fake_cert.py b/lms/djangoapps/certificates/tests/test_create_fake_cert.py index f3f33537e9..d9c17f74f1 100644 --- a/lms/djangoapps/certificates/tests/test_create_fake_cert.py +++ b/lms/djangoapps/certificates/tests/test_create_fake_cert.py @@ -1,7 +1,6 @@ """Tests for the create_fake_certs management command. """ - import six from django.core.management import call_command diff --git a/lms/djangoapps/certificates/tests/test_support_views.py b/lms/djangoapps/certificates/tests/test_support_views.py index d9f7b131a3..9a3c3d8d0e 100644 --- a/lms/djangoapps/certificates/tests/test_support_views.py +++ b/lms/djangoapps/certificates/tests/test_support_views.py @@ -3,7 +3,6 @@ Tests for certificate app views used by the support team. """ - import json import ddt diff --git a/lms/djangoapps/certificates/tests/test_tasks.py b/lms/djangoapps/certificates/tests/test_tasks.py index 160546621c..7da8edb836 100644 --- a/lms/djangoapps/certificates/tests/test_tasks.py +++ b/lms/djangoapps/certificates/tests/test_tasks.py @@ -3,7 +3,6 @@ Test module for user certificate generation. """ - import ddt from django.test import TestCase from mock import call, patch diff --git a/lms/djangoapps/certificates/tests/test_views.py b/lms/djangoapps/certificates/tests/test_views.py index e81751a070..6e01f8e1f7 100644 --- a/lms/djangoapps/certificates/tests/test_views.py +++ b/lms/djangoapps/certificates/tests/test_views.py @@ -1,7 +1,6 @@ """Tests for certificates views. """ - import datetime import json from uuid import uuid4 diff --git a/lms/djangoapps/certificates/tests/test_webview_views.py b/lms/djangoapps/certificates/tests/test_webview_views.py index d3507463c7..c6d86d3282 100644 --- a/lms/djangoapps/certificates/tests/test_webview_views.py +++ b/lms/djangoapps/certificates/tests/test_webview_views.py @@ -2,7 +2,6 @@ """Tests for certificates views. """ - import datetime import json from collections import OrderedDict diff --git a/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py b/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py index b4231aaf4f..74d97c24af 100644 --- a/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py +++ b/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py @@ -3,7 +3,6 @@ Tests for class dashboard (Metrics tab in instructor dashboard) """ - import json from django.test.client import RequestFactory diff --git a/lms/djangoapps/class_dashboard/views.py b/lms/djangoapps/class_dashboard/views.py index f0c6f58617..16cb40054f 100644 --- a/lms/djangoapps/class_dashboard/views.py +++ b/lms/djangoapps/class_dashboard/views.py @@ -3,7 +3,6 @@ Handles requests for data, returning a json """ - import json import logging diff --git a/lms/djangoapps/commerce/admin.py b/lms/djangoapps/commerce/admin.py index b196f42213..8652e51e9f 100644 --- a/lms/djangoapps/commerce/admin.py +++ b/lms/djangoapps/commerce/admin.py @@ -1,7 +1,6 @@ """ Admin site bindings for commerce app. """ - from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/lms/djangoapps/commerce/api/v1/permissions.py b/lms/djangoapps/commerce/api/v1/permissions.py index 9404318454..d13f1b364a 100644 --- a/lms/djangoapps/commerce/api/v1/permissions.py +++ b/lms/djangoapps/commerce/api/v1/permissions.py @@ -1,7 +1,6 @@ """ Custom API permissions. """ - from django.contrib.auth.models import User from rest_framework.permissions import BasePermission, DjangoModelPermissions diff --git a/lms/djangoapps/commerce/http.py b/lms/djangoapps/commerce/http.py index c0d38292b1..35e4063087 100644 --- a/lms/djangoapps/commerce/http.py +++ b/lms/djangoapps/commerce/http.py @@ -1,7 +1,6 @@ """ HTTP-related entities. """ - from rest_framework.status import HTTP_200_OK, HTTP_500_INTERNAL_SERVER_ERROR from util.json_request import JsonResponse diff --git a/lms/djangoapps/commerce/management/commands/configure_commerce.py b/lms/djangoapps/commerce/management/commands/configure_commerce.py index a058a66a19..fda5dce431 100644 --- a/lms/djangoapps/commerce/management/commands/configure_commerce.py +++ b/lms/djangoapps/commerce/management/commands/configure_commerce.py @@ -4,7 +4,6 @@ We can use this command to enable/disable commerce configuration or disable chec """ - import logging from django.core.management import BaseCommand diff --git a/lms/djangoapps/commerce/tests/__init__.py b/lms/djangoapps/commerce/tests/__init__.py index 0c8c3e63f7..1c584e7530 100644 --- a/lms/djangoapps/commerce/tests/__init__.py +++ b/lms/djangoapps/commerce/tests/__init__.py @@ -2,7 +2,6 @@ """ Commerce app tests package. """ - import httpretty import mock from django.conf import settings diff --git a/lms/djangoapps/commerce/tests/test_views.py b/lms/djangoapps/commerce/tests/test_views.py index 7ac0aa7d34..9f07f0d9d2 100644 --- a/lms/djangoapps/commerce/tests/test_views.py +++ b/lms/djangoapps/commerce/tests/test_views.py @@ -1,7 +1,6 @@ """ Tests for commerce views. """ - import json import ddt diff --git a/lms/djangoapps/course_api/api.py b/lms/djangoapps/course_api/api.py index f1390e6449..feb6493007 100644 --- a/lms/djangoapps/course_api/api.py +++ b/lms/djangoapps/course_api/api.py @@ -3,7 +3,6 @@ Course API """ - from edx_when.api import get_dates_for_course from django.conf import settings from django.contrib.auth.models import AnonymousUser, User diff --git a/lms/djangoapps/course_api/blocks/api.py b/lms/djangoapps/course_api/blocks/api.py index 2d38b51726..39103a1d9f 100644 --- a/lms/djangoapps/course_api/blocks/api.py +++ b/lms/djangoapps/course_api/blocks/api.py @@ -3,7 +3,6 @@ API function for retrieving course blocks data """ - import lms.djangoapps.course_blocks.api as course_blocks_api from lms.djangoapps.course_blocks.transformers.access_denied_filter import AccessDeniedMessageFilterTransformer from lms.djangoapps.course_blocks.transformers.hidden_content import HiddenContentTransformer diff --git a/lms/djangoapps/course_api/blocks/permissions.py b/lms/djangoapps/course_api/blocks/permissions.py index b455ebeb22..e2acbea2bc 100644 --- a/lms/djangoapps/course_api/blocks/permissions.py +++ b/lms/djangoapps/course_api/blocks/permissions.py @@ -3,7 +3,6 @@ Encapsulates permissions checks for Course Blocks API """ - from lms.djangoapps.courseware.access import has_access from student.models import CourseEnrollment from student.roles import CourseStaffRole diff --git a/lms/djangoapps/course_api/blocks/tests/helpers.py b/lms/djangoapps/course_api/blocks/tests/helpers.py index 12293c5262..1eef9a1e8d 100644 --- a/lms/djangoapps/course_api/blocks/tests/helpers.py +++ b/lms/djangoapps/course_api/blocks/tests/helpers.py @@ -3,7 +3,6 @@ Helper functions for unit tests """ - from opaque_keys.edx.keys import UsageKey diff --git a/lms/djangoapps/course_api/blocks/tests/test_api.py b/lms/djangoapps/course_api/blocks/tests/test_api.py index f87d999ab5..0588c01f9d 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_api.py +++ b/lms/djangoapps/course_api/blocks/tests/test_api.py @@ -3,7 +3,6 @@ Tests for Blocks api.py """ - from itertools import product import ddt diff --git a/lms/djangoapps/course_api/blocks/transformers/__init__.py b/lms/djangoapps/course_api/blocks/transformers/__init__.py index 487e9c5cba..5ef9850c0b 100644 --- a/lms/djangoapps/course_api/blocks/transformers/__init__.py +++ b/lms/djangoapps/course_api/blocks/transformers/__init__.py @@ -3,7 +3,6 @@ Course API Block Transformers """ - from lms.djangoapps.course_blocks.transformers.visibility import VisibilityTransformer from .block_completion import BlockCompletionTransformer diff --git a/lms/djangoapps/course_api/blocks/transformers/block_completion.py b/lms/djangoapps/course_api/blocks/transformers/block_completion.py index 8ab57b26bd..6d02caff2d 100644 --- a/lms/djangoapps/course_api/blocks/transformers/block_completion.py +++ b/lms/djangoapps/course_api/blocks/transformers/block_completion.py @@ -3,7 +3,6 @@ Block Completion Transformer """ - from completion.models import BlockCompletion from xblock.completable import XBlockCompletionMode as CompletionMode diff --git a/lms/djangoapps/course_api/blocks/transformers/milestones.py b/lms/djangoapps/course_api/blocks/transformers/milestones.py index 5d5f827dcf..7b203745b5 100644 --- a/lms/djangoapps/course_api/blocks/transformers/milestones.py +++ b/lms/djangoapps/course_api/blocks/transformers/milestones.py @@ -3,7 +3,6 @@ Milestones Transformer """ - import logging import six diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_depth.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_depth.py index af95967ca1..73eecfaa3c 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_depth.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_depth.py @@ -5,7 +5,6 @@ Tests for BlockDepthTransformer. # pylint: disable=protected-access - from unittest import TestCase import ddt diff --git a/lms/djangoapps/course_api/forms.py b/lms/djangoapps/course_api/forms.py index 696f8b37a2..f92d9658d7 100644 --- a/lms/djangoapps/course_api/forms.py +++ b/lms/djangoapps/course_api/forms.py @@ -3,7 +3,6 @@ Course API forms """ - from collections import namedtuple import six diff --git a/lms/djangoapps/course_api/permissions.py b/lms/djangoapps/course_api/permissions.py index a33cd54df3..50790c11c9 100644 --- a/lms/djangoapps/course_api/permissions.py +++ b/lms/djangoapps/course_api/permissions.py @@ -3,7 +3,6 @@ Course API Authorization functions """ - from student.roles import GlobalStaff diff --git a/lms/djangoapps/course_api/serializers.py b/lms/djangoapps/course_api/serializers.py index a4df5cc7ad..120ef5a870 100644 --- a/lms/djangoapps/course_api/serializers.py +++ b/lms/djangoapps/course_api/serializers.py @@ -3,7 +3,6 @@ Course API Serializers. Representing course catalog data """ - import six.moves.urllib.error # pylint: disable=import-error import six.moves.urllib.parse # pylint: disable=import-error import six.moves.urllib.request # pylint: disable=import-error diff --git a/lms/djangoapps/course_api/tests/mixins.py b/lms/djangoapps/course_api/tests/mixins.py index 7e76596aac..c32bb21be6 100644 --- a/lms/djangoapps/course_api/tests/mixins.py +++ b/lms/djangoapps/course_api/tests/mixins.py @@ -3,7 +3,6 @@ Common mixins for Course API Tests """ - from datetime import datetime from student.tests.factories import UserFactory diff --git a/lms/djangoapps/course_api/tests/test_forms.py b/lms/djangoapps/course_api/tests/test_forms.py index 57ae6e658c..bee4f1dc1e 100644 --- a/lms/djangoapps/course_api/tests/test_forms.py +++ b/lms/djangoapps/course_api/tests/test_forms.py @@ -3,7 +3,6 @@ Tests for Course API forms. """ - from itertools import product import ddt diff --git a/lms/djangoapps/course_api/tests/test_permissions.py b/lms/djangoapps/course_api/tests/test_permissions.py index 54e48b74bb..f48f236c17 100644 --- a/lms/djangoapps/course_api/tests/test_permissions.py +++ b/lms/djangoapps/course_api/tests/test_permissions.py @@ -3,7 +3,6 @@ Test authorization functions """ - from django.contrib.auth.models import AnonymousUser from django.test import TestCase diff --git a/lms/djangoapps/course_api/tests/test_serializers.py b/lms/djangoapps/course_api/tests/test_serializers.py index 78cd81a65f..bf14af6183 100644 --- a/lms/djangoapps/course_api/tests/test_serializers.py +++ b/lms/djangoapps/course_api/tests/test_serializers.py @@ -3,7 +3,6 @@ Test data created by CourseSerializer and CourseDetailSerializer """ - from datetime import datetime import ddt diff --git a/lms/djangoapps/course_api/views.py b/lms/djangoapps/course_api/views.py index b4326746a6..0cb44022d4 100644 --- a/lms/djangoapps/course_api/views.py +++ b/lms/djangoapps/course_api/views.py @@ -3,7 +3,6 @@ Course API Views """ - from django.core.exceptions import ValidationError from edx_rest_framework_extensions.paginators import NamespacedPageNumberPagination from rest_framework.generics import ListAPIView, RetrieveAPIView diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_library_content.py b/lms/djangoapps/course_blocks/transformers/tests/test_library_content.py index ab7f95cc84..f99f9f0bba 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_library_content.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_library_content.py @@ -3,7 +3,6 @@ Tests for ContentLibraryTransformer. """ - from six.moves import range from openedx.core.djangoapps.content.block_structure.api import clear_course_from_cache diff --git a/lms/djangoapps/course_goals/apps.py b/lms/djangoapps/course_goals/apps.py index e46960e97a..3e700224b2 100644 --- a/lms/djangoapps/course_goals/apps.py +++ b/lms/djangoapps/course_goals/apps.py @@ -5,7 +5,6 @@ Signal handlers are connected here. """ - from django.apps import AppConfig diff --git a/lms/djangoapps/course_wiki/editors.py b/lms/djangoapps/course_wiki/editors.py index 323c19198c..f1841d33db 100644 --- a/lms/djangoapps/course_wiki/editors.py +++ b/lms/djangoapps/course_wiki/editors.py @@ -3,7 +3,6 @@ Support for using the CodeMirror code editor as a wiki content editor. """ - from django import forms from django.forms.utils import flatatt from django.template.loader import render_to_string diff --git a/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_mathjax.py b/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_mathjax.py index 57596a12b8..bfc81f56ea 100644 --- a/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_mathjax.py +++ b/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_mathjax.py @@ -1,7 +1,6 @@ # Source: https://github.com/mayoff/python-markdown-mathjax - import markdown try: diff --git a/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_video.py b/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_video.py index ef004d0d4f..df49c93891 100755 --- a/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_video.py +++ b/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_video.py @@ -129,7 +129,6 @@ u'