Skip to content
Snippets Groups Projects
Unverified Commit a787cd51 authored by Manjinder Singh's avatar Manjinder Singh Committed by GitHub
Browse files

Merge pull request #20801 from edx/msingh/INCR-482

INCR-482: ran python modernization and isort
parents cac4ec00 215dde1e
Branches
Tags
No related merge requests found
......@@ -11,11 +11,16 @@ support both generating static assets to a directory and also serving static
from the same directory.
"""
from __future__ import absolute_import
# Silence noisy logs
import logging
import os
from path import Path as path
from tempfile import mkdtemp
from django.utils.translation import ugettext_lazy
from path import Path as path
from openedx.core.release import RELEASE_LINE
CONFIG_ROOT = path(__file__).abspath().dirname()
......@@ -32,7 +37,6 @@ os.environ['CONFIG_ROOT'] = CONFIG_ROOT
os.environ['LMS_CFG'] = str.format("{config_root}/{service_variant}.yml",
config_root=os.environ['CONFIG_ROOT'], service_variant=os.environ['SERVICE_VARIANT'])
from .production import * # pylint: disable=wildcard-import, unused-wildcard-import, wrong-import-position
......@@ -122,15 +126,11 @@ XQUEUE_INTERFACE['url'] = 'http://localhost:8040'
EDXNOTES_PUBLIC_API = 'http://localhost:8042/api/v1'
EDXNOTES_INTERNAL_API = 'http://localhost:8042/api/v1'
EDXNOTES_CONNECT_TIMEOUT = 10 # time in seconds
EDXNOTES_READ_TIMEOUT = 10 # time in seconds
NOTES_DISABLED_TABS = []
# Silence noisy logs
import logging
LOG_OVERRIDES = [
('track.middleware', logging.CRITICAL),
('edxmako.shortcuts', logging.ERROR),
......
"""
Specific overrides to the base prod settings to make development easier.
"""
from __future__ import absolute_import
# Silence noisy logs
import logging
from os.path import abspath, dirname, join
from corsheaders.defaults import default_headers as corsheaders_default_headers
# pylint: enable=unicode-format-string
#####################################################################
from openedx.core.djangoapps.plugins import constants as plugin_constants
from openedx.core.djangoapps.plugins import plugin_settings
from .production import * # pylint: disable=wildcard-import, unused-wildcard-import
# Don't use S3 in devstack, fall back to filesystem
......@@ -31,8 +40,6 @@ IDA_LOGOUT_URI_LIST = [
################################ LOGGERS ######################################
# Silence noisy logs
import logging
LOG_OVERRIDES = [
('track.contexts', logging.CRITICAL),
('track.middleware', logging.CRITICAL),
......@@ -260,9 +267,6 @@ JWT_AUTH.update({
'y5ZLcTUomo4rZLjghVpq6KZxfS6I1Vz79ZsMVUWEdXOYePCKKsrQG20ogQEkmTf9FT_SouC6jPcHLXw"}]}'
),
})
# pylint: enable=unicode-format-string
#####################################################################
from openedx.core.djangoapps.plugins import plugin_settings, constants as plugin_constants
plugin_settings.add_plugins(__name__, plugin_constants.ProjectType.LMS, plugin_constants.SettingsType.DEVSTACK)
......
......@@ -18,6 +18,8 @@ as they are for non-optimized devstack. Instead, update_assets must be
invoked each time that changes have been made.
"""
from __future__ import absolute_import
import os
########################## Devstack settings ###################################
......
......@@ -11,6 +11,8 @@ In two separate processes on devstack:
./manage.py lms celery worker --settings=devstack_with_worker
"""
from __future__ import absolute_import
import os
# We intentionally define lots of variables that aren't used, and
......
......@@ -12,10 +12,13 @@ sessions. Assumes structure:
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
from .common import *
from __future__ import absolute_import
from openedx.core.lib.derived import derive_settings
from openedx.core.lib.logsettings import get_logger_config
from .common import *
STATIC_GRAB = True
LOGGING = get_logger_config(ENV_ROOT / "log",
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment