summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/ansiballz_python
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2023-10-05 00:11:17 +0200
committerGitHub <noreply@github.com>2023-10-05 00:11:17 +0200
commit9f899f94924fafeb330b1e8b18c970742da56e0d (patch)
treef0f250716e1b190097ac289b5657b5dfd058389a /test/integration/targets/ansiballz_python
parentansible-test - Remove more Python 2.7 / 3.6 support (#81898) (diff)
downloadansible-9f899f94924fafeb330b1e8b18c970742da56e0d.tar.xz
ansible-9f899f94924fafeb330b1e8b18c970742da56e0d.zip
Require `from __future__ import annotations` (#81902)
Diffstat (limited to 'test/integration/targets/ansiballz_python')
-rw-r--r--test/integration/targets/ansiballz_python/library/check_rlimit_and_maxfd.py3
-rw-r--r--test/integration/targets/ansiballz_python/library/custom_module.py3
-rw-r--r--test/integration/targets/ansiballz_python/library/sys_check.py3
-rw-r--r--test/integration/targets/ansiballz_python/module_utils/custom_util.py3
4 files changed, 4 insertions, 8 deletions
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():