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 @@
"""
Configuration for the openedx.core.djangoapps.util Django application
"""
from __future__ import absolute_import
from django.apps import AppConfig

View File

@@ -1,7 +1,7 @@
"""
Custom forms-related types
"""
from __future__ import absolute_import
from django.core.exceptions import ValidationError
from django.forms import Field, MultipleHiddenInput, NullBooleanField, Select

View File

@@ -3,7 +3,7 @@ Django-based logging utilities
UserIdFilter: A logging.Filter that adds userid to the logging context
"""
from __future__ import absolute_import
from logging import Filter

View File

@@ -1,7 +1,7 @@
"""
View decorator to add a maintenance banner configured in settings.
"""
from __future__ import absolute_import
from functools import wraps

View File

@@ -9,7 +9,7 @@ Useful when paver or a shell script needs such a value.
This handles the one specific use case of the "print_settings" command from
django-extensions that we were actually using.
"""
from __future__ import absolute_import, print_function
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError

View File

@@ -12,7 +12,7 @@ django-extensions that we were actually using.
originally from http://www.djangosnippets.org/snippets/828/ by dnordberg
"""
from __future__ import absolute_import, print_function
import logging

View File

@@ -4,7 +4,7 @@ Django management command to update the loaded test fixtures as necessary for
the current test environment. Currently just sets an appropriate domain for
each Site fixture.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import os

View File

@@ -1,7 +1,7 @@
"""
Code to get ip from request.
"""
from __future__ import absolute_import
from ipware.ip import get_ip

View File

@@ -1,7 +1,7 @@
"""
Code to delete rows from a table within a Django mgmt command using best practices.
"""
from __future__ import absolute_import
import logging
import time

View File

@@ -2,7 +2,7 @@
Signal handler for exceptions.
"""
# pylint: disable=unused-argument
from __future__ import absolute_import
import logging

View File

@@ -1,5 +1,5 @@
""" Mixins for setting up particular course structures (such as split tests or cohorted content) """
from __future__ import absolute_import
from datetime import datetime

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import pytest
from django.core.management import CommandError, call_command

View File

@@ -1,5 +1,5 @@
# pylint: disable=no-member, missing-docstring
from __future__ import absolute_import
from unittest import TestCase
from pytest import mark

View File

@@ -3,7 +3,7 @@
Tests of the update_fixtures management command for bok-choy test database
initialization.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import os

View File

@@ -2,7 +2,7 @@
Unit tests for user messages.
"""
from __future__ import absolute_import
import ddt
from django.contrib.messages.middleware import MessageMiddleware

View File

@@ -1,6 +1,6 @@
"""Tests for util.user_utils module."""
from __future__ import absolute_import
import unittest

View File

@@ -13,7 +13,7 @@ There are two common use cases:
the message will be shown on the subsequent page. This is typically
used to show a success message to the use.
"""
from __future__ import absolute_import
from abc import abstractmethod
from enum import Enum

View File

@@ -1,7 +1,7 @@
"""
Custom user-related utility code.
"""
from __future__ import absolute_import
from django.utils.encoding import python_2_unicode_compatible
from django.contrib.auth.models import AnonymousUser

View File

@@ -1,7 +1,7 @@
"""
Waffle flags and switches
"""
from __future__ import absolute_import
from openedx.core.djangoapps.waffle_utils import WaffleSwitchNamespace