Pylint: refactor ignored message lists

The way these are organized makes it rather hard to
associate comments and their messages, and makes it
more work to modify this list in a meaningful way (or
re-use it for a project like os-brick).

Move things around a bit to make this easier to manage.

Change-Id: Ieebca9f97f6b15832693a37fa03f97c1074d64e8
This commit is contained in:
Eric Harney
2016-04-04 15:47:55 -04:00
parent 09fa5ab22d
commit c5078eaefc

View File

@@ -26,25 +26,35 @@ from pylint import lint
from pylint.reporters import text from pylint.reporters import text
from six.moves import cStringIO as StringIO from six.moves import cStringIO as StringIO
# Note(maoy): E1103 is error code related to partial type inference ignore_codes = [
ignore_codes = ["E1103"] # Note(maoy): E1103 is error code related to partial type inference
# Note(maoy): the error message is the pattern of E0202. It should be ignored "E1103"
# for cinder.tests modules ]
# Note(fengqian): the second error message is the pattern of [E0611].
# It should be ignored because use six module to keep py3.X compatibility. ignore_messages = [
# Note(e0ne): the third error message is for SQLAlchemy update() calls # Note(maoy): this error message is the pattern of E0202. It should be
# in DB schema migrations. # ignored for cinder.tests modules
# Note(xyang): the fourth and fifth error messages are for the code [E1101]. "An attribute affected in cinder.tests",
# They should be ignored because 'sha256' and 'sha224' are functions in
# 'hashlib'. # Note(fengqian): this error message is the pattern of [E0611].
# Note(aarefiev): the sixth error message is for SQLAlchemy rename calls in
# DB migration(033_add_encryption_unique_key).
ignore_messages = ["An attribute affected in cinder.tests",
"No name 'urllib' in module '_MovedItems'", "No name 'urllib' in module '_MovedItems'",
# Note(e0ne): this error message is for SQLAlchemy update() calls
# It should be ignored because use six module to keep py3.X compatibility.
# in DB schema migrations.
"No value passed for parameter 'dml'", "No value passed for parameter 'dml'",
# Note(xyang): these error messages are for the code [E1101].
# They should be ignored because 'sha256' and 'sha224' are functions in
# 'hashlib'.
"Module 'hashlib' has no 'sha256' member", "Module 'hashlib' has no 'sha256' member",
"Module 'hashlib' has no 'sha224' member", "Module 'hashlib' has no 'sha224' member",
"Instance of 'Table' has no 'rename' member"]
# Note(aarefiev): this error message is for SQLAlchemy rename calls in
# DB migration(033_add_encryption_unique_key).
"Instance of 'Table' has no 'rename' member"
]
# Note(maoy): We ignore cinder.tests for now due to high false # Note(maoy): We ignore cinder.tests for now due to high false
# positive rate. # positive rate.
ignore_modules = ["cinder/tests/"] ignore_modules = ["cinder/tests/"]