ansible.builtin inferred by collection_name == None (#80446)

pull/80462/head
Matt Martz 2 years ago committed by GitHub
parent 88a380c8f0
commit 7251938370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -160,6 +160,8 @@ class AnsibleDeprecatedChecker(BaseChecker):
self.add_message('ansible-deprecated-date', node=node, args=(date,)) self.add_message('ansible-deprecated-date', node=node, args=(date,))
def _check_version(self, node, version, collection_name): def _check_version(self, node, version, collection_name):
if collection_name is None:
collection_name = 'ansible.builtin'
if not isinstance(version, (str, float)): if not isinstance(version, (str, float)):
if collection_name == 'ansible.builtin': if collection_name == 'ansible.builtin':
symbol = 'ansible-invalid-deprecated-version' symbol = 'ansible-invalid-deprecated-version'

@ -238,3 +238,10 @@ test/units/utils/collection_loader/fixtures/collections_masked/ansible_collectio
test/units/utils/collection_loader/fixtures/collections_masked/ansible_collections/testns/__init__.py empty-init # testing that collections don't need inits test/units/utils/collection_loader/fixtures/collections_masked/ansible_collections/testns/__init__.py empty-init # testing that collections don't need inits
test/units/utils/collection_loader/fixtures/collections_masked/ansible_collections/testns/testcoll/__init__.py empty-init # testing that collections don't need inits test/units/utils/collection_loader/fixtures/collections_masked/ansible_collections/testns/testcoll/__init__.py empty-init # testing that collections don't need inits
test/units/utils/collection_loader/test_collection_loader.py pylint:undefined-variable # magic runtime local var splatting test/units/utils/collection_loader/test_collection_loader.py pylint:undefined-variable # magic runtime local var splatting
lib/ansible/executor/module_common.py pylint:ansible-deprecated-version
lib/ansible/executor/play_iterator.py pylint:ansible-deprecated-version
lib/ansible/module_utils/urls.py pylint:ansible-deprecated-version
lib/ansible/playbook/helpers.py pylint:ansible-deprecated-version
lib/ansible/playbook/included_file.py pylint:ansible-deprecated-version
lib/ansible/plugins/action/__init__.py pylint:ansible-deprecated-version
lib/ansible/template/__init__.py pylint:ansible-deprecated-version

Loading…
Cancel
Save