From c870ec3872fcc264045744bab976c31f0205a932 Mon Sep 17 00:00:00 2001 From: Joseph Mulloy Date: Mon, 1 Oct 2018 12:19:12 -0400 Subject: [PATCH] Fix pylint warnings OPS-3450 --- cms/envs/aws.py | 13 +++++++------ cms/envs/production.py | 13 +++++++------ lms/envs/aws.py | 15 ++++++++------- lms/envs/production.py | 13 +++++++------ 4 files changed, 29 insertions(+), 25 deletions(-) diff --git a/cms/envs/aws.py b/cms/envs/aws.py index 6cf09b1ce2..4e9ae5dcdf 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -7,11 +7,6 @@ This is the default template for our main set of AWS servers. # pylint: disable=wildcard-import, unused-wildcard-import import json - -from .common import * - -from openedx.core.lib.derived import derive_settings -from openedx.core.lib.logsettings import get_logger_config import os import logging import logging.config @@ -19,6 +14,11 @@ import logging.config from path import Path as path from xmodule.modulestore.modulestore_settings import convert_module_store_setting_if_needed +from .common import * + +from openedx.core.lib.derived import derive_settings # pylint: disable=wrong-import-order +from openedx.core.lib.logsettings import get_logger_config # pylint: disable=wrong-import-order + # SERVICE_VARIANT specifies name of the variant used, which decides what JSON # configuration files are read during startup. SERVICE_VARIANT = os.environ.get('SERVICE_VARIANT', None) @@ -601,7 +601,8 @@ COURSE_ENROLLMENT_MODES = ENV_TOKENS.get('COURSE_ENROLLMENT_MODES', COURSE_ENROL ####################### Plugin Settings ########################## -from openedx.core.djangoapps.plugins import plugin_settings, constants as plugin_constants +# This is at the bottom because it is going to load more settings after base settings are loaded +from openedx.core.djangoapps.plugins import plugin_settings, constants as plugin_constants # pylint: disable=wrong-import-order, wrong-import-position plugin_settings.add_plugins(__name__, plugin_constants.ProjectType.CMS, plugin_constants.SettingsType.AWS) ########################## Derive Any Derived Settings ####################### diff --git a/cms/envs/production.py b/cms/envs/production.py index fa3c8b1d27..22f780002d 100644 --- a/cms/envs/production.py +++ b/cms/envs/production.py @@ -7,16 +7,16 @@ This is the default template for our main set of AWS servers. # pylint: disable=wildcard-import, unused-wildcard-import import json - -from .common import * - -from openedx.core.lib.derived import derive_settings -from openedx.core.lib.logsettings import get_logger_config import os from path import Path as path from xmodule.modulestore.modulestore_settings import convert_module_store_setting_if_needed +from .common import * + +from openedx.core.lib.derived import derive_settings # pylint: disable=wrong-import-order +from openedx.core.lib.logsettings import get_logger_config # pylint: disable=wrong-import-order + # SERVICE_VARIANT specifies name of the variant used, which decides what JSON # configuration files are read during startup. SERVICE_VARIANT = os.environ.get('SERVICE_VARIANT', None) @@ -599,7 +599,8 @@ COURSE_ENROLLMENT_MODES = ENV_TOKENS.get('COURSE_ENROLLMENT_MODES', COURSE_ENROL ####################### Plugin Settings ########################## -from openedx.core.djangoapps.plugins import plugin_settings, constants as plugin_constants +# This is at the bottom because it is going to load more settings after base settings are loaded +from openedx.core.djangoapps.plugins import plugin_settings, constants as plugin_constants # pylint: disable=wrong-import-order, wrong-import-position plugin_settings.add_plugins(__name__, plugin_constants.ProjectType.CMS, plugin_constants.SettingsType.AWS) ########################## Derive Any Derived Settings ####################### diff --git a/lms/envs/aws.py b/lms/envs/aws.py index 7bae6dfd7f..45c98e8fd1 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -19,19 +19,19 @@ Common traits: import datetime import json - -import dateutil - -from .common import * -from openedx.core.lib.derived import derive_settings -from openedx.core.lib.logsettings import get_logger_config import os import logging import logging.config +import dateutil from path import Path as path from xmodule.modulestore.modulestore_settings import convert_module_store_setting_if_needed +from .common import * + +from openedx.core.lib.derived import derive_settings # pylint: disable=wrong-import-order +from openedx.core.lib.logsettings import get_logger_config # pylint: disable=wrong-import-order + # SERVICE_VARIANT specifies name of the variant used, which decides what JSON # configuration files are read during startup. SERVICE_VARIANT = os.environ.get('SERVICE_VARIANT', None) @@ -1100,7 +1100,8 @@ COURSE_ENROLLMENT_MODES = ENV_TOKENS.get('COURSE_ENROLLMENT_MODES', COURSE_ENROL ############################### Plugin Settings ############################### -from openedx.core.djangoapps.plugins import plugin_settings, constants as plugin_constants +# This is at the bottom because it is going to load more settings after base settings are loaded +from openedx.core.djangoapps.plugins import plugin_settings, constants as plugin_constants # pylint: disable=wrong-import-order, wrong-import-position plugin_settings.add_plugins(__name__, plugin_constants.ProjectType.LMS, plugin_constants.SettingsType.AWS) ########################## Derive Any Derived Settings ####################### diff --git a/lms/envs/production.py b/lms/envs/production.py index 53d7a5e433..d09b5a3b74 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -20,16 +20,16 @@ Common traits: import datetime import json -import dateutil - -from .common import * -from openedx.core.lib.derived import derive_settings -from openedx.core.lib.logsettings import get_logger_config import os +import dateutil from path import Path as path from xmodule.modulestore.modulestore_settings import convert_module_store_setting_if_needed +from .common import * +from openedx.core.lib.derived import derive_settings # pylint: disable=wrong-import-order +from openedx.core.lib.logsettings import get_logger_config # pylint: disable=wrong-import-order + # SERVICE_VARIANT specifies name of the variant used, which decides what JSON # configuration files are read during startup. SERVICE_VARIANT = os.environ.get('SERVICE_VARIANT', None) @@ -1098,7 +1098,8 @@ COURSE_ENROLLMENT_MODES = ENV_TOKENS.get('COURSE_ENROLLMENT_MODES', COURSE_ENROL ############################### Plugin Settings ############################### -from openedx.core.djangoapps.plugins import plugin_settings, constants as plugin_constants +# This is at the bottom because it is going to load more settings after base settings are loaded +from openedx.core.djangoapps.plugins import plugin_settings, constants as plugin_constants # pylint: disable=wrong-import-order, wrong-import-position plugin_settings.add_plugins(__name__, plugin_constants.ProjectType.LMS, plugin_constants.SettingsType.AWS) ########################## Derive Any Derived Settings #######################