Merge "Remove openstack/common related stuff"

This commit is contained in:
Jenkins 2016-05-13 04:21:51 +00:00 committed by Gerrit Code Review
commit 14b576def2
8 changed files with 9 additions and 26 deletions

View File

@ -2,7 +2,6 @@
branch = True
source = sahara
omit =
*/openstack/common/*
.tox/*
sahara/tests/*

View File

@ -157,5 +157,5 @@ fi
if [ $coverage -eq 1 ]; then
echo "Generating coverage report in covhtml/"
${wrapper} coverage combine
${wrapper} coverage html --include='sahara/*' --omit='sahara/openstack/common/*' -d covhtml -i
${wrapper} coverage html --include='sahara/*' -d covhtml -i
fi

View File

@ -57,9 +57,6 @@ class HackingTestCase(testtools.TestCase):
"from oslo_serialization import jsonutils as json", "path"))))
self.assertEqual(0, len(list(checks.use_jsonutils(
"import jsonschema", "path"))))
self.assertEqual(0, len(list(checks.use_jsonutils(
"import json", "sahara/openstack/common/utils.py"))))
self.assertEqual(1, len(list(checks.use_jsonutils(
"import json", "path"))))
self.assertEqual(1, len(list(checks.use_jsonutils(

View File

@ -105,10 +105,6 @@ def use_jsonutils(logical_line, filename):
"""
if pep8.noqa(logical_line):
return
ignore_dirs = ["sahara/openstack/common"]
for dir in ignore_dirs:
if dir in filename:
return
invalid_line = re.compile(r"(import\s+json)")
valid_line = re.compile(r"(import\s+jsonschema)")
if (re.match(invalid_line, logical_line) and

View File

@ -42,13 +42,11 @@ def validate_log_translations(logical_line, filename):
"""
# NOTE(Kezar): sahara/tests included because we don't require translations
# in tests. sahara/openstack/common included because it's part imported
# from oslo and we don't change it forever and ever. sahara/db/templates
# provide separate cli interface so we don't want to translate it.
# in tests. sahara/db/templates provide separate cli interface so we don't
# want to translate it.
ignore_dirs = ["sahara/db/templates",
"sahara/tests",
"sahara/openstack/common"]
"sahara/tests"]
for directory in ignore_dirs:
if directory in filename:
return
@ -98,13 +96,11 @@ def accepted_log_levels(logical_line, filename):
"""
# NOTE(Kezar): sahara/tests included because we don't require translations
# in tests. sahara/openstack/common included because it's part imported
# from oslo and we don't change it forever and ever. sahara/db/templates
# provide separate cli interface so we don't want to translate it.
# in tests. sahara/db/templates provide separate cli interface so we don't
# want to translate it.
ignore_dirs = ["sahara/db/templates",
"sahara/tests",
"sahara/openstack/common"]
"sahara/tests"]
for directory in ignore_dirs:
if directory in filename:
return

View File

@ -58,7 +58,7 @@ def run_in_subprocess(proc, func, args=None, kwargs=None, interactive=False):
return result['output']
finally:
# NOTE(dmitryme): in openstack/common/processutils.py it
# NOTE(dmitryme): in oslo.concurrency's file processutils.py it
# is suggested to sleep a little between calls to multiprocessing.
# That should allow it make some necessary cleanup
context.sleep(0)

View File

@ -32,9 +32,6 @@ ignore_codes = ["E1103"]
# Note(maoy): the error message is the pattern of E0202. It should be ignored
# for sahara.tests modules
ignore_messages = ["An attribute affected in sahara.tests"]
# We ignore all errors in openstack.common because it should be checked
# elsewhere.
ignore_modules = ["sahara/openstack/common/"]
KNOWN_PYLINT_EXCEPTIONS_FILE = "tools/pylint_exceptions"
@ -88,8 +85,6 @@ class LintOutput(object):
def is_ignored(self):
if self.code in ignore_codes:
return True
if any(self.filename.startswith(name) for name in ignore_modules):
return True
if any(msg in self.message for msg in ignore_messages):
return True
return False

View File

@ -83,7 +83,7 @@ commands = bandit -c bandit.yaml -r sahara -n5 -p sahara_default -x tests
[flake8]
show-source = true
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools
[hacking]
import_exceptions = sahara.i18n._, sahara.i18n._LI, sahara.i18n._LW, sahara.i18n._LE, sahara.i18n._LC