Debian Codegraph @

test/integration/targets/lookup-option-name/lookup_plugins/non_terms_posargs.py

raw
1 from __future__ import annotations
2
3 from ansible.plugins.lookup import LookupBase
4
5
6 class LookupModule(LookupBase):
7 """Test plugin whose run method has a kwarg named terms that is not the first positional arg."""
8 def run(self, not_terms, variables=None, terms=None, **kwargs): # pylint:disable=arguments-renamed
9 """Echo back a dictionary with the first posarg and the terms kwarg to ensure we didn't conflate posarg 0 and the terms kwarg"""
10 return [dict(not_terms=not_terms, terms=terms)]