Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ansible/ansible.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Clay <mclay@redhat.com>2020-06-23 05:05:30 +0300
committerGitHub <noreply@github.com>2020-06-23 05:05:30 +0300
commit4816bb4f43ee22f20fa7d75a79db659cc1cdeaf3 (patch)
tree4cf981e84fd5cb86174f8067d7178d731dece1c9 /hacking
parent234994fc075222f28943313024c7df5d7010bc37 (diff)
More boilerplate fixes. (#70224)
* Fix boilerplate in hacking dir. * Fix boilerplate in docs dir. * Fix boilerplate in integration tests. * Fix boilerplate in examples.
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 4ac990bd01c..7178033406a 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 ea5d44bf3d0..23bf4a39bb5 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 580d87dd00b..58b3a6b915a 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 adfe3d76c12..83fd76a8920 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 1a063082fde..e954883cae9 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 21c51d358ed..39c0a2fc2c9 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