Fix deprecation comments (#86138)

This commit is contained in:
Matt Clay
2025-11-05 16:53:41 -08:00
committed by GitHub
parent a2dda41bb6
commit 5b8ae0b5b5
3 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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