From 926cb5bb89493329ba783cecdd22b53c35642966 Mon Sep 17 00:00:00 2001 From: Ana Maria Rodriguez Date: Wed, 24 Apr 2019 13:38:12 -0500 Subject: [PATCH] INCR-165 Run python-modernize -w openedx/core/djangoapps/plugins --- openedx/core/djangoapps/plugins/apps.py | 1 + openedx/core/djangoapps/plugins/plugin_apps.py | 1 + openedx/core/djangoapps/plugins/plugin_settings.py | 1 + openedx/core/djangoapps/plugins/plugin_signals.py | 1 + openedx/core/djangoapps/plugins/plugin_urls.py | 1 + openedx/core/djangoapps/plugins/registry.py | 4 +++- openedx/core/djangoapps/plugins/utils.py | 1 + 7 files changed, 9 insertions(+), 1 deletion(-) diff --git a/openedx/core/djangoapps/plugins/apps.py b/openedx/core/djangoapps/plugins/apps.py index 7f67af0deb..41d42b5154 100644 --- a/openedx/core/djangoapps/plugins/apps.py +++ b/openedx/core/djangoapps/plugins/apps.py @@ -4,6 +4,7 @@ Plugins Application Configuration Signal handlers are connected here. """ +from __future__ import absolute_import from django.apps import AppConfig from django.conf import settings from . import constants, plugin_signals diff --git a/openedx/core/djangoapps/plugins/plugin_apps.py b/openedx/core/djangoapps/plugins/plugin_apps.py index 8ded7ebee1..1b64ffb632 100644 --- a/openedx/core/djangoapps/plugins/plugin_apps.py +++ b/openedx/core/djangoapps/plugins/plugin_apps.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import from logging import getLogger from . import constants, registry diff --git a/openedx/core/djangoapps/plugins/plugin_settings.py b/openedx/core/djangoapps/plugins/plugin_settings.py index e33ca97e02..5cea7ccc90 100644 --- a/openedx/core/djangoapps/plugins/plugin_settings.py +++ b/openedx/core/djangoapps/plugins/plugin_settings.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import from logging import getLogger from . import constants, registry, utils diff --git a/openedx/core/djangoapps/plugins/plugin_signals.py b/openedx/core/djangoapps/plugins/plugin_signals.py index 088ca077ff..1540f71756 100644 --- a/openedx/core/djangoapps/plugins/plugin_signals.py +++ b/openedx/core/djangoapps/plugins/plugin_signals.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import from logging import getLogger from . import constants, registry, utils diff --git a/openedx/core/djangoapps/plugins/plugin_urls.py b/openedx/core/djangoapps/plugins/plugin_urls.py index f15a47d0cb..da31a91df7 100644 --- a/openedx/core/djangoapps/plugins/plugin_urls.py +++ b/openedx/core/djangoapps/plugins/plugin_urls.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import from logging import getLogger from django.conf.urls import include, url from . import constants, registry, utils diff --git a/openedx/core/djangoapps/plugins/registry.py b/openedx/core/djangoapps/plugins/registry.py index 5b21d5fcae..105b535053 100644 --- a/openedx/core/djangoapps/plugins/registry.py +++ b/openedx/core/djangoapps/plugins/registry.py @@ -1,4 +1,6 @@ +from __future__ import absolute_import from openedx.core.lib.plugins import PluginManager +import six class DjangoAppRegistry(PluginManager): @@ -9,4 +11,4 @@ class DjangoAppRegistry(PluginManager): def get_app_configs(project_type): - return DjangoAppRegistry.get_available_plugins(project_type).itervalues() + return six.itervalues(DjangoAppRegistry.get_available_plugins(project_type)) diff --git a/openedx/core/djangoapps/plugins/utils.py b/openedx/core/djangoapps/plugins/utils.py index 131b24d376..19fcc6f5f1 100644 --- a/openedx/core/djangoapps/plugins/utils.py +++ b/openedx/core/djangoapps/plugins/utils.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import from importlib import import_module as system_import_module from django.utils.module_loading import import_string