Ignore invalid-name errors for settings files

path.py objects report themselves as class objects, which confuses the heck out of
pylint. It tries to match variable names using the class-rgx regular expression
instead of the constant-rgx regular expression, and it doesn't match, so it
throws an error. Not sure how to fix pylint, so we'll just ignore these errors.
This commit is contained in:
David Baumgold
2015-01-16 11:15:48 -05:00
parent 94b313fd72
commit ef43840a79
10 changed files with 50 additions and 0 deletions

View File

@@ -6,6 +6,11 @@ This is the default template for our main set of AWS servers.
# 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 *

View File

@@ -5,6 +5,11 @@ Settings for bok choy tests
import os
from path import path
# 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
########################## Prod-like settings ###################################
# These should be as close as possible to the settings we use in production.

View File

@@ -24,6 +24,11 @@ Longer TODO:
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-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 imp
import os
import sys

View File

@@ -12,6 +12,11 @@ sessions. Assumes structure:
# 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

View File

@@ -11,6 +11,11 @@ Common traits:
# 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 *

View File

@@ -6,6 +6,11 @@ import os
from path import path
from tempfile import mkdtemp
# 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
CONFIG_ROOT = path(__file__).abspath().dirname() # pylint: disable=no-value-for-parameter
TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root"

View File

@@ -5,6 +5,11 @@ This is a localdev test for the Microsite processing pipeline
# 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 .dev import *
from ..dev import ENV_ROOT, FEATURES

View File

@@ -24,6 +24,11 @@ Longer TODO:
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-import, unused-wildcard-import, invalid-name
# 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 sys
import os
import imp

View File

@@ -12,6 +12,11 @@ sessions. Assumes structure:
# 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 *
from logsettings import get_logger_config

View File

@@ -12,6 +12,11 @@ sessions. Assumes structure:
# 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