Python 3.8 collections compatibility fixes.

Includes a new pylint blacklist plugin to prevent regressions.
This commit is contained in:
Matt Clay 2018-10-05 01:22:25 -07:00
commit a11f631ee4
56 changed files with 317 additions and 104 deletions

View file

@ -28,8 +28,8 @@ RETURN = """
_list:
description: basically the same as you fed in
"""
import collections
from ansible.module_utils.common._collections_compat import Sequence
from ansible.plugins.lookup import LookupBase
from ansible.errors import AnsibleError
@ -37,6 +37,6 @@ from ansible.errors import AnsibleError
class LookupModule(LookupBase):
def run(self, terms, **kwargs):
if not isinstance(terms, collections.Sequence):
if not isinstance(terms, Sequence):
raise AnsibleError("with_list expects a list")
return terms