From 9f899f94924fafeb330b1e8b18c970742da56e0d Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Wed, 4 Oct 2023 18:11:17 -0400 Subject: Require `from __future__ import annotations` (#81902) --- .../targets/ansiballz_python/library/check_rlimit_and_maxfd.py | 3 +-- test/integration/targets/ansiballz_python/library/custom_module.py | 3 +-- test/integration/targets/ansiballz_python/library/sys_check.py | 3 +-- test/integration/targets/ansiballz_python/module_utils/custom_util.py | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) (limited to 'test/integration/targets/ansiballz_python') diff --git a/test/integration/targets/ansiballz_python/library/check_rlimit_and_maxfd.py b/test/integration/targets/ansiballz_python/library/check_rlimit_and_maxfd.py index a01ee99763..cc3949bc87 100644 --- a/test/integration/targets/ansiballz_python/library/check_rlimit_and_maxfd.py +++ b/test/integration/targets/ansiballz_python/library/check_rlimit_and_maxfd.py @@ -3,8 +3,7 @@ # Copyright 2018 Red Hat | Ansible # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from __future__ import absolute_import, division, print_function -__metaclass__ = type +from __future__ import annotations import resource import subprocess diff --git a/test/integration/targets/ansiballz_python/library/custom_module.py b/test/integration/targets/ansiballz_python/library/custom_module.py index 625823eabe..2436bb20b6 100644 --- a/test/integration/targets/ansiballz_python/library/custom_module.py +++ b/test/integration/targets/ansiballz_python/library/custom_module.py @@ -1,7 +1,6 @@ #!/usr/bin/python -from __future__ import absolute_import, division, print_function -__metaclass__ = type +from __future__ import annotations from ..module_utils.basic import AnsibleModule # pylint: disable=relative-beyond-top-level from ..module_utils.custom_util import forty_two # pylint: disable=relative-beyond-top-level diff --git a/test/integration/targets/ansiballz_python/library/sys_check.py b/test/integration/targets/ansiballz_python/library/sys_check.py index aa22fe6820..8454c07d15 100644 --- a/test/integration/targets/ansiballz_python/library/sys_check.py +++ b/test/integration/targets/ansiballz_python/library/sys_check.py @@ -2,8 +2,7 @@ # https://github.com/ansible/ansible/issues/64664 # https://github.com/ansible/ansible/issues/64479 -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type +from __future__ import annotations import sys diff --git a/test/integration/targets/ansiballz_python/module_utils/custom_util.py b/test/integration/targets/ansiballz_python/module_utils/custom_util.py index 0393db473f..c9e7ffde4d 100644 --- a/test/integration/targets/ansiballz_python/module_utils/custom_util.py +++ b/test/integration/targets/ansiballz_python/module_utils/custom_util.py @@ -1,5 +1,4 @@ -from __future__ import absolute_import, division, print_function -__metaclass__ = type +from __future__ import annotations def forty_two(): -- cgit v1.2.3