Skip to content

Commit

Permalink
Run 2to3 -f future . -w
Browse files Browse the repository at this point in the history
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
  • Loading branch information
feanil committed Dec 30, 2019
1 parent 52a1a72 commit 9cf2f9f
Show file tree
Hide file tree
Showing 2,829 changed files with 2,851 additions and 2,851 deletions.
2 changes: 1 addition & 1 deletion cms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Celery needs to be loaded when the cms modules are so that task
registration and discovery can work correctly.
"""
from __future__ import absolute_import


# We monkey patch Kombu's entrypoints listing because scanning through this
# accounts for the majority of LMS/Studio startup time for tests, and we don't
Expand Down
2 changes: 1 addition & 1 deletion cms/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Taken from: https://celery.readthedocs.org/en/latest/django/first-steps-with-django.html
"""
from __future__ import absolute_import


import os

Expand Down
2 changes: 1 addition & 1 deletion cms/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
only running cms tests.
"""

from __future__ import absolute_import, unicode_literals


import importlib
import os
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/api/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Configuration for Studio API Django application
"""

from __future__ import absolute_import


from django.apps import AppConfig

Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
URLs for the Studio API app
"""

from __future__ import absolute_import


from django.conf.urls import include, url

Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/api/v1/serializers/course_runs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
""" Course run serializers. """
from __future__ import absolute_import


import logging
import time # pylint: disable=unused-import
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Tests for course run serializers"""

from __future__ import absolute_import


import datetime

Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/api/v1/tests/test_views/test_course_runs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Tests for Course run views"""

from __future__ import absolute_import


import datetime

Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/api/v1/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
URLs for the Studio API [Course Run]
"""

from __future__ import absolute_import


from rest_framework.routers import DefaultRouter

Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/api/v1/views/course_runs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""HTTP endpoints for the Course Run API."""

from __future__ import absolute_import


from django.conf import settings
from django.http import Http404
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/cms_user_tasks/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Signal handlers are connected here.
"""

from __future__ import absolute_import


from django.apps import AppConfig

Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/cms_user_tasks/signals.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Receivers of signals sent from django-user-tasks
"""
from __future__ import absolute_import, print_function, unicode_literals


import logging

Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/cms_user_tasks/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Celery tasks used by cms_user_tasks
"""

from __future__ import absolute_import


from boto.exception import NoAuthHandlerFound
from celery.exceptions import MaxRetriesExceededError
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/cms_user_tasks/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Unit tests for integration of the django-user-tasks app and its REST API.
"""

from __future__ import absolute_import, print_function, unicode_literals


import logging
from uuid import uuid4
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Admin site bindings for contentstore
"""

from __future__ import absolute_import


from config_models.admin import ConfigurationModelAdmin
from django.contrib import admin
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/api/tests/base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Base test case for the course API views.
"""
from __future__ import absolute_import


from django.core.urlresolvers import reverse
from rest_framework.test import APITestCase
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/api/tests/test_import.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Tests for the course import API views
"""
from __future__ import absolute_import


import os
import tarfile
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/api/tests/test_quality.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Tests for the course import API views
"""
from __future__ import absolute_import


from rest_framework import status

Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/api/tests/test_validation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Tests for the course import API views
"""
from __future__ import absolute_import


from datetime import datetime

Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/api/urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
""" Course API URLs. """
from __future__ import absolute_import


from django.conf import settings
from django.conf.urls import url
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/api/views/course_import.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
APIs related to Course Import.
"""
from __future__ import absolute_import


import base64
import logging
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/api/views/course_quality.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# pylint: disable=missing-docstring
from __future__ import absolute_import


import logging
import time
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/api/views/course_validation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# pylint: disable=missing-docstring
from __future__ import absolute_import


import logging

Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/api/views/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Common utilities for Contentstore APIs.
"""
from __future__ import absolute_import


from contextlib import contextmanager

Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Above-modulestore level signal handlers are connected here.
"""

from __future__ import absolute_import


from django.apps import AppConfig

Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/config/waffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This module contains various configuration settings via
waffle switches for the contentstore app.
"""
from __future__ import absolute_import


from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag, WaffleFlagNamespace, WaffleSwitchNamespace

Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/config/waffle_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Util methods for Waffle checks"""

from __future__ import absolute_import


from cms.djangoapps.contentstore.config.waffle import ENABLE_CHECKLISTS_QUALITY

Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/course_group_config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Class for manipulating groups configuration on a course object.
"""
from __future__ import absolute_import


import json
import logging
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/course_info_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
"""

from __future__ import absolute_import


import logging
import re
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/courseware_index.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
""" Code to allow module store to interface with courseware index """
from __future__ import absolute_import


import logging
import re
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/debug_file_uploader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" Upload file handler to help test progress bars in uploads. """

from __future__ import absolute_import


import time

Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/git_export_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
committing and pushing the changes.
"""

from __future__ import absolute_import


import logging
import os
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
erroneous certificate names.
"""

from __future__ import absolute_import


from collections import namedtuple

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Script for removing all redundant Mac OS metadata files (with filename ".DS_Store"
or with filename which starts with "._") for all courses
"""
from __future__ import absolute_import


import logging

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Django management command to create a course in a specific modulestore
"""
from __future__ import absolute_import


from datetime import datetime, timedelta

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Management Command to delete course.
"""
from __future__ import absolute_import, print_function


from django.core.management.base import BaseCommand, CommandError
from opaque_keys import InvalidKeyError
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Script for deleting orphans"""
from __future__ import absolute_import, print_function


from django.core.management.base import BaseCommand, CommandError
from opaque_keys import InvalidKeyError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Run it this way:
# ./manage.py cms --settings dev edit_course_tabs --course Stanford/CS99/2013_spring
#
from __future__ import absolute_import, print_function


from django.core.management.base import BaseCommand, CommandError
from opaque_keys.edx.keys import CourseKey
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Script to Empty the trashcan"""

from __future__ import absolute_import


from django.core.management.base import BaseCommand
from opaque_keys.edx.keys import CourseKey
Expand Down
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/management/commands/export.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Script for exporting courseware from Mongo to a tar.gz file
"""
from __future__ import absolute_import, print_function


import os

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Script for exporting all courseware from Mongo to a directory and listing the courses which failed to export
"""
from __future__ import absolute_import, print_function


from django.core.management.base import BaseCommand
from six import text_type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Script for exporting a content library from Mongo to a tar.gz file
"""
from __future__ import absolute_import, print_function


import os
import shutil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* It only supports the export of courses. It does not export libraries.
"""

from __future__ import absolute_import


import os
import re
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Script for fixing the item not found errors in a course
"""
from __future__ import absolute_import


from django.core.management.base import BaseCommand, CommandError
from opaque_keys.edx.keys import CourseKey
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Script for force publishing a course
"""
from __future__ import absolute_import, print_function


from django.core.management.base import BaseCommand, CommandError
from opaque_keys import InvalidKeyError
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Django management command to generate a test course from a course config json
"""
from __future__ import absolute_import


import json
import logging
Expand Down
Loading

0 comments on commit 9cf2f9f

Please sign in to comment.