diff options
author | Matt Clay <mclay@redhat.com> | 2020-06-22 19:05:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-22 19:05:30 -0700 |
commit | 4816bb4f43ee22f20fa7d75a79db659cc1cdeaf3 (patch) | |
tree | 4cf981e84fd5cb86174f8067d7178d731dece1c9 /hacking | |
parent | 234994fc075222f28943313024c7df5d7010bc37 (diff) | |
download | ansible-4816bb4f43ee22f20fa7d75a79db659cc1cdeaf3.tar.gz |
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-x | hacking/fix_test_syntax.py | 3 | ||||
-rwxr-xr-x | hacking/get_library.py | 3 | ||||
-rwxr-xr-x | hacking/report.py | 3 | ||||
-rwxr-xr-x | hacking/return_skeleton_generator.py | 4 | ||||
-rwxr-xr-x | hacking/test-module.py | 3 | ||||
-rwxr-xr-x | hacking/tests/gen_distribution_version_testcase.py | 2 |
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 |