Run 2to3 -f future . -w

This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
This commit is contained in:
Feanil Patel
2019-12-30 10:35:30 -05:00
parent 52a1a72c97
commit 9cf2f9f298
2829 changed files with 2851 additions and 2851 deletions

View File

@@ -1,7 +1,7 @@
"""
Django Admin for Block Structures.
"""
from __future__ import absolute_import
from config_models.admin import ConfigurationModelAdmin
from django.contrib import admin

View File

@@ -1,7 +1,7 @@
"""
Higher order functions built on the BlockStructureManager to interact with a django cache.
"""
from __future__ import absolute_import
from django.core.cache import cache

View File

@@ -2,7 +2,7 @@
Configuration for block_structure djangoapp
"""
from __future__ import absolute_import
from django.apps import AppConfig

View File

@@ -8,7 +8,7 @@ The following internal data structures are implemented:
_BlockRelations - Data structure for a single block's relations.
_BlockData - Data structure for a single block's data.
"""
from __future__ import absolute_import
from copy import deepcopy
from functools import partial

View File

@@ -2,7 +2,7 @@
This module contains various configuration settings via
waffle switches for the Block Structure framework.
"""
from __future__ import absolute_import
from openedx.core.djangoapps.waffle_utils import WaffleSwitchNamespace
from openedx.core.lib.cache_utils import request_cached

View File

@@ -1,7 +1,7 @@
"""
Models for configuration of Block Structures.
"""
from __future__ import absolute_import
from config_models.models import ConfigurationModel
from django.db.models import IntegerField

View File

@@ -1,7 +1,7 @@
"""
Command to load course blocks.
"""
from __future__ import absolute_import
import logging

View File

@@ -1,7 +1,7 @@
"""
Tests for generate_course_blocks management command.
"""
from __future__ import absolute_import
import itertools

View File

@@ -2,7 +2,7 @@
Top-level module for the Block Structure framework with a class for managing
BlockStructures.
"""
from __future__ import absolute_import
from contextlib import contextmanager

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.db import migrations, models
import django.db.models.deletion

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.db import migrations, models
import django.utils.timezone

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.db import migrations, models
import openedx.core.djangoapps.content.block_structure.models

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.db import migrations, models
import openedx.core.djangoapps.xmodule_django.models

View File

@@ -2,7 +2,7 @@
Models used by the block structure framework.
"""
from __future__ import absolute_import
import errno
from contextlib import contextmanager

View File

@@ -1,7 +1,7 @@
"""
Signal handlers for invalidating cached data.
"""
from __future__ import absolute_import
import six
from django.conf import settings

View File

@@ -2,7 +2,7 @@
Module for the Storage of BlockStructure objects.
"""
# pylint: disable=protected-access
from __future__ import absolute_import
from logging import getLogger

View File

@@ -1,7 +1,7 @@
"""
Asynchronous tasks related to the Course Blocks sub-application.
"""
from __future__ import absolute_import
import logging

View File

@@ -1,7 +1,7 @@
"""
Common utilities for tests in block_structure module
"""
from __future__ import absolute_import
from contextlib import contextmanager
from uuid import uuid4

View File

@@ -1,7 +1,7 @@
"""
Tests for block_structure.py
"""
from __future__ import absolute_import
import itertools
# pylint: disable=protected-access

View File

@@ -1,7 +1,7 @@
"""
Tests for block_structure_factory.py
"""
from __future__ import absolute_import
from django.test import TestCase

View File

@@ -1,7 +1,7 @@
"""
Tests for manager.py
"""
from __future__ import absolute_import
import ddt
import six

View File

@@ -2,7 +2,7 @@
Unit tests for Block Structure models.
"""
# pylint: disable=protected-access
from __future__ import absolute_import
import errno
from itertools import product

View File

@@ -1,7 +1,7 @@
"""
Unit tests for the Course Blocks signals
"""
from __future__ import absolute_import
import ddt
from mock import patch

View File

@@ -1,7 +1,7 @@
"""
Tests for block_structure/cache.py
"""
from __future__ import absolute_import
import ddt

View File

@@ -2,7 +2,7 @@
Unit tests for the Course Blocks tasks
"""
from __future__ import absolute_import
from mock import patch

View File

@@ -2,7 +2,7 @@
Tests for transformer_registry.py
"""
from __future__ import absolute_import
from unittest import TestCase

View File

@@ -1,7 +1,7 @@
"""
Tests for transformers.py
"""
from __future__ import absolute_import
from unittest import TestCase

View File

@@ -2,7 +2,7 @@
This module provides the abstract base class for all Block Structure
Transformers.
"""
from __future__ import absolute_import
from abc import abstractmethod

View File

@@ -2,7 +2,7 @@
Block Structure Transformer Registry implemented using the platform's
PluginManager.
"""
from __future__ import absolute_import
from base64 import b64encode
from hashlib import sha1

View File

@@ -1,7 +1,7 @@
"""
Module for a collection of BlockStructureTransformers.
"""
from __future__ import absolute_import
import functools
from logging import getLogger

View File

@@ -3,7 +3,7 @@ Django admin page for CourseOverviews, the basic metadata about a course that
is used in user dashboard queries and other places where you need info like
name, and start dates, but don't actually need to crawl into course content.
"""
from __future__ import absolute_import
from config_models.admin import ConfigurationModelAdmin
from django.contrib import admin

View File

@@ -1,7 +1,7 @@
"""
Configuration for course_overviews Django app
"""
from __future__ import absolute_import
from django.apps import AppConfig

View File

@@ -2,7 +2,7 @@
Command to load course overviews.
"""
from __future__ import absolute_import
import logging

View File

@@ -11,7 +11,7 @@ This management command will emit the SignalHandler.course_published signal for
some subset of courses and signal listeners, and then rely on existing listener
behavior to trigger the necessary data updates.
"""
from __future__ import absolute_import, print_function
import copy
import logging

View File

@@ -1,7 +1,7 @@
"""
Tests that the generate_course_overview management command actually generates course overviews.
"""
from __future__ import absolute_import
import six
from django.core.management.base import CommandError

View File

@@ -1,7 +1,7 @@
"""
Tests the simulate_publish management command.
"""
from __future__ import absolute_import
import six

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.db import migrations, models
import django.utils.timezone

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.db import migrations, models

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.db import migrations, models
import django.utils.timezone
import model_utils.fields

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.db import migrations, models

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.db import migrations, models

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.db import migrations, models
import django.utils.timezone

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.db import migrations, models
import django.db.models.deletion

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.db import migrations, models

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.db import migrations, models, connection

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.db import migrations, models

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.db import migrations, models

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.db import migrations, models

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.db import migrations, models

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.db import migrations, models

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-05-30 21:13
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.23 on 2019-09-16 10:45
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-10-02 08:23
from __future__ import unicode_literals
from django.db import migrations, models

View File

@@ -1,7 +1,7 @@
"""
Declaration of CourseOverview model
"""
from __future__ import absolute_import
import json
import logging

View File

@@ -1,7 +1,7 @@
"""
Signal handler for invalidating cached course overviews
"""
from __future__ import absolute_import
import logging

View File

@@ -1,4 +1,4 @@
from __future__ import absolute_import
import logging

View File

@@ -1,4 +1,4 @@
from __future__ import absolute_import
from datetime import timedelta
import json

View File

@@ -1,7 +1,7 @@
"""
Tests for course_overviews app.
"""
from __future__ import absolute_import
import datetime
import itertools

View File

@@ -1,4 +1,4 @@
from __future__ import absolute_import
import datetime

View File

@@ -1,4 +1,4 @@
from __future__ import absolute_import
import mock
import six