From dccd283dd23ac407ddfdffa28f0cb5f31da4815c Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Wed, 12 Dec 2018 11:07:53 -0800 Subject: [PATCH] Disable pylint errors with Flask and gevent pylint has trouble with Flask response objects, thinking they are tuples and returning no-member errors. It also doesn't recognize gevent.socket members like AF_UNIX. --- src/sbin/lorax-composer | 3 +++ tests/pylorax/test_crossdomain.py | 2 ++ tests/pylorax/test_server.py | 3 +++ 3 files changed, 8 insertions(+) diff --git a/src/sbin/lorax-composer b/src/sbin/lorax-composer index ff02af91..b007b1bd 100755 --- a/src/sbin/lorax-composer +++ b/src/sbin/lorax-composer @@ -43,6 +43,9 @@ from pylorax.api.recipes import open_or_create_repo, commit_recipe_directory from pylorax.api.server import server, GitLock from pylorax.api.yumbase import YumLock +# pylint has trouble with gevent's socket module, doesn't recognize some of its members +# pylint: disable=no-member + VERSION = "{0}-{1}".format(os.path.basename(sys.argv[0]), vernum) DEFAULT_USER = "root" diff --git a/tests/pylorax/test_crossdomain.py b/tests/pylorax/test_crossdomain.py index d3a585b1..6061e155 100644 --- a/tests/pylorax/test_crossdomain.py +++ b/tests/pylorax/test_crossdomain.py @@ -20,6 +20,8 @@ from datetime import timedelta from pylorax.api.crossdomain import crossdomain +# pylint has trouble with Flask's server client response objects, thinks they are tuples +# pylint: disable=no-member server = Flask(__name__) diff --git a/tests/pylorax/test_server.py b/tests/pylorax/test_server.py index 1179312e..b199afb8 100644 --- a/tests/pylorax/test_server.py +++ b/tests/pylorax/test_server.py @@ -36,6 +36,9 @@ from pylorax.api.server import server, GitLock from pylorax.api.yumbase import YumLock from pylorax.sysutils import joinpaths +# pylint has trouble with Flask's server client response objects, thinks they are tuples +# pylint: disable=no-member + # Used for testing UTF-8 input support UTF8_TEST_STRING = "I ο½—π’Šll πŸ‰ΞΏπ˜ π› ο½π”°κœ± π˜π’‰πΈπšœ".decode("utf-8")