From fcb829f7240d6eae86cc60dba4197dc5f2fc71c5 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Tue, 29 Jul 2025 20:36:36 +0200 Subject: [PATCH] Fix incorrect return value type of _copy_included_file (#85472) --- lib/ansible/plugins/strategy/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/plugins/strategy/__init__.py b/lib/ansible/plugins/strategy/__init__.py index e24aa132309..848aa366137 100644 --- a/lib/ansible/plugins/strategy/__init__.py +++ b/lib/ansible/plugins/strategy/__init__.py @@ -53,6 +53,9 @@ from ansible.utils.sentinel import Sentinel from ansible.utils.vars import combine_vars from ansible.vars.clean import strip_internal_keys, module_response_deepcopy +if t.TYPE_CHECKING: + from ansible.playbook.role_include import IncludeRole + display = Display() __all__ = ['StrategyBase'] @@ -799,7 +802,7 @@ class StrategyBase: return ret_results - def _copy_included_file(self, included_file: IncludedFile) -> IncludedFile: + def _copy_included_file(self, included_file: IncludedFile) -> TaskInclude | IncludeRole: """ A proven safe and performant way to create a copy of an included file """