From 5b8ae0b5b53e74daf1ba1fe47967ae845d319b90 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Wed, 5 Nov 2025 16:53:41 -0800 Subject: [PATCH] Fix deprecation comments (#86138) --- lib/ansible/_internal/_templating/_template_vars.py | 4 ++-- lib/ansible/template/__init__.py | 2 +- .../controller/sanity/pylint/plugins/deprecated_calls.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ansible/_internal/_templating/_template_vars.py b/lib/ansible/_internal/_templating/_template_vars.py index b5b1e4c0e9a..67c8d5cd413 100644 --- a/lib/ansible/_internal/_templating/_template_vars.py +++ b/lib/ansible/_internal/_templating/_template_vars.py @@ -19,7 +19,7 @@ def generate_ansible_template_vars( Generate and return a dictionary with variable metadata about the template specified by `fullpath`. If `fullpath` is `None`, `path` will be used instead. """ - # deprecated description="update the ansible.windows collection to inline this logic instead of calling this internal function" core_version="2.23" + # deprecated: description="update the ansible.windows collection to inline this logic instead of calling this internal function" core_version="2.23" if fullpath is None: fullpath = _os.path.abspath(path) @@ -51,7 +51,7 @@ def generate_ansible_template_vars( def _generate_ansible_managed(template_stat: _os.stat_result) -> str: """Generate and return the `ansible_managed` variable.""" - # deprecated description="remove the `_generate_ansible_managed` function and use a constant instead" core_version="2.23" + # deprecated: description="remove the `_generate_ansible_managed` function and use a constant instead" core_version="2.23" from ansible.template import trust_as_template diff --git a/lib/ansible/template/__init__.py b/lib/ansible/template/__init__.py index c2ecb92313b..0d110a751b9 100644 --- a/lib/ansible/template/__init__.py +++ b/lib/ansible/template/__init__.py @@ -356,7 +356,7 @@ def generate_ansible_template_vars( Generate and return a dictionary with variable metadata about the template specified by `fullpath`. If `fullpath` is `None`, `path` will be used instead. """ - # deprecated description="deprecate `generate_ansible_template_vars`, collections should inline the necessary variables" core_version="2.23" + # deprecated: description="deprecate `generate_ansible_template_vars`, collections should inline the necessary variables" core_version="2.23" return _template_vars.generate_ansible_template_vars(path=path, fullpath=fullpath, dest_path=dest_path, include_ansible_managed=True) diff --git a/test/lib/ansible_test/_util/controller/sanity/pylint/plugins/deprecated_calls.py b/test/lib/ansible_test/_util/controller/sanity/pylint/plugins/deprecated_calls.py index da332e34a2e..a91c3f79b58 100644 --- a/test/lib/ansible_test/_util/controller/sanity/pylint/plugins/deprecated_calls.py +++ b/test/lib/ansible_test/_util/controller/sanity/pylint/plugins/deprecated_calls.py @@ -222,7 +222,7 @@ class AnsibleDeprecatedChecker(pylint.checkers.BaseChecker): if plugin_info is INDETERMINATE_DEPRECATOR: return True # deprecator cannot be detected, caller must provide deprecator - # deprecation: description='deprecate collection_name/deprecator now that detection is widely available' core_version='2.23' + # deprecated: description='deprecate collection_name/deprecator now that detection is widely available' core_version='2.23' # When this deprecation triggers, change the return type here to False. # At that point, callers should be able to omit the collection_name/deprecator in all but a few cases (inline ignores can be used for those cases) return None