Commit 6daf9df0 by Tyler Hallada

Disable pylint errors in cms/envs/

parent e0ef561c
......@@ -7,6 +7,10 @@ so that we can run the lettuce acceptance tests.
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
# For Django settings files, the order of imports matters,
# because each import can override variables in previous imports.
# pylint: disable=wrong-import-order, wrong-import-position
from .test import *
from lms.envs.sauce import *
......@@ -27,6 +31,7 @@ import os
def seed():
return os.getppid()
# Silence noisy logs
LOG_OVERRIDES = [
('track.middleware', logging.CRITICAL),
......@@ -132,7 +137,7 @@ SELENIUM_GRID = {
#####################################################################
# Lastly, see if the developer has any local overrides.
try:
from .private import * # pylint: disable=import-error
from .private import *
except ImportError:
pass
......
......@@ -3,6 +3,10 @@ This config file extends the test environment configuration
so that we can run the lettuce acceptance tests.
"""
# For Django settings files, the order of imports matters,
# because each import can override variables in previous imports.
# pylint: disable=wrong-import-position
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
......
"""
This is the settings file used during execution of the analytics-exporter job.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
from .aws import *
ENABLE_COMPREHENSIVE_THEMING = False
......@@ -2,15 +2,14 @@
This is the default template for our main set of AWS servers.
"""
# For Django settings files, the order of imports matters,
# because each import can override variables in previous imports.
# pylint: disable=wrong-import-order
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
# Pylint gets confused by path.py instances, which report themselves as class
# objects. As a result, pylint applies the wrong regex in validating names,
# and throws spurious errors. Therefore, we disable invalid-name checking.
# pylint: disable=invalid-name
import json
from .common import *
......
......@@ -10,6 +10,14 @@ support both generating static assets to a directory and also serving static
from the same directory.
"""
# For Django settings files, the order of imports matters,
# because each import can override variables in previous imports.
# pylint: disable=wrong-import-order, wrong-import-position
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
import os
from path import Path as path
......@@ -24,7 +32,7 @@ from openedx.core.release import RELEASE_LINE
os.environ['SERVICE_VARIANT'] = 'bok_choy_docker' if 'BOK_CHOY_HOSTNAME' in os.environ else 'bok_choy'
os.environ['CONFIG_ROOT'] = path(__file__).abspath().dirname()
from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import
from .aws import *
######################### Testing overrides ####################################
......@@ -147,6 +155,6 @@ if RELEASE_LINE == "master":
#####################################################################
# Lastly, see if the developer has any local overrides.
try:
from .private import * # pylint: disable=import-error
from .private import *
except ImportError:
pass
......@@ -3,8 +3,12 @@
Settings for Bok Choy tests that are used when running Studio in Docker-based devstack.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
# noinspection PyUnresolvedReferences
from .bok_choy import * # pylint: disable=wildcard-import
from .bok_choy import *
CMS_BASE = '{}:{}'.format(os.environ['BOK_CHOY_HOSTNAME'], os.environ['BOK_CHOY_CMS_PORT'])
LMS_BASE = '{}:{}'.format(os.environ['BOK_CHOY_HOSTNAME'], os.environ['BOK_CHOY_LMS_PORT'])
......
......@@ -35,6 +35,10 @@ When refering to XBlocks, we use the entry-point name. For example,
| )
"""
# For Django settings files, the order of imports matters,
# because each import can override variables in previous imports.
# pylint: disable=wrong-import-order, wrong-import-position, ungrouped-imports
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=unused-import
......
......@@ -2,8 +2,12 @@
A new cms ENV configuration to use a slow upload file handler to help test
progress bars in uploads
"""
# pylint: disable=unused-wildcard-import
from .dev import * # pylint: disable=wildcard-import
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
from .dev import *
FILE_UPLOAD_HANDLERS = [
'contentstore.debug_file_uploader.DebugFileUploader',
......
"""
This config file runs the simplest dev environment"""
This config file runs the simplest dev environment.
"""
# For Django settings files, the order of imports matters,
# because each import can override variables in previous imports.
# pylint: disable=wrong-import-order, wrong-import-position
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
......@@ -176,7 +181,7 @@ CMS_SEGMENT_KEY = os.environ.get('SEGMENT_KEY')
#####################################################################
# Lastly, see if the developer has any local overrides.
try:
from .private import * # pylint: disable=import-error
from .private import *
except ImportError:
pass
......
......@@ -2,9 +2,17 @@
Specific overrides to the base prod settings to make development easier.
"""
# For Django settings files, the order of imports matters,
# because each import can override variables in previous imports.
# pylint: disable=wrong-import-order, wrong-import-position
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
from os.path import abspath, dirname, join
from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import
from .aws import *
# Don't use S3 in devstack, fall back to filesystem
del DEFAULT_FILE_STORAGE
......
""" Overrides for Docker-based devstack. """
"""
Overrides for Docker-based devstack.
"""
from .devstack import * # pylint: disable=wildcard-import, unused-wildcard-import
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
from .devstack import *
# Docker does not support the syslog socket at /dev/log. Rely on the console.
LOGGING['handlers']['local'] = LOGGING['handlers']['tracking'] = {
......
......@@ -18,14 +18,18 @@ as they are for non-optimized devstack. Instead, update_assets must be
invoked each time that changes have been made.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
import os
########################## Devstack settings ###################################
if 'BOK_CHOY_HOSTNAME' in os.environ:
from .devstack_docker import * # pylint: disable=wildcard-import, unused-wildcard-import
from .devstack_docker import *
else:
from .devstack import * # pylint: disable=wildcard-import, unused-wildcard-import
from .devstack import *
TEST_ROOT = REPO_ROOT / "test_root"
......
......@@ -11,11 +11,12 @@ In two separate processes on devstack:
./manage.py cms celery worker --settings=devstack_with_worker
"""
import os
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
import os
if 'BOK_CHOY_HOSTNAME' in os.environ:
from cms.envs.devstack_docker import *
else:
......
......@@ -2,9 +2,13 @@
Settings for OpenStack deployments.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
# We import the aws settings because that's currently where the base settings are stored for all deployments.
# TODO - fix this when aws.py is split/renamed.
from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import
from .aws import *
SWIFT_AUTH_URL = AUTH_TOKENS.get('SWIFT_AUTH_URL')
SWIFT_AUTH_VERSION = AUTH_TOKENS.get('SWIFT_AUTH_VERSION', 1)
......
......@@ -9,15 +9,14 @@ sessions. Assumes structure:
/log # Where we're going to write log files
"""
# For Django settings files, the order of imports matters,
# because each import can override variables in previous imports.
# pylint: disable=wrong-import-order
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
# Pylint gets confused by path.py instances, which report themselves as class
# objects. As a result, pylint applies the wrong regex in validating names,
# and throws spurious errors. Therefore, we disable invalid-name checking.
# pylint: disable=invalid-name
from .common import *
import os
from path import Path as path
......@@ -71,7 +70,8 @@ COMMON_TEST_DATA_ROOT = COMMON_ROOT / "test" / "data"
FEATURES['ENABLE_EXPORT_GIT'] = True
GIT_REPO_EXPORT_DIR = TEST_ROOT / "export_course_repos"
# TODO (cpennington): We need to figure out how envs/test.py can inject things into common.py so that we don't have to repeat this sort of thing
# TODO (cpennington): We need to figure out how envs/test.py can inject things into common.py so that we don't have to
# repeat this sort of thing
STATICFILES_DIRS = [
COMMON_ROOT / "static",
PROJECT_ROOT / "static",
......
......@@ -10,8 +10,16 @@ support both generating static assets to a directory and also serving static
from the same directory.
"""
# For Django settings files, the order of imports matters,
# because each import can override variables in previous imports.
# pylint: disable=wrong-import-order
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
# Start with the common settings
from .common import * # pylint: disable=wildcard-import, unused-wildcard-import
from .common import *
from openedx.core.lib.derived import derive_settings
# Use an in-memory database since this settings file is only used for updating assets
......
......@@ -10,6 +10,10 @@ defined in the environment:
"""
# For Django settings files, the order of imports matters,
# because each import can override variables in previous imports.
# pylint: disable=wrong-import-order, ungrouped-imports
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import, undefined-variable, used-before-assignment
......
Markdown is supported
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