mirror of
https://github.com/openshift/community.okd.git
synced 2026-03-26 19:03:14 +00:00
pylint: ignore a use-a-generator message (#118)
Follow up to the recent upgrade of pylint in the devel branch, we've got a new use-a-generator error in k8s.py: Use a generator instead 'all(desired.get(key, True) == item.get(key, False) for key in keys)' This commit disables the error until we've got time to rewrite this part. Also, since the older branches still use an ancient version of pylint, we've got another message saying the error does not exist (yet!). This commit also adds the right entries in the ignore files.
This commit is contained in:
@@ -396,6 +396,7 @@ class OKDRawModule(K8sAnsibleMixin):
|
||||
""" Iterates over keys, returns the first object from objects where the value of the key
|
||||
matches the value in desired
|
||||
"""
|
||||
# pylint: disable=use-a-generator
|
||||
for i, item in enumerate(objects):
|
||||
if item and all([desired.get(key, True) == item.get(key, False) for key in keys]):
|
||||
return i
|
||||
|
||||
Reference in New Issue
Block a user