From 6380c1db52b6b4d06a189bbfad62e3393cde60c8 Mon Sep 17 00:00:00 2001 From: Jeff Widman Date: Wed, 24 Oct 2018 12:58:41 -0700 Subject: [PATCH] Prevent `pylint` import errors on `six.moves` `six.moves` is a dynamically-created namespace that doesn't actually exist and therefore `pylint` can't statically analyze it. By default, `pylint` is smart enough to realize that and ignore the import errors. However, because we vendor it, the location changes to `kafka.vendor.six.moves` so `pylint` doesn't realize it should be ignored. So this explicitly ignores it. `pylint` documentation of this feature: http://pylint.pycqa.org/en/1.9/technical_reference/features.html?highlight=ignored-modules#id34 More background: * https://github.com/PyCQA/pylint/issues/1640 * https://github.com/PyCQA/pylint/issues/223 --- pylint.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/pylint.rc b/pylint.rc index d22e523ec..851275bcc 100644 --- a/pylint.rc +++ b/pylint.rc @@ -1,5 +1,6 @@ [TYPECHECK] ignored-classes=SyncManager,_socketobject +ignored-modules=kafka.vendor.six.moves generated-members=py.* [MESSAGES CONTROL]