refactor: Removed unused imports

Removed unused imports from cms using 'unimport'
This commit is contained in:
Jawayria
2021-02-11 14:05:48 +05:00
parent 401789dad3
commit 772f8cbe90
9 changed files with 1 additions and 15 deletions

View File

@@ -5,7 +5,6 @@ from unittest import mock
import ddt
from django.core.management import CommandError, call_command
from cms.djangoapps.contentstore.management.commands.reindex_course import Command as ReindexCommand
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.django import modulestore

View File

@@ -14,7 +14,6 @@ import ddt
import lxml.html
from django.conf import settings
from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user
from django.middleware.csrf import _compare_salted_tokens # lint-amnesty, pylint: disable=unused-import
from django.test import TestCase
from django.test.utils import override_settings
from edxval.api import create_video, get_videos_for_course

View File

@@ -16,7 +16,6 @@ from django.conf import settings
from lazy.lazy import lazy
from pytz import UTC
from search.search_engine_base import SearchEngine
from xblock.core import XBlock # lint-amnesty, pylint: disable=unused-import
from cms.djangoapps.contentstore.courseware_index import (
CourseAboutSearchIndexer,

View File

@@ -1,6 +1,5 @@
"""Views for items (modules)."""
import logging
from collections import OrderedDict
from datetime import datetime

View File

@@ -4,9 +4,6 @@ unit tests for course_info views and models.
import json
from unittest.mock import patch # lint-amnesty, pylint: disable=unused-import
from django.test.utils import override_settings # lint-amnesty, pylint: disable=unused-import
from opaque_keys.edx.keys import UsageKey
from cms.djangoapps.contentstore.tests.test_course_settings import CourseTestCase

View File

@@ -36,7 +36,6 @@ When refering to XBlocks, we use the entry-point name. For example,
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=unused-import, useless-suppression, wrong-import-order, wrong-import-position
import importlib.util

View File

@@ -18,9 +18,6 @@ as they are for non-optimized devstack. Instead, update_assets must be
invoked each time that changes have been made.
"""
import os # lint-amnesty, pylint: disable=unused-import
########################## Devstack settings ###################################
from .devstack import * # pylint: disable=wildcard-import

View File

@@ -11,9 +11,6 @@ In two separate processes on devstack:
DJANGO_SETTINGS_MODULE=cms.envs.devstack_with_worker celery worker --app=cms.celery:APP
"""
import os # lint-amnesty, pylint: disable=unused-import
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import

View File

@@ -27,7 +27,7 @@ from .common import *
# import settings from LMS for consistent behavior with CMS
from lms.envs.test import ( # pylint: disable=wrong-import-order
COMPREHENSIVE_THEME_DIRS,
COMPREHENSIVE_THEME_DIRS, # unimport:skip
DEFAULT_FILE_STORAGE,
ECOMMERCE_API_URL,
ENABLE_COMPREHENSIVE_THEMING,