Skip to content

Commit 6380c1d

Browse files
committed
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: * pylint-dev/pylint#1640 * pylint-dev/pylint#223
1 parent a7e28ae commit 6380c1d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pylint.rc

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[TYPECHECK]
22
ignored-classes=SyncManager,_socketobject
3+
ignored-modules=kafka.vendor.six.moves
34
generated-members=py.*
45

56
[MESSAGES CONTROL]

0 commit comments

Comments
 (0)