From e4cff58bede6efeaef524ce2cefa767b5c68e54a Mon Sep 17 00:00:00 2001 From: Jawayria Date: Fri, 12 Feb 2021 17:51:52 +0500 Subject: [PATCH] BOM-2351: Removed unused imports from common/djangoapps/{track, util} --- common/djangoapps/track/urls.py | 3 --- common/djangoapps/util/cache.py | 1 - common/djangoapps/util/db.py | 3 +-- common/djangoapps/util/memcache.py | 3 --- 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/common/djangoapps/track/urls.py b/common/djangoapps/track/urls.py index c74b8e46ba..ed7877f252 100644 --- a/common/djangoapps/track/urls.py +++ b/common/djangoapps/track/urls.py @@ -1,9 +1,6 @@ """ URLs for track app """ - - -from django.conf import settings # lint-amnesty, pylint: disable=unused-import from django.conf.urls import url from . import views diff --git a/common/djangoapps/util/cache.py b/common/djangoapps/util/cache.py index 5f697c2c23..2dcb18bb51 100644 --- a/common/djangoapps/util/cache.py +++ b/common/djangoapps/util/cache.py @@ -10,7 +10,6 @@ not migrating so as not to inconvenience users by logging them all out. from functools import wraps import six -from django.conf import settings # lint-amnesty, pylint: disable=unused-import from django.core import cache # If we can't find a 'general' CACHE defined in settings.py, we simply fall back # to returning the default cache. This will happen with dev machines. diff --git a/common/djangoapps/util/db.py b/common/djangoapps/util/db.py index 422b8219bd..594a4d16dd 100644 --- a/common/djangoapps/util/db.py +++ b/common/djangoapps/util/db.py @@ -8,9 +8,8 @@ import random # TransactionManagementError used below actually *does* derive from the standard "Exception" class. # lint-amnesty, pylint: disable=bad-option-value, nonstandard-exception from contextlib import contextmanager -from functools import wraps # lint-amnesty, pylint: disable=unused-import -from django.db import DEFAULT_DB_ALIAS, DatabaseError, Error, transaction # lint-amnesty, pylint: disable=unused-import +from django.db import DEFAULT_DB_ALIAS, transaction # lint-amnesty, pylint: disable=unused-import from openedx.core.lib.cache_utils import get_cache diff --git a/common/djangoapps/util/memcache.py b/common/djangoapps/util/memcache.py index 27c3a2b700..9cf7b21bd9 100644 --- a/common/djangoapps/util/memcache.py +++ b/common/djangoapps/util/memcache.py @@ -5,10 +5,7 @@ so that we can cache any keys, not just ones that memcache would ordinarily acce import hashlib - -import six.moves.urllib.error import six.moves.urllib.parse -import six.moves.urllib.request from django.utils.encoding import smart_str