diff --git a/cms/djangoapps/export_course_metadata/management/commands/export_course_metadata_for_all_courses.py b/cms/djangoapps/export_course_metadata/management/commands/export_course_metadata_for_all_courses.py index ad0034391c6cc2a88cc75b5f5ce28d24ce6cb502..6b639b621f785b0d60b7e636c178508d68725570 100644 --- a/cms/djangoapps/export_course_metadata/management/commands/export_course_metadata_for_all_courses.py +++ b/cms/djangoapps/export_course_metadata/management/commands/export_course_metadata_for_all_courses.py @@ -6,7 +6,7 @@ from django.core.management.base import BaseCommand from xmodule.modulestore.django import modulestore -from cms.djangoapps.export_course_metadata.signals import export_course_metadata +from cms.djangoapps.export_course_metadata.signals import export_course_metadata # pylint: disable=unused-import from cms.djangoapps.export_course_metadata.tasks import export_course_metadata_task diff --git a/lms/djangoapps/dashboard/management/commands/tests/test_git_add_course.py b/lms/djangoapps/dashboard/management/commands/tests/test_git_add_course.py index 65bb015620ee45c2da0e2e5ea81312f0c1483508..4b1080b0ba265cd9aafc7cd4cd1704b82e80ab65 100644 --- a/lms/djangoapps/dashboard/management/commands/tests/test_git_add_course.py +++ b/lms/djangoapps/dashboard/management/commands/tests/test_git_add_course.py @@ -9,7 +9,6 @@ import unittest from uuid import uuid4 import pytest -import six from django.conf import settings from django.core.management import call_command from django.core.management.base import CommandError diff --git a/lms/djangoapps/edxnotes/tests.py b/lms/djangoapps/edxnotes/tests.py index c4f18a41445b51d0870a5eba36a56a0172d9ae14..ae5136ba4d15b7d69e8a47eef8661421476a0ab9 100644 --- a/lms/djangoapps/edxnotes/tests.py +++ b/lms/djangoapps/edxnotes/tests.py @@ -11,7 +11,6 @@ from unittest.mock import MagicMock, patch import ddt import jwt import pytest -import six from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.core.exceptions import ImproperlyConfigured diff --git a/lms/djangoapps/survey/tests/test_models.py b/lms/djangoapps/survey/tests/test_models.py index 4c00cd0d240eba38e8c408afd9d8b792cf48e74f..6fc534baf6633f948ef3a3ab51807ca10e541ddf 100644 --- a/lms/djangoapps/survey/tests/test_models.py +++ b/lms/djangoapps/survey/tests/test_models.py @@ -7,7 +7,6 @@ from collections import OrderedDict import ddt import pytest -import six from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.core.exceptions import ValidationError from django.test import TestCase diff --git a/lms/djangoapps/survey/tests/test_views.py b/lms/djangoapps/survey/tests/test_views.py index 55910a3210e76ebfa7c8edc9153ef577662cd863..bcbf6f04e6125996702cb113e23943703d10372e 100644 --- a/lms/djangoapps/survey/tests/test_views.py +++ b/lms/djangoapps/survey/tests/test_views.py @@ -6,7 +6,6 @@ Python tests for the Survey views import json from collections import OrderedDict -import six from django.test.client import Client from django.urls import reverse diff --git a/lms/djangoapps/teams/serializers.py b/lms/djangoapps/teams/serializers.py index 1439d6cfd6d3c16774a35a035723d64b359ef37e..a8f51d887309943e4d6180454170c39419c04f9d 100644 --- a/lms/djangoapps/teams/serializers.py +++ b/lms/djangoapps/teams/serializers.py @@ -5,7 +5,6 @@ Defines serializers used by the Team API. from copy import deepcopy -import six from django.conf import settings from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django_countries import countries diff --git a/lms/djangoapps/teams/views.py b/lms/djangoapps/teams/views.py index d3ad8180164ec6b27d4aef384650f99e98ffc11d..5358d67ae1d7ce91c5ef1f14af88480d269d8d1d 100644 --- a/lms/djangoapps/teams/views.py +++ b/lms/djangoapps/teams/views.py @@ -6,7 +6,6 @@ HTTP endpoints for the Teams API. import logging from collections import Counter -import six from django.conf import settings from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.core.exceptions import PermissionDenied diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py index 68530d2435b2bc426e6bb208c3548c9080e73567..cf45ccd5e689a0816f194774f0bece75e7bcb776 100644 --- a/lms/djangoapps/verify_student/views.py +++ b/lms/djangoapps/verify_student/views.py @@ -2,7 +2,6 @@ Views for the verification flow """ -import datetime import decimal import json import logging diff --git a/openedx/core/djangoapps/discussions/models.py b/openedx/core/djangoapps/discussions/models.py index 4d496ddd9dd4ac584dde893c10d0d7447c4a065d..1bed24358e1a97366ebc808c67387883b213f9f4 100644 --- a/openedx/core/djangoapps/discussions/models.py +++ b/openedx/core/djangoapps/discussions/models.py @@ -3,7 +3,6 @@ Provide django models to back the discussions app """ from __future__ import annotations import logging -from typing import List from django.core.exceptions import ValidationError from django.db import models diff --git a/openedx/features/content_type_gating/partitions.py b/openedx/features/content_type_gating/partitions.py index f59ca6327ca07da0f35dda8c429004100296c415..4eda32eb72611900f0d2e074af962b9181dc293e 100644 --- a/openedx/features/content_type_gating/partitions.py +++ b/openedx/features/content_type_gating/partitions.py @@ -11,7 +11,6 @@ import logging import crum import pytz -import six from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from web_fragments.fragment import Fragment diff --git a/openedx/features/content_type_gating/tests/test_access.py b/openedx/features/content_type_gating/tests/test_access.py index 596fcf0e1d3cb6b7932a4e52f7c5b1e2c40ad56f..087cae0ec86ee41240239018aed2882b5644cf6e 100644 --- a/openedx/features/content_type_gating/tests/test_access.py +++ b/openedx/features/content_type_gating/tests/test_access.py @@ -3,12 +3,10 @@ Test audit user's access to various content based on content-gating features. """ -import json import os from datetime import datetime, timedelta import ddt -import six from django.conf import settings from django.test.client import RequestFactory, Client from django.test.utils import override_settings diff --git a/openedx/features/course_bookmarks/templates/course_bookmarks/course_bookmarks_js.template b/openedx/features/course_bookmarks/templates/course_bookmarks/course_bookmarks_js.template index 232ff21a7cdabc0e3ea24344156ffce056d1469e..65ac9d9fcd2db921b25385938a2296a3411ca5be 100644 --- a/openedx/features/course_bookmarks/templates/course_bookmarks/course_bookmarks_js.template +++ b/openedx/features/course_bookmarks/templates/course_bookmarks/course_bookmarks_js.template @@ -1,7 +1,6 @@ ## mako <%! -import six from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string %> @@ -9,7 +8,7 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str require(['course_bookmarks/js/course_bookmarks_factory'], function (CourseBookmarksFactory) { CourseBookmarksFactory({ $el: $(".course-bookmarks"), - courseId: '${six.text_type(course.id) | n, js_escaped_string}', + courseId: '${str(course.id) | n, js_escaped_string}', bookmarksApiUrl: '${bookmarks_api_url | n, js_escaped_string}', }); }); diff --git a/openedx/features/course_bookmarks/views/course_bookmarks.py b/openedx/features/course_bookmarks/views/course_bookmarks.py index b5a98e048381d021138122f647860f14edc5afb9..a60f11bba676a29d6c931afdab44edf3020456c9 100644 --- a/openedx/features/course_bookmarks/views/course_bookmarks.py +++ b/openedx/features/course_bookmarks/views/course_bookmarks.py @@ -3,7 +3,6 @@ Views to show a course's bookmarks. """ -import six from django.contrib.auth.decorators import login_required from django.shortcuts import render_to_response from django.template.context_processors import csrf diff --git a/openedx/features/course_duration_limits/tests/test_course_expiration.py b/openedx/features/course_duration_limits/tests/test_course_expiration.py index 54470bb702086f5702ce66019a73f3548ce0b480..8040cf84382c6515eae968cd9f477633e1c8958a 100644 --- a/openedx/features/course_duration_limits/tests/test_course_expiration.py +++ b/openedx/features/course_duration_limits/tests/test_course_expiration.py @@ -6,7 +6,6 @@ from datetime import timedelta from unittest import mock import ddt -import six from django.conf import settings from django.urls import reverse from django.utils.timezone import now diff --git a/openedx/features/course_experience/tests/views/test_course_outline.py b/openedx/features/course_experience/tests/views/test_course_outline.py index 888c47a59eb3b47c3111971c8fb6f44761292a44..2368d20f9bf881bc66766ddbc935619a7729f19b 100644 --- a/openedx/features/course_experience/tests/views/test_course_outline.py +++ b/openedx/features/course_experience/tests/views/test_course_outline.py @@ -34,7 +34,7 @@ from lms.djangoapps.experiments.testutils import override_experiment_waffle_flag from lms.urls import RESET_COURSE_DEADLINES_NAME from openedx.core.djangoapps.course_date_signals.models import SelfPacedRelativeDatesConfig from openedx.core.djangoapps.schedules.models import Schedule -from openedx.core.djangoapps.schedules.tests.factories import ScheduleFactory +from openedx.core.djangoapps.schedules.tests.factories import ScheduleFactory # pylint: disable=unused-import from openedx.core.lib.gating import api as gating_api from openedx.features.content_type_gating.models import ContentTypeGatingConfig from openedx.features.course_experience import RELATIVE_DATES_FLAG diff --git a/openedx/features/course_search/views/course_search.py b/openedx/features/course_search/views/course_search.py index d9c2f11ed8468490ed395a3f80b0a976727a5892..369a711b0f9b477e720684f6a0427f0bedf46e2b 100644 --- a/openedx/features/course_search/views/course_search.py +++ b/openedx/features/course_search/views/course_search.py @@ -3,7 +3,6 @@ Views for the course search page. """ -import six from django.contrib.auth.decorators import login_required from django.template.context_processors import csrf from django.template.loader import render_to_string diff --git a/openedx/features/discounts/utils.py b/openedx/features/discounts/utils.py index c5a3e71036bbfbbf7d999eb739bb9a37f3e373db..f11e409bc6104984cfebc1d3b93c917a614828f5 100644 --- a/openedx/features/discounts/utils.py +++ b/openedx/features/discounts/utils.py @@ -5,7 +5,6 @@ Utility functions for working with discounts and discounted pricing. from datetime import datetime import pytz -import six from django.utils.translation import get_language from django.utils.translation import ugettext as _ from edx_django_utils.cache import RequestCache diff --git a/openedx/features/enterprise_support/signals.py b/openedx/features/enterprise_support/signals.py index c7f9bcc5e9fce3e30c2d33ff4154ad65f960d260..d49c717d1491f6db4897a999c981791af3871bf3 100644 --- a/openedx/features/enterprise_support/signals.py +++ b/openedx/features/enterprise_support/signals.py @@ -5,7 +5,6 @@ This module contains signals related to enterprise. import logging -import six from django.conf import settings from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.db.models.signals import post_save, pre_save