summaryrefslogtreecommitdiff
path: root/hacking
diff options
context:
space:
mode:
Diffstat (limited to 'hacking')
-rwxr-xr-xhacking/fix_test_syntax.py3
-rwxr-xr-xhacking/get_library.py3
-rwxr-xr-xhacking/report.py3
-rwxr-xr-xhacking/return_skeleton_generator.py4
-rwxr-xr-xhacking/test-module.py3
-rwxr-xr-xhacking/tests/gen_distribution_version_testcase.py2
6 files changed, 16 insertions, 2 deletions
diff --git a/hacking/fix_test_syntax.py b/hacking/fix_test_syntax.py
index 4ac990bd01..7178033406 100755
--- a/hacking/fix_test_syntax.py
+++ b/hacking/fix_test_syntax.py
@@ -31,6 +31,9 @@
# Which should be converted to:
# var|string is search('foo')
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
import argparse
import os
import re
diff --git a/hacking/get_library.py b/hacking/get_library.py
index ea5d44bf3d..23bf4a39bb 100755
--- a/hacking/get_library.py
+++ b/hacking/get_library.py
@@ -18,6 +18,9 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
import ansible.constants as C
import sys
diff --git a/hacking/report.py b/hacking/report.py
index 580d87dd00..58b3a6b915 100755
--- a/hacking/report.py
+++ b/hacking/report.py
@@ -2,7 +2,8 @@
# PYTHON_ARGCOMPLETE_OK
"""A tool to aggregate data about Ansible source and testing into a sqlite DB for reporting."""
-from __future__ import (absolute_import, print_function)
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
import argparse
import json
diff --git a/hacking/return_skeleton_generator.py b/hacking/return_skeleton_generator.py
index adfe3d76c1..83fd76a892 100755
--- a/hacking/return_skeleton_generator.py
+++ b/hacking/return_skeleton_generator.py
@@ -26,7 +26,9 @@
# You will likely want to adjust this to remove sensitive data or
# ensure the `returns` value is correct, and to write a useful description
-from __future__ import print_function
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
from collections import OrderedDict
import json
import sys
diff --git a/hacking/test-module.py b/hacking/test-module.py
index 1a063082fd..e954883cae 100755
--- a/hacking/test-module.py
+++ b/hacking/test-module.py
@@ -28,6 +28,9 @@
# ./hacking/test-module.py -m lib/ansible/modules/files/lineinfile.py -a "dest=/etc/exports line='/srv/home hostname1(rw,sync)'" --check
# ./hacking/test-module.py -m lib/ansible/modules/commands/command.py -a "echo hello" -n -o "test_hello"
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
import glob
import optparse
import os
diff --git a/hacking/tests/gen_distribution_version_testcase.py b/hacking/tests/gen_distribution_version_testcase.py
index 21c51d358e..39c0a2fc2c 100755
--- a/hacking/tests/gen_distribution_version_testcase.py
+++ b/hacking/tests/gen_distribution_version_testcase.py
@@ -9,6 +9,8 @@ and the current ansible_facts regarding the distribution version.
This assumes a working ansible version in the path.
"""
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
import os.path
import subprocess