mirror of
https://github.com/ansible/ansible.git
synced 2025-11-30 23:16:08 +07:00
Fix deprecation comments (#86138)
This commit is contained in:
@@ -19,7 +19,7 @@ def generate_ansible_template_vars(
|
|||||||
Generate and return a dictionary with variable metadata about the template specified by `fullpath`.
|
Generate and return a dictionary with variable metadata about the template specified by `fullpath`.
|
||||||
If `fullpath` is `None`, `path` will be used instead.
|
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:
|
if fullpath is None:
|
||||||
fullpath = _os.path.abspath(path)
|
fullpath = _os.path.abspath(path)
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ def generate_ansible_template_vars(
|
|||||||
|
|
||||||
def _generate_ansible_managed(template_stat: _os.stat_result) -> str:
|
def _generate_ansible_managed(template_stat: _os.stat_result) -> str:
|
||||||
"""Generate and return the `ansible_managed` variable."""
|
"""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
|
from ansible.template import trust_as_template
|
||||||
|
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ def generate_ansible_template_vars(
|
|||||||
Generate and return a dictionary with variable metadata about the template specified by `fullpath`.
|
Generate and return a dictionary with variable metadata about the template specified by `fullpath`.
|
||||||
If `fullpath` is `None`, `path` will be used instead.
|
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)
|
return _template_vars.generate_ansible_template_vars(path=path, fullpath=fullpath, dest_path=dest_path, include_ansible_managed=True)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ class AnsibleDeprecatedChecker(pylint.checkers.BaseChecker):
|
|||||||
if plugin_info is INDETERMINATE_DEPRECATOR:
|
if plugin_info is INDETERMINATE_DEPRECATOR:
|
||||||
return True # deprecator cannot be detected, caller must provide 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.
|
# 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)
|
# 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
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user