diff --git a/common/djangoapps/course_modes/admin.py b/common/djangoapps/course_modes/admin.py index 74a9d2892e723e6b61edd638748a4185200a865c..4b75e16677a11f2cb1f8f85a10041f74eb300529 100644 --- a/common/djangoapps/course_modes/admin.py +++ b/common/djangoapps/course_modes/admin.py @@ -1,7 +1,6 @@ """Django admin for course_modes""" -import six from django import forms from django.conf import settings from django.contrib import admin diff --git a/common/djangoapps/course_modes/helpers.py b/common/djangoapps/course_modes/helpers.py index 4511a32ffdcacb118a1e30851209e30f9fffa335..d62573d9da06b4f5a78efd745a41ff1d7e15e500 100644 --- a/common/djangoapps/course_modes/helpers.py +++ b/common/djangoapps/course_modes/helpers.py @@ -2,7 +2,6 @@ import logging -import six from django.utils.translation import ugettext_lazy as _ from requests.exceptions import ConnectionError, Timeout # pylint: disable=redefined-builtin diff --git a/common/djangoapps/course_modes/models.py b/common/djangoapps/course_modes/models.py index c9972cd93dc8c55b332b25778064375e3df6601b..67fa750ba118b9e95be3744fe88aa1bf958cf7b7 100644 --- a/common/djangoapps/course_modes/models.py +++ b/common/djangoapps/course_modes/models.py @@ -6,7 +6,6 @@ Add and create new modes for running courses on this particular LMS from collections import defaultdict, namedtuple from datetime import timedelta import logging -import six from config_models.models import ConfigurationModel from django.conf import settings from django.core.exceptions import ValidationError diff --git a/common/djangoapps/course_modes/rest_api/v1/tests/test_views.py b/common/djangoapps/course_modes/rest_api/v1/tests/test_views.py index 37aad8665162a631c2b574feac31b3a3a1351082..d329e9c7bbeac0c442b6899022f7d612da92d748 100644 --- a/common/djangoapps/course_modes/rest_api/v1/tests/test_views.py +++ b/common/djangoapps/course_modes/rest_api/v1/tests/test_views.py @@ -12,7 +12,6 @@ from django.urls import reverse from opaque_keys.edx.keys import CourseKey from rest_framework import status from rest_framework.test import APITestCase -from six import text_type from common.djangoapps.course_modes.rest_api.v1.views import CourseModesView from common.djangoapps.course_modes.models import CourseMode diff --git a/common/djangoapps/course_modes/tests/factories.py b/common/djangoapps/course_modes/tests/factories.py index 624189690cf4818849cb1013079cd3ba20bb2032..a2fbea0190e54bb2aa4766491fc81c7d155701d8 100644 --- a/common/djangoapps/course_modes/tests/factories.py +++ b/common/djangoapps/course_modes/tests/factories.py @@ -4,7 +4,6 @@ Factories for course mode models. import random -import six from factory import lazy_attribute from factory.django import DjangoModelFactory diff --git a/common/djangoapps/course_modes/tests/test_admin.py b/common/djangoapps/course_modes/tests/test_admin.py index f04be6d51a5cf3ac635084904aaa769056e5e850..c71d011f65c7c36d2d96c567789b1ddb3ae2e904 100644 --- a/common/djangoapps/course_modes/tests/test_admin.py +++ b/common/djangoapps/course_modes/tests/test_admin.py @@ -7,7 +7,6 @@ import unittest from datetime import datetime, timedelta import ddt -import six from django.conf import settings from django.urls import reverse from pytz import UTC, timezone diff --git a/common/djangoapps/course_modes/tests/test_models.py b/common/djangoapps/course_modes/tests/test_models.py index 7279166929ecd73b576719aef3f39d2537d0991e..9ce06d13e3c302adcd2405a2e6237b02377a1d12 100644 --- a/common/djangoapps/course_modes/tests/test_models.py +++ b/common/djangoapps/course_modes/tests/test_models.py @@ -17,7 +17,7 @@ from django.utils.timezone import now from opaque_keys.edx.locator import CourseLocator from common.djangoapps.course_modes.helpers import enrollment_mode_display -from common.djangoapps.course_modes.models import ( # lint-amnesty, pylint: disable=line-too-long +from common.djangoapps.course_modes.models import ( CourseMode, Mode, get_cosmetic_display_price, diff --git a/common/djangoapps/course_modes/tests/test_views.py b/common/djangoapps/course_modes/tests/test_views.py index d60c1908916ef80f2c9a3581be95f3481feb5823..dfc28b264bf5b1c7ee84794d280d1ca7893b4ef2 100644 --- a/common/djangoapps/course_modes/tests/test_views.py +++ b/common/djangoapps/course_modes/tests/test_views.py @@ -12,7 +12,6 @@ import ddt import freezegun import httpretty import pytz -import six from django.conf import settings from django.urls import reverse diff --git a/common/djangoapps/course_modes/views.py b/common/djangoapps/course_modes/views.py index df7bd13bd5333aa0df16bf08e6003ab7e37abefd..69dcf48b79be76a01e5573ba025cf8c9e887e4d5 100644 --- a/common/djangoapps/course_modes/views.py +++ b/common/djangoapps/course_modes/views.py @@ -23,7 +23,6 @@ from django.views.generic.base import View from edx_django_utils.monitoring.utils import increment from ipware.ip import get_client_ip from opaque_keys.edx.keys import CourseKey -from six import text_type from common.djangoapps.course_modes.models import CourseMode from common.djangoapps.course_modes.helpers import get_course_final_price diff --git a/common/djangoapps/student/management/commands/anonymized_id_mapping.py b/common/djangoapps/student/management/commands/anonymized_id_mapping.py index 3a3fcc85b25192b4a34a5cdcb3af8b8b3f073c10..645fad370e86f25b795dab086e6cf0da6b060316 100644 --- a/common/djangoapps/student/management/commands/anonymized_id_mapping.py +++ b/common/djangoapps/student/management/commands/anonymized_id_mapping.py @@ -13,7 +13,6 @@ import csv from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.core.management.base import BaseCommand, CommandError from opaque_keys.edx.keys import CourseKey -from six import text_type from common.djangoapps.student.models import anonymous_id_for_user diff --git a/common/djangoapps/student/management/commands/bulk_change_enrollment.py b/common/djangoapps/student/management/commands/bulk_change_enrollment.py index 7787f7fc7802d065ac7eea2d078a943900b590f4..c59b2533b6c5946eb10551e98bbd7fee969b6914 100644 --- a/common/djangoapps/student/management/commands/bulk_change_enrollment.py +++ b/common/djangoapps/student/management/commands/bulk_change_enrollment.py @@ -7,7 +7,6 @@ from django.core.management.base import BaseCommand, CommandError from django.db import transaction from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey -from six import text_type from common.djangoapps.course_modes.models import CourseMode from openedx.core.djangoapps.content.course_overviews.models import CourseOverview diff --git a/common/djangoapps/student/management/commands/change_enrollment.py b/common/djangoapps/student/management/commands/change_enrollment.py index 53a770b4b784a0fbd2387d54151df5ddef0cdc49..fa322fdd7be0f371914b514731a68842cf8fa31e 100644 --- a/common/djangoapps/student/management/commands/change_enrollment.py +++ b/common/djangoapps/student/management/commands/change_enrollment.py @@ -7,7 +7,6 @@ from django.core.management.base import BaseCommand, CommandError from django.db import transaction from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey -from six import text_type from openedx.core.djangoapps.credit.email_utils import get_credit_provider_attribute_values from common.djangoapps.student.models import CourseEnrollment, CourseEnrollmentAttribute, User diff --git a/common/djangoapps/student/management/commands/set_staff.py b/common/djangoapps/student/management/commands/set_staff.py index 2664d377514fafd0dd4928d93e8bdda617543949..579f4775e8baa9629e12aa945fbc5c2228bb7fb3 100644 --- a/common/djangoapps/student/management/commands/set_staff.py +++ b/common/djangoapps/student/management/commands/set_staff.py @@ -4,7 +4,6 @@ import re from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.core.management.base import BaseCommand -from six import text_type class Command(BaseCommand): # lint-amnesty, pylint: disable=missing-class-docstring diff --git a/common/djangoapps/student/management/commands/set_superuser.py b/common/djangoapps/student/management/commands/set_superuser.py index 226353bd6c73b3be6852b50943c35d28006b28de..aa73b7498c518497a5c0c0e5699f5c92a99d8207 100644 --- a/common/djangoapps/student/management/commands/set_superuser.py +++ b/common/djangoapps/student/management/commands/set_superuser.py @@ -3,7 +3,6 @@ from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.core.management.base import BaseCommand -from six import text_type class Command(BaseCommand): diff --git a/common/djangoapps/student/management/commands/transfer_students.py b/common/djangoapps/student/management/commands/transfer_students.py index 0c69c35c5f39b8d7478716a5480ec935626114c5..2f865df7668fa756dff26e2b3eadecbf2b79eb1c 100644 --- a/common/djangoapps/student/management/commands/transfer_students.py +++ b/common/djangoapps/student/management/commands/transfer_students.py @@ -8,7 +8,6 @@ from textwrap import dedent from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.db import transaction from opaque_keys.edx.keys import CourseKey -from six import text_type from common.djangoapps.student.models import CourseEnrollment from common.djangoapps.track.management.tracked_command import TrackedCommand 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 2e00b6a67587ee6ce0e77d236c6643404b49a547..d172e33a7f18ace8fbeca23ad5baf432383ba833 100644 --- a/common/djangoapps/student/management/tests/test_create_random_users.py +++ b/common/djangoapps/student/management/tests/test_create_random_users.py @@ -7,7 +7,6 @@ import pytest from django.contrib.auth import get_user_model from django.core.management import call_command from opaque_keys import InvalidKeyError -from six import text_type from common.djangoapps.student.models import CourseEnrollment from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase diff --git a/common/djangoapps/student/management/tests/test_create_test_users.py b/common/djangoapps/student/management/tests/test_create_test_users.py index 44965c6375f95b1867546328848ebaaeb4c31bfe..8b3fd3fde782ed51b32f7b4427c756bf6fa0b286 100644 --- a/common/djangoapps/student/management/tests/test_create_test_users.py +++ b/common/djangoapps/student/management/tests/test_create_test_users.py @@ -9,7 +9,6 @@ from django.core.exceptions import ValidationError from django.core.management import call_command from django.core.management.base import CommandError from opaque_keys import InvalidKeyError -from six import text_type from common.djangoapps.student.helpers import AccountValidationError from common.djangoapps.student.models import CourseAccessRole, CourseEnrollment diff --git a/common/djangoapps/student/tests/test_models.py b/common/djangoapps/student/tests/test_models.py index 584c86ce1e148aa6ff00f503535c33c31905b4fe..b9b553147b7d94a27983f21ed447cc2233b85285 100644 --- a/common/djangoapps/student/tests/test_models.py +++ b/common/djangoapps/student/tests/test_models.py @@ -8,7 +8,7 @@ import pytz from crum import set_current_request from django.contrib.auth.models import AnonymousUser, User # lint-amnesty, pylint: disable=imported-auth-user from django.core.cache import cache -from django.db.models import signals +from django.db.models import signals # pylint: disable=unused-import from django.db.models.functions import Lower from django.test import TestCase from edx_toggles.toggles.testutils import override_waffle_flag diff --git a/common/djangoapps/student/views/dashboard.py b/common/djangoapps/student/views/dashboard.py index 64a01fffbe4f111950b3f9b3c442628265e0eadb..a0ba7af578231732628dac6419df72f68526e1c9 100644 --- a/common/djangoapps/student/views/dashboard.py +++ b/common/djangoapps/student/views/dashboard.py @@ -19,7 +19,6 @@ from edx_django_utils.plugins import get_plugins_view_context from edx_toggles.toggles import LegacyWaffleFlag, LegacyWaffleFlagNamespace from opaque_keys.edx.keys import CourseKey from pytz import UTC -from six import iteritems, text_type from lms.djangoapps.bulk_email.api import is_bulk_email_feature_enabled from lms.djangoapps.bulk_email.models import Optout diff --git a/common/djangoapps/student/views/management.py b/common/djangoapps/student/views/management.py index 60d3e20c0a751d00c073782eacb3bb1e7d27d56a..36875e502fa6005f9b3d0faaae3c24653734449a 100644 --- a/common/djangoapps/student/views/management.py +++ b/common/djangoapps/student/views/management.py @@ -8,7 +8,6 @@ import logging import uuid from collections import namedtuple -import six from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import login_required @@ -34,7 +33,6 @@ from ipware.ip import get_client_ip from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from pytz import UTC -from six import text_type from common.djangoapps.track import views as track_views from lms.djangoapps.bulk_email.models import Optout diff --git a/common/djangoapps/third_party_auth/lti.py b/common/djangoapps/third_party_auth/lti.py index b20885ceeb61e8b2ecd4e66bc9327d12a5d0d80d..f2ce67152701cc3d0ef9fb05959783050a133010 100644 --- a/common/djangoapps/third_party_auth/lti.py +++ b/common/djangoapps/third_party_auth/lti.py @@ -7,7 +7,6 @@ import calendar import logging import time -import six from django.contrib.auth import REDIRECT_FIELD_NAME from oauthlib.common import Request from oauthlib.oauth1.rfc5849.signature import ( @@ -17,7 +16,6 @@ from oauthlib.oauth1.rfc5849.signature import ( normalize_parameters, sign_hmac_sha1 ) -from six import text_type from social_core.backends.base import BaseAuth from social_core.exceptions import AuthFailed from social_core.utils import sanitize_redirect diff --git a/common/djangoapps/third_party_auth/saml.py b/common/djangoapps/third_party_auth/saml.py index 2937522b9198fc9bd10bf35c22587da76b92272e..38fa157bb44b2aba1f748cc1a0f831b38ad627c3 100644 --- a/common/djangoapps/third_party_auth/saml.py +++ b/common/djangoapps/third_party_auth/saml.py @@ -12,7 +12,6 @@ from django.http import Http404 from django.utils.functional import cached_property from django_countries import countries from onelogin.saml2.settings import OneLogin_Saml2_Settings -from six import text_type from social_core.backends.saml import OID_EDU_PERSON_ENTITLEMENT, SAMLAuth, SAMLIdentityProvider from social_core.exceptions import AuthForbidden diff --git a/common/djangoapps/third_party_auth/tasks.py b/common/djangoapps/third_party_auth/tasks.py index 38a4f50c6d730d346d586aad71a39d0eb3791c03..90c256e67b310c960606e4b09b8ec47a0529c381 100644 --- a/common/djangoapps/third_party_auth/tasks.py +++ b/common/djangoapps/third_party_auth/tasks.py @@ -15,7 +15,6 @@ from edx_django_utils.monitoring import set_code_owner_attribute from lxml import etree from onelogin.saml2.utils import OneLogin_Saml2_Utils from requests import exceptions -from six import text_type from openedx.core.djangolib.markup import Text from common.djangoapps.third_party_auth.models import SAMLConfiguration, SAMLProviderConfig, SAMLProviderData diff --git a/common/djangoapps/third_party_auth/tests/testutil.py b/common/djangoapps/third_party_auth/tests/testutil.py index ec8b1e65069ced35ed153292468b860dd1a094e2..33eb30009b41fd0689b7d0fc96a7f87923881e76 100644 --- a/common/djangoapps/third_party_auth/tests/testutil.py +++ b/common/djangoapps/third_party_auth/tests/testutil.py @@ -10,7 +10,6 @@ from contextlib import contextmanager from unittest import mock import django.test -import six from django.conf import settings from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.contrib.sites.models import Site diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py index e70320ed2fc0f1571412e8797618ba2cae180f99..653dad78e6207ac01be341aea5fc40a115dbb887 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py @@ -22,7 +22,7 @@ import pytest # TODO remove this import and the configuration -- xmodule should not depend on django! from django.conf import settings from opaque_keys.edx.keys import CourseKey -from opaque_keys.edx.locator import BlockUsageLocator, CourseLocator, LibraryLocator +from opaque_keys.edx.locator import BlockUsageLocator, CourseLocator, LibraryLocator # pylint: disable=unused-import from pytz import UTC from web_fragments.fragment import Fragment from xblock.core import XBlockAside diff --git a/common/lib/xmodule/xmodule/modulestore/tests/utils.py b/common/lib/xmodule/xmodule/modulestore/tests/utils.py index 60a22b3d112446d2f683f1e6acdadc23f6a64f16..92dbbfd8e0d97e4784ef87394449b84d9e89586d 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/utils.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/utils.py @@ -3,7 +3,6 @@ Helper classes and methods for running modulestore tests without Django. """ -import io import os from contextlib import contextmanager from importlib import import_module diff --git a/common/lib/xmodule/xmodule/modulestore/xml.py b/common/lib/xmodule/xmodule/modulestore/xml.py index ca28f991fe5beadb1de9062d38315971c5a4671b..06724aeec2a545869be22672435298effb28f3c6 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml.py +++ b/common/lib/xmodule/xmodule/modulestore/xml.py @@ -2,7 +2,6 @@ import glob import hashlib -import io import itertools import json import logging diff --git a/common/lib/xmodule/xmodule/modulestore/xml_importer.py b/common/lib/xmodule/xmodule/modulestore/xml_importer.py index 8f50d537ba8bfaa87266b49b59f9a4ab3897289f..2f6a31b2e901380bc6f038ad6d524ea19823f60c 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml_importer.py +++ b/common/lib/xmodule/xmodule/modulestore/xml_importer.py @@ -23,7 +23,6 @@ Modulestore virtual | XML physical (draft, published) import json -import io import logging import mimetypes import os diff --git a/common/lib/xmodule/xmodule/raw_module.py b/common/lib/xmodule/xmodule/raw_module.py index c840ab2f565ce8046c0052613fae86e0305300e7..cf349efbd8903560d8fda92adca91b6fee17fb96 100644 --- a/common/lib/xmodule/xmodule/raw_module.py +++ b/common/lib/xmodule/xmodule/raw_module.py @@ -4,8 +4,8 @@ import re from lxml import etree from xblock.fields import Scope, String -from xmodule.editing_module import XMLEditingDescriptor -from xmodule.xml_module import XmlDescriptor +from xmodule.editing_module import XMLEditingDescriptor # pylint: disable=unused-import +from xmodule.xml_module import XmlDescriptor # pylint: disable=unused-import from .exceptions import SerializationError diff --git a/common/lib/xmodule/xmodule/seq_module.py b/common/lib/xmodule/xmodule/seq_module.py index 96694aea9db23780b7e643d1f0ee2ad670a5f18c..eba02ef5a64fc2c25bda72dfb40e2330e436a64c 100644 --- a/common/lib/xmodule/xmodule/seq_module.py +++ b/common/lib/xmodule/xmodule/seq_module.py @@ -38,7 +38,7 @@ from .exceptions import NotFoundError from .fields import Date from .mako_module import MakoTemplateBlockBase from .progress import Progress -from .x_module import AUTHOR_VIEW, PUBLIC_VIEW, STUDENT_VIEW, XModule +from .x_module import AUTHOR_VIEW, PUBLIC_VIEW, STUDENT_VIEW, XModule # pylint: disable=unused-import from .xml_module import XmlMixin