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:
@@ -1,7 +1,7 @@
|
||||
"""
|
||||
Configuration for the openedx.core.djangoapps.util Django application
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""
|
||||
View decorator to add a maintenance banner configured in settings.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
||||
from functools import wraps
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""
|
||||
Code to get ip from request.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
||||
from ipware.ip import get_ip
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Signal handler for exceptions.
|
||||
"""
|
||||
# pylint: disable=unused-argument
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
||||
import logging
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
|
||||
import pytest
|
||||
from django.core.management import CommandError, call_command
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# pylint: disable=no-member, missing-docstring
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
||||
from unittest import TestCase
|
||||
from pytest import mark
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Unit tests for user messages.
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
||||
import ddt
|
||||
from django.contrib.messages.middleware import MessageMiddleware
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Tests for util.user_utils module."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""
|
||||
Waffle flags and switches
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
||||
from openedx.core.djangoapps.waffle_utils import WaffleSwitchNamespace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user