summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2024-10-09 23:22:35 +0200
committerGitHub <noreply@github.com>2024-10-09 23:22:35 +0200
commita0495fc31497798a7a833ba7406a9729e1528dd8 (patch)
treec9ebc8e92d18e20bbb5f44d0184d00166b63b4df /test
parentansible-test - Work around pylint issue on 3.11 (#84094) (diff)
downloadansible-a0495fc31497798a7a833ba7406a9729e1528dd8.tar.xz
ansible-a0495fc31497798a7a833ba7406a9729e1528dd8.zip
Update triple single quotes to triple double quotes (#84099)
* Update triple single quotes to triple double quotes This change was fully automated. The updated Python files have been verified to tokenize the same as the originals, except for the expected change in quoting of strings, which were verified through literal_eval. * Manual conversion of docstring quotes
Diffstat (limited to 'test')
-rw-r--r--test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/cache/notjsonfile.py4
-rw-r--r--test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/inventory/statichost.py4
-rw-r--r--test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/modules/randommodule.py12
-rw-r--r--test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/vars/noop_vars_plugin.py4
-rw-r--r--test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/cache/notjsonfile.py4
-rw-r--r--test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/filter_subdir/in_subdir.py2
-rw-r--r--test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/grouped.py2
-rw-r--r--test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/inventory/statichost.py4
-rw-r--r--test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/modules/database/database_type/subdir_module.py12
-rw-r--r--test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/modules/randommodule.py12
-rw-r--r--test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/test/test_test.py2
-rw-r--r--test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/vars/noop_vars_plugin.py4
-rw-r--r--test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/deprecation.py4
-rw-r--r--test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/module.py4
-rw-r--r--test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/plugin.py4
-rw-r--r--test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/version_added.py4
-rw-r--r--test/integration/targets/ansible-doc/filter_plugins/other.py2
-rw-r--r--test/integration/targets/ansible-doc/library/double_doc.py4
-rw-r--r--test/integration/targets/ansible-doc/library/test_docs.py12
-rw-r--r--test/integration/targets/ansible-doc/library/test_docs_missing_description.py12
-rw-r--r--test/integration/targets/ansible-doc/library/test_docs_no_metadata.py12
-rw-r--r--test/integration/targets/ansible-doc/library/test_docs_no_status.py12
-rw-r--r--test/integration/targets/ansible-doc/library/test_docs_non_iterable_status.py12
-rw-r--r--test/integration/targets/ansible-doc/library/test_docs_removed_precedence.py12
-rw-r--r--test/integration/targets/ansible-doc/library/test_docs_removed_status.py12
-rw-r--r--test/integration/targets/ansible-doc/library/test_docs_returns.py12
-rw-r--r--test/integration/targets/ansible-doc/library/test_docs_returns_broken.py12
-rw-r--r--test/integration/targets/ansible-doc/library/test_docs_suboptions.py12
-rw-r--r--test/integration/targets/ansible-doc/library/test_docs_yaml_anchors.py12
-rw-r--r--test/integration/targets/ansible-doc/lookup_plugins/_deprecated_with_docs.py12
-rw-r--r--test/integration/targets/ansible-galaxy-collection/files/test_module.py12
-rw-r--r--test/integration/targets/ansible-galaxy-collection/library/reset_pulp.py12
-rw-r--r--test/integration/targets/ansible-galaxy-collection/library/setup_collections.py12
-rw-r--r--test/integration/targets/ansible-test-docker/ansible_collections/ns/col/plugins/doc_fragments/ps_util.py4
-rw-r--r--test/integration/targets/ansible-test-docker/ansible_collections/ns/col/plugins/modules/hello.py10
-rw-r--r--test/integration/targets/ansible-test-docker/ansible_collections/ns/col/plugins/modules/win_util_args.py12
-rw-r--r--test/integration/targets/ansible-test-integration/ansible_collections/ns/col/plugins/modules/hello.py10
-rw-r--r--test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/_module3.py10
-rw-r--r--test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/a/b/module2.py10
-rw-r--r--test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/module1.py10
-rw-r--r--test/integration/targets/ansible-test-sanity-import/ansible_collections/ns/col/plugins/lookup/vendor1.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-import/ansible_collections/ns/col/plugins/lookup/vendor2.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-pylint/ansible_collections/ns/col/plugins/lookup/deprecated.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/_not_deprecated.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_1.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_2.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_3.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_4.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_5.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_6.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_7.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/import_order.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/invalid_argument_spec_extra_key.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/invalid_argument_spec_incorrect_context.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/invalid_yaml_syntax.py12
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/no_callable.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/option_name_casing.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/semantic_markup.py10
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/valid_argument_spec_context.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/wrong_aliases.py8
-rw-r--r--test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/ps_only/plugins/modules/validate.py12
-rw-r--r--test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/lookup/bad.py10
-rw-r--r--test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/lookup/world.py10
-rw-r--r--test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/modules/bad.py10
-rw-r--r--test/integration/targets/ansible-test-units/ansible_collections/ns/col/plugins/modules/hello.py10
-rw-r--r--test/integration/targets/callback_results/callback_plugins/track_connections.py4
-rw-r--r--test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/callback/usercallback.py4
-rw-r--r--test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/doc_fragments/frag.py8
-rw-r--r--test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/testmodule.py4
-rw-r--r--test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/testmodule_bad_docfrags.py4
-rw-r--r--test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/vars/custom_vars.py4
-rw-r--r--test/integration/targets/collections/collections/ansible_collections/me/mycoll1/plugins/action/action1.py2
-rw-r--r--test/integration/targets/collections/collections/ansible_collections/me/mycoll1/plugins/modules/action1.py12
-rw-r--r--test/integration/targets/collections/collections/ansible_collections/me/mycoll2/plugins/modules/module1.py12
-rw-r--r--test/integration/targets/collections/collections/ansible_collections/testns/content_adj/plugins/cache/custom_jsonfile.py4
-rw-r--r--test/integration/targets/collections/collections/ansible_collections/testns/content_adj/plugins/inventory/statichost.py6
-rw-r--r--test/integration/targets/collections/collections/ansible_collections/testns/content_adj/plugins/vars/custom_adj_vars.py4
-rw-r--r--test/integration/targets/collections/custom_vars_plugins/v1_vars_plugin.py4
-rw-r--r--test/integration/targets/collections/custom_vars_plugins/v2_vars_plugin.py4
-rw-r--r--test/integration/targets/collections/test_task_resolved_plugin/callback_plugins/display_resolved_action.py4
-rw-r--r--test/integration/targets/collections/test_task_resolved_plugin/collections/ansible_collections/test_ns/test_coll/plugins/modules/collection_module.py4
-rw-r--r--test/integration/targets/collections/test_task_resolved_plugin/library/legacy_module.py4
-rw-r--r--test/integration/targets/collections/testcoll2/plugins/modules/testmodule2.py12
-rw-r--r--test/integration/targets/connection_remote_is_local/connection_plugins/remote_is_local.py4
-rw-r--r--test/integration/targets/delegate_to/connection_plugins/fakelocal.py16
-rw-r--r--test/integration/targets/deprecations/cache_plugins/notjsonfile.py4
-rw-r--r--test/integration/targets/deprecations/library/removeoption.py12
-rw-r--r--test/integration/targets/deprecations/library/willremove.py12
-rw-r--r--test/integration/targets/dict_transformations/library/convert_camelCase.py4
-rw-r--r--test/integration/targets/dict_transformations/library/convert_snake_case.py4
-rw-r--r--test/integration/targets/gathering_facts/cache_plugins/none.py4
-rw-r--r--test/integration/targets/inventory/inventory_plugins/constructed_with_hostvars.py4
-rw-r--r--test/integration/targets/inventory_cache/plugins/inventory/cache_host.py4
-rw-r--r--test/integration/targets/inventory_cache/plugins/inventory/exercise_cache.py4
-rw-r--r--test/integration/targets/loop-connection/collections/ansible_collections/ns/name/plugins/connection/dummy.py4
-rw-r--r--test/integration/targets/module_defaults/action_plugins/debug.py2
-rw-r--r--test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/eosfacts.py8
-rw-r--r--test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/ios_facts.py8
-rw-r--r--test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/metadata.py12
-rw-r--r--test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/module.py8
-rw-r--r--test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/ping.py12
-rw-r--r--test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/vyosfacts.py8
-rw-r--r--test/integration/targets/module_defaults/library/legacy_ping.py12
-rw-r--r--test/integration/targets/module_precedence/lib_with_extension/ping.py8
-rw-r--r--test/integration/targets/module_precedence/multiple_roles/bar/library/ping.py8
-rw-r--r--test/integration/targets/module_precedence/multiple_roles/foo/library/ping.py8
-rw-r--r--test/integration/targets/module_precedence/roles_with_extension/foo/library/ping.py8
-rw-r--r--test/integration/targets/module_utils/callback/pure_json.py4
-rw-r--r--test/integration/targets/module_utils_ansible_release/library/ansible_release.py12
-rw-r--r--test/integration/targets/module_utils_urls/library/test_peercert.py12
-rw-r--r--test/integration/targets/old_style_cache_plugins/plugins/cache/configurable_redis.py4
-rw-r--r--test/integration/targets/old_style_cache_plugins/plugins/cache/legacy_redis.py4
-rw-r--r--test/integration/targets/old_style_cache_plugins/plugins/inventory/test.py4
-rw-r--r--test/integration/targets/plugin_config_for_inventory/cache_plugins/none.py4
-rw-r--r--test/integration/targets/plugin_config_for_inventory/test_inventory.py8
-rw-r--r--test/integration/targets/plugin_loader/file_collision/roles/r1/filter_plugins/custom.py2
-rw-r--r--test/integration/targets/plugin_loader/file_collision/roles/r2/filter_plugins/custom.py2
-rw-r--r--test/integration/targets/plugin_loader/override/filter_plugins/core.py2
-rw-r--r--test/integration/targets/prepare_http_tests/library/httptester_kinit.py12
-rw-r--r--test/integration/targets/rel_plugin_loading/subdir/inventory_plugins/notyaml.py14
-rw-r--r--test/integration/targets/shell/connection_plugins/test_connection_default.py6
-rw-r--r--test/integration/targets/shell/connection_plugins/test_connection_override.py6
-rwxr-xr-xtest/integration/targets/var_precedence/ansible-var-precedence-check.py4
-rw-r--r--test/integration/targets/windows-minimal/library/win_ping.py12
-rw-r--r--test/support/integration/plugins/modules/pkgng.py8
-rw-r--r--test/support/windows-integration/collections/ansible_collections/ansible/windows/plugins/modules/win_uri.py12
-rw-r--r--test/support/windows-integration/plugins/action/win_copy.py4
-rw-r--r--test/support/windows-integration/plugins/modules/win_acl.py8
-rw-r--r--test/support/windows-integration/plugins/modules/win_certificate_store.py12
-rw-r--r--test/support/windows-integration/plugins/modules/win_command.py12
-rw-r--r--test/support/windows-integration/plugins/modules/win_copy.py12
-rw-r--r--test/support/windows-integration/plugins/modules/win_file.py8
-rw-r--r--test/support/windows-integration/plugins/modules/win_get_url.py12
-rw-r--r--test/support/windows-integration/plugins/modules/win_lineinfile.py12
-rw-r--r--test/support/windows-integration/plugins/modules/win_ping.py12
-rw-r--r--test/support/windows-integration/plugins/modules/win_reboot.py12
-rw-r--r--test/support/windows-integration/plugins/modules/win_regedit.py12
-rw-r--r--test/support/windows-integration/plugins/modules/win_shell.py12
-rw-r--r--test/support/windows-integration/plugins/modules/win_stat.py12
-rw-r--r--test/support/windows-integration/plugins/modules/win_user.py12
-rw-r--r--test/support/windows-integration/plugins/modules/win_user_right.py12
-rw-r--r--test/support/windows-integration/plugins/modules/win_wait_for.py12
-rw-r--r--test/support/windows-integration/plugins/modules/win_whoami.py12
-rw-r--r--test/units/cli/test_galaxy.py90
-rw-r--r--test/units/errors/test_errors.py4
-rw-r--r--test/units/executor/module_common/test_modify_module.py4
-rw-r--r--test/units/executor/test_playbook_executor.py20
-rw-r--r--test/units/galaxy/test_api.py2
-rw-r--r--test/units/galaxy/test_collection.py4
-rw-r--r--test/units/inventory/test_group.py4
-rw-r--r--test/units/mock/vault_helper.py6
-rw-r--r--test/units/module_utils/basic/test_set_cwd.py10
-rw-r--r--test/units/module_utils/common/test_dict_transformations.py4
-rw-r--r--test/units/module_utils/common/validation/test_check_type_float.py2
-rw-r--r--test/units/module_utils/facts/network/test_generic_bsd.py8
-rw-r--r--test/units/module_utils/facts/other/test_facter.py4
-rw-r--r--test/units/module_utils/facts/other/test_ohai.py4
-rw-r--r--test/units/module_utils/facts/system/test_lsb.py12
-rw-r--r--test/units/module_utils/urls/test_gzip.py8
-rw-r--r--test/units/parsing/test_dataloader.py2
-rw-r--r--test/units/parsing/vault/test_vault.py24
-rw-r--r--test/units/plugins/action/test_action.py8
-rw-r--r--test/units/plugins/callback/test_callback.py36
-rw-r--r--test/units/plugins/connection/test_connection.py12
-rw-r--r--test/units/plugins/test_plugins.py8
-rw-r--r--test/units/template/test_templar.py2
-rw-r--r--test/units/utils/display/test_logger.py4
-rw-r--r--test/units/vars/test_variable_manager.py4
168 files changed, 718 insertions, 718 deletions
diff --git a/test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/cache/notjsonfile.py b/test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/cache/notjsonfile.py
index a6203b91cb..90f6f49a11 100644
--- a/test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/cache/notjsonfile.py
+++ b/test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/cache/notjsonfile.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
cache: notjsonfile
broken:
short_description: JSON formatted files.
@@ -56,7 +56,7 @@ DOCUMENTATION = '''
type: integer
extends_documentation_fragment:
- testns.testcol2.plugin
-'''
+"""
from ansible.plugins.cache import BaseFileCacheModule
diff --git a/test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/inventory/statichost.py b/test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/inventory/statichost.py
index eb5f5f35bc..1deea1d426 100644
--- a/test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/inventory/statichost.py
+++ b/test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/inventory/statichost.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
inventory: statichost
broken:
short_description: Add a single host
@@ -17,7 +17,7 @@ DOCUMENTATION = '''
hostname:
description: Toggle display of stderr even when script was successful
required: True
-'''
+"""
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable
diff --git a/test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/modules/randommodule.py b/test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/modules/randommodule.py
index b017112b3b..e6ee7fd3a3 100644
--- a/test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/modules/randommodule.py
+++ b/test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/modules/randommodule.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: randommodule
short_description: A random module
@@ -47,12 +47,12 @@ options:
version: '2.0.0'
extends_documentation_fragment:
- testns.testcol2.module
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
+RETURN = """
z_last:
description: A last result.
broken:
@@ -77,7 +77,7 @@ a_first:
description: A first result.
type: str
returned: success
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/vars/noop_vars_plugin.py b/test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/vars/noop_vars_plugin.py
index 61de5f434b..0bef3e8b69 100644
--- a/test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/vars/noop_vars_plugin.py
+++ b/test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/vars/noop_vars_plugin.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
vars: noop_vars_plugin
broken:
short_description: Do NOT load host and group vars
@@ -17,7 +17,7 @@ DOCUMENTATION = '''
- name: ANSIBLE_VARS_PLUGIN_STAGE
extends_documentation_fragment:
- testns.testcol2.deprecation
-'''
+"""
from ansible.plugins.vars import BaseVarsPlugin
diff --git a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/cache/notjsonfile.py b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/cache/notjsonfile.py
index 32abc43aa7..21ec0bed85 100644
--- a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/cache/notjsonfile.py
+++ b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/cache/notjsonfile.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
cache: notjsonfile
short_description: JSON formatted files.
description:
@@ -55,7 +55,7 @@ DOCUMENTATION = '''
type: integer
extends_documentation_fragment:
- testns.testcol2.plugin
-'''
+"""
from ansible.plugins.cache import BaseFileCacheModule
diff --git a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/filter_subdir/in_subdir.py b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/filter_subdir/in_subdir.py
index d912c028ec..3d5826a324 100644
--- a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/filter_subdir/in_subdir.py
+++ b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/filter_subdir/in_subdir.py
@@ -12,7 +12,7 @@ def nochange(a):
class FilterModule(object):
- ''' Ansible core jinja2 filters '''
+ """ Ansible core jinja2 filters """
def filters(self):
return {
diff --git a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/grouped.py b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/grouped.py
index 47ac9c4466..e80a0b482a 100644
--- a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/grouped.py
+++ b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/grouped.py
@@ -16,7 +16,7 @@ def meaningoflife(a):
class FilterModule(object):
- ''' Ansible core jinja2 filters '''
+ """ Ansible core jinja2 filters """
def filters(self):
return {
diff --git a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/inventory/statichost.py b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/inventory/statichost.py
index 60c60f92af..d440cb50b7 100644
--- a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/inventory/statichost.py
+++ b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/inventory/statichost.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
inventory: statichost
short_description: Add a single host
description: Add a single host
@@ -16,7 +16,7 @@ DOCUMENTATION = '''
hostname:
description: Toggle display of stderr even when script was successful
required: True
-'''
+"""
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable
diff --git a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/modules/database/database_type/subdir_module.py b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/modules/database/database_type/subdir_module.py
index a7bcf5055a..d10d5c5dea 100644
--- a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/modules/database/database_type/subdir_module.py
+++ b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/modules/database/database_type/subdir_module.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: subdir_module
short_description: A module in multiple subdirectories
@@ -12,13 +12,13 @@ author:
- Ansible Core Team
version_added: 1.0.0
options: {}
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
-'''
+RETURN = """
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/modules/randommodule.py b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/modules/randommodule.py
index 81e8fb86e6..fdd5dcacfc 100644
--- a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/modules/randommodule.py
+++ b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/modules/randommodule.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: randommodule
short_description: A random module
@@ -73,12 +73,12 @@ notes:
This is just another line in the second paragraph.
Eventually this will break into a new line,
depending with which line width this is rendered.
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = r'''
+RETURN = r"""
z_last:
description: A last result.
type: str
@@ -103,7 +103,7 @@ a_first:
description: A first result. Use RV(a_first=foo\(bar\\baz\)bam).
type: str
returned: success
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/test/test_test.py b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/test/test_test.py
index 160256c7b2..b8d3550ff7 100644
--- a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/test/test_test.py
+++ b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/test/test_test.py
@@ -6,7 +6,7 @@ def yolo(value):
class TestModule(object):
- ''' Ansible core jinja2 tests '''
+ """ Ansible core jinja2 tests """
def tests(self):
return {
diff --git a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/vars/noop_vars_plugin.py b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/vars/noop_vars_plugin.py
index 93c076b5d3..48403275bb 100644
--- a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/vars/noop_vars_plugin.py
+++ b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/vars/noop_vars_plugin.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
vars: noop_vars_plugin
short_description: Do NOT load host and group vars
description: don't test loading host and group vars from a collection
@@ -16,7 +16,7 @@ DOCUMENTATION = '''
- name: ANSIBLE_VARS_PLUGIN_STAGE
extends_documentation_fragment:
- testns.testcol2.deprecation
-'''
+"""
from ansible.plugins.vars import BaseVarsPlugin
diff --git a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/deprecation.py b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/deprecation.py
index fdb85abf4c..aa4ebf80e9 100644
--- a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/deprecation.py
+++ b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/deprecation.py
@@ -6,10 +6,10 @@ from __future__ import annotations
class ModuleDocFragment(object):
- DOCUMENTATION = r'''
+ DOCUMENTATION = r"""
options: {}
deprecated:
alternative: Use some other module
why: Test deprecation
removed_in: '3.0.0'
-'''
+"""
diff --git a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/module.py b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/module.py
index 5fbc352943..f576e9301e 100644
--- a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/module.py
+++ b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/module.py
@@ -6,7 +6,7 @@ from __future__ import annotations
class ModuleDocFragment(object):
- DOCUMENTATION = r'''
+ DOCUMENTATION = r"""
options:
testcol2option:
description:
@@ -17,4 +17,4 @@ options:
description:
- Another option taken from testcol2
type: str
-'''
+"""
diff --git a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/plugin.py b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/plugin.py
index eddd61e210..6bf324fe5b 100644
--- a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/plugin.py
+++ b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/plugin.py
@@ -6,7 +6,7 @@ from __future__ import annotations
class ModuleDocFragment(object):
- DOCUMENTATION = r'''
+ DOCUMENTATION = r"""
options:
testcol2option:
description:
@@ -43,4 +43,4 @@ options:
alternative: none
why: Test option deprecation
version: '2.0.0'
-'''
+"""
diff --git a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/version_added.py b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/version_added.py
index d901404839..1cbd2f4634 100644
--- a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/version_added.py
+++ b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol2/plugins/doc_fragments/version_added.py
@@ -6,7 +6,7 @@ from __future__ import annotations
class ModuleDocFragment(object):
- DOCUMENTATION = r'''
+ DOCUMENTATION = r"""
options: {}
version_added: 1.0.0
-'''
+"""
diff --git a/test/integration/targets/ansible-doc/filter_plugins/other.py b/test/integration/targets/ansible-doc/filter_plugins/other.py
index 3392dd5b47..cea7c9740a 100644
--- a/test/integration/targets/ansible-doc/filter_plugins/other.py
+++ b/test/integration/targets/ansible-doc/filter_plugins/other.py
@@ -12,7 +12,7 @@ def donothing(a):
class FilterModule(object):
- ''' Ansible core jinja2 filters '''
+ """ Ansible core jinja2 filters """
def filters(self):
return {
diff --git a/test/integration/targets/ansible-doc/library/double_doc.py b/test/integration/targets/ansible-doc/library/double_doc.py
index 80bd3dda3f..71d95af3a0 100644
--- a/test/integration/targets/ansible-doc/library/double_doc.py
+++ b/test/integration/targets/ansible-doc/library/double_doc.py
@@ -2,11 +2,11 @@
from __future__ import annotations
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
name: double_doc
description:
- module also uses 'DOCUMENTATION' in class
-'''
+"""
class Foo:
diff --git a/test/integration/targets/ansible-doc/library/test_docs.py b/test/integration/targets/ansible-doc/library/test_docs.py
index ba7817d8a2..84ced6a8cc 100644
--- a/test/integration/targets/ansible-doc/library/test_docs.py
+++ b/test/integration/targets/ansible-doc/library/test_docs.py
@@ -6,7 +6,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'core'}
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: test_docs
short_description: Test module
@@ -14,13 +14,13 @@ description:
- Test module
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
-'''
+RETURN = """
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-doc/library/test_docs_missing_description.py b/test/integration/targets/ansible-doc/library/test_docs_missing_description.py
index 40f39ef583..f6d371cc3e 100644
--- a/test/integration/targets/ansible-doc/library/test_docs_missing_description.py
+++ b/test/integration/targets/ansible-doc/library/test_docs_missing_description.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: test_docs_returns
short_description: Test module
@@ -13,13 +13,13 @@ author:
options:
test:
type: str
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
-'''
+RETURN = """
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-doc/library/test_docs_no_metadata.py b/test/integration/targets/ansible-doc/library/test_docs_no_metadata.py
index b4344e99fa..827a1b2f43 100644
--- a/test/integration/targets/ansible-doc/library/test_docs_no_metadata.py
+++ b/test/integration/targets/ansible-doc/library/test_docs_no_metadata.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: test_docs_no_metadata
short_description: Test module
@@ -10,13 +10,13 @@ description:
- Test module
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
-'''
+RETURN = """
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-doc/library/test_docs_no_status.py b/test/integration/targets/ansible-doc/library/test_docs_no_status.py
index f870e666d4..0b3f0dc2b5 100644
--- a/test/integration/targets/ansible-doc/library/test_docs_no_status.py
+++ b/test/integration/targets/ansible-doc/library/test_docs_no_status.py
@@ -5,7 +5,7 @@ from __future__ import annotations
ANSIBLE_METADATA = {'metadata_version': '1.1',
'supported_by': 'core'}
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: test_docs_no_status
short_description: Test module
@@ -13,13 +13,13 @@ description:
- Test module
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
-'''
+RETURN = """
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-doc/library/test_docs_non_iterable_status.py b/test/integration/targets/ansible-doc/library/test_docs_non_iterable_status.py
index 6e78ea7c54..5c5128b74a 100644
--- a/test/integration/targets/ansible-doc/library/test_docs_non_iterable_status.py
+++ b/test/integration/targets/ansible-doc/library/test_docs_non_iterable_status.py
@@ -6,7 +6,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': 1,
'supported_by': 'core'}
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: test_docs_non_iterable_status
short_description: Test module
@@ -14,13 +14,13 @@ description:
- Test module
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
-'''
+RETURN = """
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-doc/library/test_docs_removed_precedence.py b/test/integration/targets/ansible-doc/library/test_docs_removed_precedence.py
index fdba64e5ad..8817c1204d 100644
--- a/test/integration/targets/ansible-doc/library/test_docs_removed_precedence.py
+++ b/test/integration/targets/ansible-doc/library/test_docs_removed_precedence.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: test_docs_removed_precedence
short_description: Test module
@@ -15,13 +15,13 @@ deprecated:
why: Updated module released with more functionality
removed_at_date: '2022-06-01'
removed_in: '2.14'
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
-'''
+RETURN = """
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-doc/library/test_docs_removed_status.py b/test/integration/targets/ansible-doc/library/test_docs_removed_status.py
index 18f32a2b50..d894a4a030 100644
--- a/test/integration/targets/ansible-doc/library/test_docs_removed_status.py
+++ b/test/integration/targets/ansible-doc/library/test_docs_removed_status.py
@@ -6,7 +6,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['removed'],
'supported_by': 'core'}
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: test_docs_removed_status
short_description: Test module
@@ -14,13 +14,13 @@ description:
- Test module
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
-'''
+RETURN = """
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-doc/library/test_docs_returns.py b/test/integration/targets/ansible-doc/library/test_docs_returns.py
index d21abf3efc..f1079ae7b3 100644
--- a/test/integration/targets/ansible-doc/library/test_docs_returns.py
+++ b/test/integration/targets/ansible-doc/library/test_docs_returns.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: test_docs_returns
short_description: Test module
@@ -10,12 +10,12 @@ description:
- Test module
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
+RETURN = """
z_last:
description: A last result.
type: str
@@ -37,7 +37,7 @@ a_first:
description: A first result.
type: str
returned: success
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-doc/library/test_docs_returns_broken.py b/test/integration/targets/ansible-doc/library/test_docs_returns_broken.py
index 0c3119bc25..f7ce2dd2ec 100644
--- a/test/integration/targets/ansible-doc/library/test_docs_returns_broken.py
+++ b/test/integration/targets/ansible-doc/library/test_docs_returns_broken.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: test_docs_returns_broken
short_description: Test module
@@ -10,18 +10,18 @@ description:
- Test module
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
+RETURN = """
test:
description: A test return value.
type: str
broken_key: [
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-doc/library/test_docs_suboptions.py b/test/integration/targets/ansible-doc/library/test_docs_suboptions.py
index 7f93e22d46..b25643a147 100644
--- a/test/integration/targets/ansible-doc/library/test_docs_suboptions.py
+++ b/test/integration/targets/ansible-doc/library/test_docs_suboptions.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: test_docs_suboptions
short_description: Test module
@@ -31,13 +31,13 @@ options:
a_first:
description: The first suboption.
type: str
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
-'''
+RETURN = """
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-doc/library/test_docs_yaml_anchors.py b/test/integration/targets/ansible-doc/library/test_docs_yaml_anchors.py
index 419f350433..3e8fbb06ab 100644
--- a/test/integration/targets/ansible-doc/library/test_docs_yaml_anchors.py
+++ b/test/integration/targets/ansible-doc/library/test_docs_yaml_anchors.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: test_docs_yaml_anchors
short_description: Test module with YAML anchors in docs
@@ -37,13 +37,13 @@ options:
type: list
elements: dict
suboptions: *sub_anchor
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
-'''
+RETURN = """
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-doc/lookup_plugins/_deprecated_with_docs.py b/test/integration/targets/ansible-doc/lookup_plugins/_deprecated_with_docs.py
index 449f392254..55b50b0572 100644
--- a/test/integration/targets/ansible-doc/lookup_plugins/_deprecated_with_docs.py
+++ b/test/integration/targets/ansible-doc/lookup_plugins/_deprecated_with_docs.py
@@ -4,7 +4,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
name: deprecated_with_docs
short_description: test lookup
description: test lookup
@@ -16,10 +16,10 @@ DOCUMENTATION = '''
removed_in: "2.16"
removed_from_collection: "ansible.legacy"
options: {}
-'''
+"""
-EXAMPLE = '''
-'''
+EXAMPLE = """
+"""
-RETURN = '''
-'''
+RETURN = """
+"""
diff --git a/test/integration/targets/ansible-galaxy-collection/files/test_module.py b/test/integration/targets/ansible-galaxy-collection/files/test_module.py
index d4bb3c3c66..0fae1fd4c8 100644
--- a/test/integration/targets/ansible-galaxy-collection/files/test_module.py
+++ b/test/integration/targets/ansible-galaxy-collection/files/test_module.py
@@ -7,7 +7,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: ping
version_added: historical
@@ -32,9 +32,9 @@ seealso:
author:
- Ansible Core Team
- Michael DeHaan
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
# Test we can logon to 'webservers' and execute python with json lib.
# ansible webservers -m ping
@@ -44,15 +44,15 @@ EXAMPLES = '''
- name: Induce an exception to see what happens
ping:
data: crash
-'''
+"""
-RETURN = '''
+RETURN = """
ping:
description: value provided with the data parameter
returned: success
type: str
sample: pong
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-galaxy-collection/library/reset_pulp.py b/test/integration/targets/ansible-galaxy-collection/library/reset_pulp.py
index 90397a55a9..72fa7706cc 100644
--- a/test/integration/targets/ansible-galaxy-collection/library/reset_pulp.py
+++ b/test/integration/targets/ansible-galaxy-collection/library/reset_pulp.py
@@ -5,7 +5,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: reset_pulp
short_description: Resets pulp back to the initial state
@@ -48,9 +48,9 @@ options:
elements: str
author:
- Jordan Borean (@jborean93)
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
- name: reset pulp content
reset_pulp:
pulp_api: http://galaxy:24817
@@ -61,11 +61,11 @@ EXAMPLES = '''
namespaces:
- namespace1
- namespace2
-'''
+"""
-RETURN = '''
+RETURN = """
#
-'''
+"""
import json
diff --git a/test/integration/targets/ansible-galaxy-collection/library/setup_collections.py b/test/integration/targets/ansible-galaxy-collection/library/setup_collections.py
index b7d262aced..9efd7bbef6 100644
--- a/test/integration/targets/ansible-galaxy-collection/library/setup_collections.py
+++ b/test/integration/targets/ansible-galaxy-collection/library/setup_collections.py
@@ -11,7 +11,7 @@ ANSIBLE_METADATA = {
'supported_by': 'community'
}
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: setup_collections
short_description: Set up test collections based on the input
@@ -57,9 +57,9 @@ options:
default: '{}'
author:
- Jordan Borean (@jborean93)
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
- name: Build test collections
setup_collections:
path: ~/ansible/collections/ansible_collections
@@ -70,11 +70,11 @@ EXAMPLES = '''
- namespace: namespace1
name: name1
version: 0.0.2
-'''
+"""
-RETURN = '''
+RETURN = """
#
-'''
+"""
import datetime
import os
diff --git a/test/integration/targets/ansible-test-docker/ansible_collections/ns/col/plugins/doc_fragments/ps_util.py b/test/integration/targets/ansible-test-docker/ansible_collections/ns/col/plugins/doc_fragments/ps_util.py
index c8e8b70903..aa82b7fbf7 100644
--- a/test/integration/targets/ansible-test-docker/ansible_collections/ns/col/plugins/doc_fragments/ps_util.py
+++ b/test/integration/targets/ansible-test-docker/ansible_collections/ns/col/plugins/doc_fragments/ps_util.py
@@ -8,7 +8,7 @@ from __future__ import annotations
class ModuleDocFragment:
- DOCUMENTATION = r'''
+ DOCUMENTATION = r"""
options:
option1:
description:
@@ -17,4 +17,4 @@ options:
aliases:
- alias1
type: str
-'''
+"""
diff --git a/test/integration/targets/ansible-test-docker/ansible_collections/ns/col/plugins/modules/hello.py b/test/integration/targets/ansible-test-docker/ansible_collections/ns/col/plugins/modules/hello.py
index a685933096..664ae43bb6 100644
--- a/test/integration/targets/ansible-test-docker/ansible_collections/ns/col/plugins/modules/hello.py
+++ b/test/integration/targets/ansible-test-docker/ansible_collections/ns/col/plugins/modules/hello.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: hello
short_description: Hello test module
description: Hello test module.
@@ -13,13 +13,13 @@ options:
type: str
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
- minimal:
-'''
+"""
-RETURN = ''''''
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
from ..module_utils.my_util import hello
diff --git a/test/integration/targets/ansible-test-docker/ansible_collections/ns/col/plugins/modules/win_util_args.py b/test/integration/targets/ansible-test-docker/ansible_collections/ns/col/plugins/modules/win_util_args.py
index ed49f4ea81..15d9f2af0e 100644
--- a/test/integration/targets/ansible-test-docker/ansible_collections/ns/col/plugins/modules/win_util_args.py
+++ b/test/integration/targets/ansible-test-docker/ansible_collections/ns/col/plugins/modules/win_util_args.py
@@ -9,7 +9,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'core'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_util_args
short_description: Short description
@@ -26,14 +26,14 @@ extends_documentation_fragment:
author:
- Ansible Test (@ansible)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
- win_util_args:
option1: test
my_opt: test
-'''
+"""
-RETURN = r'''
+RETURN = r"""
#
-'''
+"""
diff --git a/test/integration/targets/ansible-test-integration/ansible_collections/ns/col/plugins/modules/hello.py b/test/integration/targets/ansible-test-integration/ansible_collections/ns/col/plugins/modules/hello.py
index 06ff6d4bc6..862c855e36 100644
--- a/test/integration/targets/ansible-test-integration/ansible_collections/ns/col/plugins/modules/hello.py
+++ b/test/integration/targets/ansible-test-integration/ansible_collections/ns/col/plugins/modules/hello.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: hello
short_description: Hello test module
description: Hello test module.
@@ -13,13 +13,13 @@ options:
type: str
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
- hello:
-'''
+"""
-RETURN = ''''''
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
from ..module_utils.my_util import hello
diff --git a/test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/_module3.py b/test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/_module3.py
index 41784aeee0..9eae686e53 100644
--- a/test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/_module3.py
+++ b/test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/_module3.py
@@ -3,19 +3,19 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: _module3
short_description: Another test module
description: This is a test module that has not been deprecated.
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
- minimal:
-'''
+"""
-RETURN = ''''''
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/a/b/module2.py b/test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/a/b/module2.py
index 500beaa873..3c00538e0c 100644
--- a/test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/a/b/module2.py
+++ b/test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/a/b/module2.py
@@ -3,20 +3,20 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: module2
short_description: Hello test module
description: Hello test module.
options: {}
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
- minimal:
-'''
+"""
-RETURN = ''''''
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/module1.py b/test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/module1.py
index 45e3977438..e3f8a89c71 100644
--- a/test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/module1.py
+++ b/test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/module1.py
@@ -3,20 +3,20 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: module1
short_description: Hello test module
description: Hello test module.
options: {}
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
- minimal:
-'''
+"""
-RETURN = ''''''
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-import/ansible_collections/ns/col/plugins/lookup/vendor1.py b/test/integration/targets/ansible-test-sanity-import/ansible_collections/ns/col/plugins/lookup/vendor1.py
index 3cf63c0a65..9adcca7e95 100644
--- a/test/integration/targets/ansible-test-sanity-import/ansible_collections/ns/col/plugins/lookup/vendor1.py
+++ b/test/integration/targets/ansible-test-sanity-import/ansible_collections/ns/col/plugins/lookup/vendor1.py
@@ -2,16 +2,16 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
name: vendor1
short_description: lookup
description: Lookup.
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = '''#'''
+EXAMPLES = """#"""
+RETURN = """#"""
from ansible.plugins.lookup import LookupBase
# noinspection PyUnresolvedReferences
diff --git a/test/integration/targets/ansible-test-sanity-import/ansible_collections/ns/col/plugins/lookup/vendor2.py b/test/integration/targets/ansible-test-sanity-import/ansible_collections/ns/col/plugins/lookup/vendor2.py
index d22f7184bd..576576fd94 100644
--- a/test/integration/targets/ansible-test-sanity-import/ansible_collections/ns/col/plugins/lookup/vendor2.py
+++ b/test/integration/targets/ansible-test-sanity-import/ansible_collections/ns/col/plugins/lookup/vendor2.py
@@ -2,16 +2,16 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
name: vendor2
short_description: lookup
description: Lookup.
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = '''#'''
+EXAMPLES = """#"""
+RETURN = """#"""
from ansible.plugins.lookup import LookupBase
# noinspection PyUnresolvedReferences
diff --git a/test/integration/targets/ansible-test-sanity-pylint/ansible_collections/ns/col/plugins/lookup/deprecated.py b/test/integration/targets/ansible-test-sanity-pylint/ansible_collections/ns/col/plugins/lookup/deprecated.py
index 1066e64917..4fd6ae4041 100644
--- a/test/integration/targets/ansible-test-sanity-pylint/ansible_collections/ns/col/plugins/lookup/deprecated.py
+++ b/test/integration/targets/ansible-test-sanity-pylint/ansible_collections/ns/col/plugins/lookup/deprecated.py
@@ -2,16 +2,16 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
name: deprecated
short_description: lookup
description: Lookup.
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = '''#'''
+EXAMPLES = """#"""
+RETURN = """#"""
from ansible.plugins.lookup import LookupBase
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/_not_deprecated.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/_not_deprecated.py
index 4b4b09134e..85f6ec387d 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/_not_deprecated.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/_not_deprecated.py
@@ -3,16 +3,16 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: _not_deprecated
short_description: This module is not deprecated
description: Its name has a leading underscore, but it is not deprecated.
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = ''''''
+EXAMPLES = """#"""
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_1.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_1.py
index 7f53b26bea..2fdf6d5315 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_1.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_1.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: check_mode_attribute_1
short_description: Test for check mode attribute 1
description: Test for check mode attribute 1.
@@ -19,10 +19,10 @@ attributes:
support: none
platform:
platforms: all
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = ''''''
+EXAMPLES = """#"""
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_2.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_2.py
index 263e5b8238..940b9252b2 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_2.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_2.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: check_mode_attribute_2
short_description: Test for check mode attribute 2
description: Test for check mode attribute 2.
@@ -20,10 +20,10 @@ attributes:
support: none
platform:
platforms: all
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = ''''''
+EXAMPLES = """#"""
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_3.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_3.py
index a2bf699568..f9628c8534 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_3.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_3.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: check_mode_attribute_3
short_description: Test for check mode attribute 3
description: Test for check mode attribute 3.
@@ -19,10 +19,10 @@ attributes:
support: none
platform:
platforms: all
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = ''''''
+EXAMPLES = """#"""
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_4.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_4.py
index 0d442e8729..32a8bb76e0 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_4.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_4.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: check_mode_attribute_4
short_description: Test for check mode attribute 4
description: Test for check mode attribute 4.
@@ -19,10 +19,10 @@ attributes:
support: none
platform:
platforms: all
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = ''''''
+EXAMPLES = """#"""
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_5.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_5.py
index 86bc94f71f..27286358bf 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_5.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_5.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: check_mode_attribute_5
short_description: Test for check mode attribute 5
description: Test for check mode attribute 5.
@@ -19,10 +19,10 @@ attributes:
support: none
platform:
platforms: all
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = ''''''
+EXAMPLES = """#"""
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_6.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_6.py
index 966d62cc4f..a83a9b6609 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_6.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_6.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: check_mode_attribute_6
short_description: Test for check mode attribute 6
description: Test for check mode attribute 6.
@@ -20,10 +20,10 @@ attributes:
support: none
platform:
platforms: all
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = ''''''
+EXAMPLES = """#"""
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_7.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_7.py
index 0b77937f2b..a67cefd17c 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_7.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/check_mode_attribute_7.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: check_mode_attribute_7
short_description: Test for check mode attribute 7
description: Test for check mode attribute 7.
@@ -19,10 +19,10 @@ attributes:
support: none
platform:
platforms: all
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = ''''''
+EXAMPLES = """#"""
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/import_order.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/import_order.py
index 84c2ed9ba4..dc3b981439 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/import_order.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/import_order.py
@@ -6,16 +6,16 @@ from __future__ import annotations
from ansible.module_utils.basic import AnsibleModule
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: import_order
short_description: Import order test module
description: Import order test module.
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = ''''''
+EXAMPLES = """#"""
+RETURN = """"""
if __name__ == '__main__':
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/invalid_argument_spec_extra_key.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/invalid_argument_spec_extra_key.py
index 04807a1ee1..86057c92ae 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/invalid_argument_spec_extra_key.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/invalid_argument_spec_extra_key.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: invalid_argument_spec_extra_key
short_description: Invalid argument spec extra key schema test module
description: Invalid argument spec extra key schema test module
@@ -13,10 +13,10 @@ options:
foo:
description: foo
type: str
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = ''''''
+EXAMPLES = """#"""
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/invalid_argument_spec_incorrect_context.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/invalid_argument_spec_incorrect_context.py
index 6e3d244134..1377ced9df 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/invalid_argument_spec_incorrect_context.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/invalid_argument_spec_incorrect_context.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: invalid_argument_spec_incorrect_context
short_description: Invalid argument spec incorrect context schema test module
description: Invalid argument spec incorrect context schema test module
@@ -13,10 +13,10 @@ options:
foo:
description: foo
type: str
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = ''''''
+EXAMPLES = """#"""
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/invalid_yaml_syntax.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/invalid_yaml_syntax.py
index 7931798945..a669419c0e 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/invalid_yaml_syntax.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/invalid_yaml_syntax.py
@@ -3,17 +3,17 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
- key: "value"wrong
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
- key: "value"wrong
-'''
+"""
-RETURN = '''
+RETURN = """
- key: "value"wrong
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/no_callable.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/no_callable.py
index 7004c70845..ac7aeea64e 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/no_callable.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/no_callable.py
@@ -3,16 +3,16 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: no_callable
short_description: No callale test module
description: No callable test module.
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = ''''''
+EXAMPLES = """#"""
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/option_name_casing.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/option_name_casing.py
index 7ffd75bb7c..933c68f1f4 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/option_name_casing.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/option_name_casing.py
@@ -4,7 +4,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: option_name_casing
short_description: Option names equal up to casing
description: Option names equal up to casing.
@@ -28,10 +28,10 @@ options:
aliases:
- baR
type: str
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = ''''''
+EXAMPLES = """#"""
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/semantic_markup.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/semantic_markup.py
index 86eca45f4e..dfefee33a3 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/semantic_markup.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/semantic_markup.py
@@ -4,7 +4,7 @@
from __future__ import annotations
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
module: semantic_markup
short_description: Test semantic markup
description:
@@ -91,17 +91,17 @@ options:
- O(bar=bam).
- O(foo.bar=1).
type: str
-'''
+"""
-EXAMPLES = '''#'''
+EXAMPLES = """#"""
-RETURN = r'''
+RETURN = r"""
bar:
description: Bar.
type: int
returned: success
sample: 5
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/valid_argument_spec_context.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/valid_argument_spec_context.py
index 2aa67abd19..7882c105f8 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/valid_argument_spec_context.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/valid_argument_spec_context.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: valid_argument_spec_context
short_description: Valid argument spec context schema test module
description: Valid argument spec context schema test module
@@ -13,10 +13,10 @@ options:
foo:
description: foo
type: str
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = ''''''
+EXAMPLES = """#"""
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/wrong_aliases.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/wrong_aliases.py
index f5918659df..5fae338c48 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/wrong_aliases.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/wrong_aliases.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: wrong_aliases
short_description: Aliases that are attached to the wrong option in documentation
description: Aliases that are attached to the wrong option in documentation.
@@ -18,10 +18,10 @@ options:
bar:
description: Bar.
type: str
-'''
+"""
-EXAMPLES = '''#'''
-RETURN = ''''''
+EXAMPLES = """#"""
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/ps_only/plugins/modules/validate.py b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/ps_only/plugins/modules/validate.py
index ee1fb13840..801a0b0c0c 100644
--- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/ps_only/plugins/modules/validate.py
+++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/ps_only/plugins/modules/validate.py
@@ -1,14 +1,14 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
module: validate
short_description: validate
description: validate
author: "validate (@validate)"
-'''
+"""
-EXAMPLES = r'''
-'''
+EXAMPLES = r"""
+"""
-RETURN = r'''
-'''
+RETURN = r"""
+"""
diff --git a/test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/lookup/bad.py b/test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/lookup/bad.py
index 617353b20e..8854e2fef7 100644
--- a/test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/lookup/bad.py
+++ b/test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/lookup/bad.py
@@ -2,20 +2,20 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
name: bad
short_description: Bad lookup
description: A bad lookup.
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
- debug:
msg: "{{ lookup('ns.col.bad') }}"
-'''
+"""
-RETURN = ''' # '''
+RETURN = """ # """
from ansible.plugins.lookup import LookupBase
from ansible import constants # pylint: disable=unused-import
diff --git a/test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/lookup/world.py b/test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/lookup/world.py
index 093447d906..343843fdc4 100644
--- a/test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/lookup/world.py
+++ b/test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/lookup/world.py
@@ -2,20 +2,20 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
name: world
short_description: World lookup
description: A world lookup.
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
- debug:
msg: "{{ lookup('ns.col.world') }}"
-'''
+"""
-RETURN = ''' # '''
+RETURN = """ # """
from ansible.plugins.lookup import LookupBase
from ansible import constants # pylint: disable=unused-import
diff --git a/test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/modules/bad.py b/test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/modules/bad.py
index 72d859adf1..6efe7d469d 100644
--- a/test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/modules/bad.py
+++ b/test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/modules/bad.py
@@ -3,19 +3,19 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: bad
short_description: Bad test module
description: Bad test module.
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
- bad:
-'''
+"""
-RETURN = ''''''
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
from ansible import constants # intentionally trigger pylint ansible-bad-module-import error # pylint: disable=unused-import
diff --git a/test/integration/targets/ansible-test-units/ansible_collections/ns/col/plugins/modules/hello.py b/test/integration/targets/ansible-test-units/ansible_collections/ns/col/plugins/modules/hello.py
index 06ff6d4bc6..862c855e36 100644
--- a/test/integration/targets/ansible-test-units/ansible_collections/ns/col/plugins/modules/hello.py
+++ b/test/integration/targets/ansible-test-units/ansible_collections/ns/col/plugins/modules/hello.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
module: hello
short_description: Hello test module
description: Hello test module.
@@ -13,13 +13,13 @@ options:
type: str
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
- hello:
-'''
+"""
-RETURN = ''''''
+RETURN = """"""
from ansible.module_utils.basic import AnsibleModule
from ..module_utils.my_util import hello
diff --git a/test/integration/targets/callback_results/callback_plugins/track_connections.py b/test/integration/targets/callback_results/callback_plugins/track_connections.py
index ba161a7802..de033762f1 100644
--- a/test/integration/targets/callback_results/callback_plugins/track_connections.py
+++ b/test/integration/targets/callback_results/callback_plugins/track_connections.py
@@ -3,13 +3,13 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
name: track_connections
short_description: Track connection plugins used for hosts
description:
- Track connection plugins used for hosts
type: aggregate
-'''
+"""
import json
from collections import defaultdict
diff --git a/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/callback/usercallback.py b/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/callback/usercallback.py
index 3eb9764a85..3800dc8f7b 100644
--- a/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/callback/usercallback.py
+++ b/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/callback/usercallback.py
@@ -2,13 +2,13 @@ from __future__ import annotations
from ansible.plugins.callback import CallbackBase
-DOCUMENTATION = '''
+DOCUMENTATION = """
callback: usercallback
callback_type: notification
short_description: does stuff
description:
- does some stuff
-'''
+"""
class CallbackModule(CallbackBase):
diff --git a/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/doc_fragments/frag.py b/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/doc_fragments/frag.py
index 8fbcb360ce..067c67e202 100644
--- a/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/doc_fragments/frag.py
+++ b/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/doc_fragments/frag.py
@@ -2,16 +2,16 @@ from __future__ import annotations
class ModuleDocFragment(object):
- DOCUMENTATION = r'''
+ DOCUMENTATION = r"""
options:
normal_doc_frag:
description:
- an option
-'''
+"""
- OTHER_DOCUMENTATION = r'''
+ OTHER_DOCUMENTATION = r"""
options:
other_doc_frag:
description:
- another option
-'''
+"""
diff --git a/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/testmodule.py b/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/testmodule.py
index 6ec24b4e95..d6fde64f11 100644
--- a/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/testmodule.py
+++ b/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/testmodule.py
@@ -3,13 +3,13 @@ from __future__ import annotations
import json
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
module: testmodule
description: for testing
extends_documentation_fragment:
- testns.testcoll.frag
- testns.testcoll.frag.other_documentation
-'''
+"""
def main():
diff --git a/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/testmodule_bad_docfrags.py b/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/testmodule_bad_docfrags.py
index d39efc8d22..2534b5b403 100644
--- a/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/testmodule_bad_docfrags.py
+++ b/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/testmodule_bad_docfrags.py
@@ -3,7 +3,7 @@ from __future__ import annotations
import json
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
module: testmodule
description: for testing
extends_documentation_fragment:
@@ -13,7 +13,7 @@ extends_documentation_fragment:
- testns.boguscoll.frag
- testns.testcoll.bogusfrag
- testns.testcoll.frag.bogusvar
-'''
+"""
def main():
diff --git a/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/vars/custom_vars.py b/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/vars/custom_vars.py
index e1997ae74e..49f876247f 100644
--- a/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/vars/custom_vars.py
+++ b/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/vars/custom_vars.py
@@ -17,7 +17,7 @@
#############################################
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
vars: custom_vars
version_added: "2.10"
short_description: load host and group vars
@@ -31,7 +31,7 @@ DOCUMENTATION = '''
section: custom_vars
env:
- name: ANSIBLE_VARS_PLUGIN_STAGE
-'''
+"""
from ansible.plugins.vars import BaseVarsPlugin
diff --git a/test/integration/targets/collections/collections/ansible_collections/me/mycoll1/plugins/action/action1.py b/test/integration/targets/collections/collections/ansible_collections/me/mycoll1/plugins/action/action1.py
index 43f8ec3293..93ff9b450c 100644
--- a/test/integration/targets/collections/collections/ansible_collections/me/mycoll1/plugins/action/action1.py
+++ b/test/integration/targets/collections/collections/ansible_collections/me/mycoll1/plugins/action/action1.py
@@ -6,7 +6,7 @@ from ansible.plugins.action import ActionBase
class ActionModule(ActionBase):
def run(self, tmp=None, task_vars=None):
- ''' handler for file transfer operations '''
+ """ handler for file transfer operations """
if task_vars is None:
task_vars = dict()
diff --git a/test/integration/targets/collections/collections/ansible_collections/me/mycoll1/plugins/modules/action1.py b/test/integration/targets/collections/collections/ansible_collections/me/mycoll1/plugins/modules/action1.py
index 03b165169b..8cfc159cf4 100644
--- a/test/integration/targets/collections/collections/ansible_collections/me/mycoll1/plugins/modules/action1.py
+++ b/test/integration/targets/collections/collections/ansible_collections/me/mycoll1/plugins/modules/action1.py
@@ -6,7 +6,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'core'}
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: action1
short_description: Action Test module
@@ -14,10 +14,10 @@ description:
- Action Test module
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
-'''
+RETURN = """
+"""
diff --git a/test/integration/targets/collections/collections/ansible_collections/me/mycoll2/plugins/modules/module1.py b/test/integration/targets/collections/collections/ansible_collections/me/mycoll2/plugins/modules/module1.py
index b0d3f6da3c..0aaccde10e 100644
--- a/test/integration/targets/collections/collections/ansible_collections/me/mycoll2/plugins/modules/module1.py
+++ b/test/integration/targets/collections/collections/ansible_collections/me/mycoll2/plugins/modules/module1.py
@@ -6,7 +6,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'core'}
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: module1
short_description: module1 Test module
@@ -14,13 +14,13 @@ description:
- module1 Test module
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
-'''
+RETURN = """
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/collections/collections/ansible_collections/testns/content_adj/plugins/cache/custom_jsonfile.py b/test/integration/targets/collections/collections/ansible_collections/testns/content_adj/plugins/cache/custom_jsonfile.py
index 393a43f81b..5373ad34c2 100644
--- a/test/integration/targets/collections/collections/ansible_collections/testns/content_adj/plugins/cache/custom_jsonfile.py
+++ b/test/integration/targets/collections/collections/ansible_collections/testns/content_adj/plugins/cache/custom_jsonfile.py
@@ -4,7 +4,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
cache: jsonfile
short_description: JSON formatted files.
description:
@@ -37,7 +37,7 @@ DOCUMENTATION = '''
- key: fact_caching_timeout
section: defaults
type: integer
-'''
+"""
import codecs
import json
diff --git a/test/integration/targets/collections/collections/ansible_collections/testns/content_adj/plugins/inventory/statichost.py b/test/integration/targets/collections/collections/ansible_collections/testns/content_adj/plugins/inventory/statichost.py
index b2405e322e..aa0d179e49 100644
--- a/test/integration/targets/collections/collections/ansible_collections/testns/content_adj/plugins/inventory/statichost.py
+++ b/test/integration/targets/collections/collections/ansible_collections/testns/content_adj/plugins/inventory/statichost.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
inventory: statichost
short_description: Add a single host
description: Add a single host
@@ -16,7 +16,7 @@ DOCUMENTATION = '''
hostname:
description: Toggle display of stderr even when script was successful
required: True
-'''
+"""
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable
@@ -32,7 +32,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
self._hosts = set()
def verify_file(self, path):
- ''' Verify if file is usable by this plugin, base does minimal accessibility check '''
+ """ Verify if file is usable by this plugin, base does minimal accessibility check """
if not path.endswith('.statichost.yml') and not path.endswith('.statichost.yaml'):
return False
diff --git a/test/integration/targets/collections/collections/ansible_collections/testns/content_adj/plugins/vars/custom_adj_vars.py b/test/integration/targets/collections/collections/ansible_collections/testns/content_adj/plugins/vars/custom_adj_vars.py
index b98fe7bba2..0b51e731a2 100644
--- a/test/integration/targets/collections/collections/ansible_collections/testns/content_adj/plugins/vars/custom_adj_vars.py
+++ b/test/integration/targets/collections/collections/ansible_collections/testns/content_adj/plugins/vars/custom_adj_vars.py
@@ -17,7 +17,7 @@
#############################################
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
vars: custom_adj_vars
version_added: "2.10"
short_description: load host and group vars
@@ -32,7 +32,7 @@ DOCUMENTATION = '''
section: custom_adj_vars
env:
- name: ANSIBLE_VARS_PLUGIN_STAGE
-'''
+"""
from ansible.plugins.vars import BaseVarsPlugin
diff --git a/test/integration/targets/collections/custom_vars_plugins/v1_vars_plugin.py b/test/integration/targets/collections/custom_vars_plugins/v1_vars_plugin.py
index ce79baa7f2..5511912722 100644
--- a/test/integration/targets/collections/custom_vars_plugins/v1_vars_plugin.py
+++ b/test/integration/targets/collections/custom_vars_plugins/v1_vars_plugin.py
@@ -17,14 +17,14 @@
#############################################
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
vars: v1_vars_plugin
version_added: "2.10"
short_description: load host and group vars
description:
- Third-party vars plugin to test loading host and group vars without enabling and without a plugin-specific stage option
options:
-'''
+"""
from ansible.plugins.vars import BaseVarsPlugin
diff --git a/test/integration/targets/collections/custom_vars_plugins/v2_vars_plugin.py b/test/integration/targets/collections/custom_vars_plugins/v2_vars_plugin.py
index a6894ac912..1b2cb008a2 100644
--- a/test/integration/targets/collections/custom_vars_plugins/v2_vars_plugin.py
+++ b/test/integration/targets/collections/custom_vars_plugins/v2_vars_plugin.py
@@ -17,7 +17,7 @@
#############################################
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
vars: v2_vars_plugin
version_added: "2.10"
short_description: load host and group vars
@@ -32,7 +32,7 @@ DOCUMENTATION = '''
section: other_vars_plugin
env:
- name: ANSIBLE_VARS_PLUGIN_STAGE
-'''
+"""
from ansible.plugins.vars import BaseVarsPlugin
diff --git a/test/integration/targets/collections/test_task_resolved_plugin/callback_plugins/display_resolved_action.py b/test/integration/targets/collections/test_task_resolved_plugin/callback_plugins/display_resolved_action.py
index ba71668426..5100ae29f3 100644
--- a/test/integration/targets/collections/test_task_resolved_plugin/callback_plugins/display_resolved_action.py
+++ b/test/integration/targets/collections/test_task_resolved_plugin/callback_plugins/display_resolved_action.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
name: display_resolved_action
type: aggregate
short_description: Displays the requested and resolved actions at the end of a playbook.
@@ -11,7 +11,7 @@ DOCUMENTATION = '''
- Displays the requested and resolved actions in the format "requested == resolved".
requirements:
- Enable in configuration.
-'''
+"""
from ansible.plugins.callback import CallbackBase
diff --git a/test/integration/targets/collections/test_task_resolved_plugin/collections/ansible_collections/test_ns/test_coll/plugins/modules/collection_module.py b/test/integration/targets/collections/test_task_resolved_plugin/collections/ansible_collections/test_ns/test_coll/plugins/modules/collection_module.py
index ddfa9097f7..d5b09a78df 100644
--- a/test/integration/targets/collections/test_task_resolved_plugin/collections/ansible_collections/test_ns/test_coll/plugins/modules/collection_module.py
+++ b/test/integration/targets/collections/test_task_resolved_plugin/collections/ansible_collections/test_ns/test_coll/plugins/modules/collection_module.py
@@ -5,7 +5,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: collection_module
short_description: A module to test a task's resolved action name.
@@ -14,7 +14,7 @@ options: {}
author: Ansible Core Team
notes:
- Supports C(check_mode).
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/collections/test_task_resolved_plugin/library/legacy_module.py b/test/integration/targets/collections/test_task_resolved_plugin/library/legacy_module.py
index 98fccbbdf4..2c4e55f82c 100644
--- a/test/integration/targets/collections/test_task_resolved_plugin/library/legacy_module.py
+++ b/test/integration/targets/collections/test_task_resolved_plugin/library/legacy_module.py
@@ -5,7 +5,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: legacy_module
short_description: A module to test a task's resolved action name.
@@ -14,7 +14,7 @@ options: {}
author: Ansible Core Team
notes:
- Supports C(check_mode).
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/collections/testcoll2/plugins/modules/testmodule2.py b/test/integration/targets/collections/testcoll2/plugins/modules/testmodule2.py
index f8db43ec1b..bfe1310d9b 100644
--- a/test/integration/targets/collections/testcoll2/plugins/modules/testmodule2.py
+++ b/test/integration/targets/collections/testcoll2/plugins/modules/testmodule2.py
@@ -5,7 +5,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'core'}
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: testmodule2
short_description: Test module
@@ -13,13 +13,13 @@ description:
- Test module
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
-'''
+RETURN = """
+"""
import json
diff --git a/test/integration/targets/connection_remote_is_local/connection_plugins/remote_is_local.py b/test/integration/targets/connection_remote_is_local/connection_plugins/remote_is_local.py
index 20a309fa35..902ad5240f 100644
--- a/test/integration/targets/connection_remote_is_local/connection_plugins/remote_is_local.py
+++ b/test/integration/targets/connection_remote_is_local/connection_plugins/remote_is_local.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
name: remote_is_local
short_description: remote is local
description:
@@ -14,7 +14,7 @@ DOCUMENTATION = '''
- connection_pipelining
notes:
- The remote user is ignored, the user with which the ansible CLI was executed is used instead.
-'''
+"""
from ansible.plugins.connection.local import Connection as LocalConnection
diff --git a/test/integration/targets/delegate_to/connection_plugins/fakelocal.py b/test/integration/targets/delegate_to/connection_plugins/fakelocal.py
index e0ecdfde5f..6696ac7417 100644
--- a/test/integration/targets/delegate_to/connection_plugins/fakelocal.py
+++ b/test/integration/targets/delegate_to/connection_plugins/fakelocal.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
connection: fakelocal
short_description: dont execute anything
description:
@@ -22,7 +22,7 @@ DOCUMENTATION = '''
key: remote_user
vars:
- name: ansible_user
-'''
+"""
from ansible.errors import AnsibleConnectionFailure
from ansible.plugins.connection import ConnectionBase
@@ -32,7 +32,7 @@ display = Display()
class Connection(ConnectionBase):
- ''' Local based connections '''
+ """ Local based connections """
transport = 'fakelocal'
has_pipelining = True
@@ -43,7 +43,7 @@ class Connection(ConnectionBase):
self.cwd = None
def _connect(self):
- ''' verify '''
+ """ verify """
if self.get_option('remote_user') == 'invaliduser' and self.get_option('password') == 'badpassword':
raise AnsibleConnectionFailure('Got invaliduser and badpassword')
@@ -54,22 +54,22 @@ class Connection(ConnectionBase):
return self
def exec_command(self, cmd, in_data=None, sudoable=True):
- ''' run a command on the local host '''
+ """ run a command on the local host """
super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable)
return 0, '{"msg": "ALL IS GOOD"}', ''
def put_file(self, in_path, out_path):
- ''' transfer a file from local to local '''
+ """ transfer a file from local to local """
super(Connection, self).put_file(in_path, out_path)
def fetch_file(self, in_path, out_path):
- ''' fetch a file from local to local -- for compatibility '''
+ """ fetch a file from local to local -- for compatibility """
super(Connection, self).fetch_file(in_path, out_path)
def close(self):
- ''' terminate the connection; nothing to do here '''
+ """ terminate the connection; nothing to do here """
self._connected = False
diff --git a/test/integration/targets/deprecations/cache_plugins/notjsonfile.py b/test/integration/targets/deprecations/cache_plugins/notjsonfile.py
index dfa20158f7..800fe3bb36 100644
--- a/test/integration/targets/deprecations/cache_plugins/notjsonfile.py
+++ b/test/integration/targets/deprecations/cache_plugins/notjsonfile.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
cache: notjsonfile
short_description: NotJSON cache plugin
description: This cache uses is NOT JSON
@@ -66,7 +66,7 @@ DOCUMENTATION = '''
version: '2.0.0'
env:
- name: ANSIBLE_NOTJSON_CACHE_PLUGIN_REMOVEME
-'''
+"""
from ansible.plugins.cache import BaseFileCacheModule
diff --git a/test/integration/targets/deprecations/library/removeoption.py b/test/integration/targets/deprecations/library/removeoption.py
index 9f08792fcd..0fca3435a8 100644
--- a/test/integration/targets/deprecations/library/removeoption.py
+++ b/test/integration/targets/deprecations/library/removeoption.py
@@ -5,7 +5,7 @@
from __future__ import annotations
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: removeoption
short_description: noop
@@ -42,17 +42,17 @@ attributes:
support: none
platform:
platforms: all
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
- name: useless
remove_option:
one: true
two: /etc/file.conf
-'''
+"""
-RETURN = r'''
-'''
+RETURN = r"""
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/deprecations/library/willremove.py b/test/integration/targets/deprecations/library/willremove.py
index 0c5810d850..87e9176840 100644
--- a/test/integration/targets/deprecations/library/willremove.py
+++ b/test/integration/targets/deprecations/library/willremove.py
@@ -5,7 +5,7 @@
from __future__ import annotations
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: willremove
version_added: histerical
@@ -43,17 +43,17 @@ attributes:
support: none
platform:
platforms: all
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
- name: useless
willremove:
one: true
two: /etc/file.conf
-'''
+"""
-RETURN = r'''
-'''
+RETURN = r"""
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/dict_transformations/library/convert_camelCase.py b/test/integration/targets/dict_transformations/library/convert_camelCase.py
index 0bc267cb68..7767fa7d8e 100644
--- a/test/integration/targets/dict_transformations/library/convert_camelCase.py
+++ b/test/integration/targets/dict_transformations/library/convert_camelCase.py
@@ -6,7 +6,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: convert_camelCase
short_description: test converting data to camelCase
@@ -20,7 +20,7 @@ options:
description: Whether to capitalize the first character
default: False
type: bool
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/dict_transformations/library/convert_snake_case.py b/test/integration/targets/dict_transformations/library/convert_snake_case.py
index b645eb7aa7..9b927be3b3 100644
--- a/test/integration/targets/dict_transformations/library/convert_snake_case.py
+++ b/test/integration/targets/dict_transformations/library/convert_snake_case.py
@@ -6,7 +6,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: convert_snake_case
short_description: test converting data to snake_case
@@ -25,7 +25,7 @@ options:
description: list of top level keys that should not have their contents converted
type: list
default: []
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/gathering_facts/cache_plugins/none.py b/test/integration/targets/gathering_facts/cache_plugins/none.py
index 715f7aec23..0150eb4b64 100644
--- a/test/integration/targets/gathering_facts/cache_plugins/none.py
+++ b/test/integration/targets/gathering_facts/cache_plugins/none.py
@@ -7,14 +7,14 @@ from __future__ import annotations
from ansible.plugins.cache import BaseCacheModule
-DOCUMENTATION = '''
+DOCUMENTATION = """
cache: none
short_description: write-only cache (no cache)
description:
- No caching at all
version_added: historical
author: core team (@ansible-core)
-'''
+"""
class CacheModule(BaseCacheModule):
diff --git a/test/integration/targets/inventory/inventory_plugins/constructed_with_hostvars.py b/test/integration/targets/inventory/inventory_plugins/constructed_with_hostvars.py
index 8e179eb44c..b8f5333413 100644
--- a/test/integration/targets/inventory/inventory_plugins/constructed_with_hostvars.py
+++ b/test/integration/targets/inventory/inventory_plugins/constructed_with_hostvars.py
@@ -3,14 +3,14 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
name: constructed_with_hostvars
options:
plugin:
description: the load name of the plugin
extends_documentation_fragment:
- constructed
-'''
+"""
from ansible.errors import AnsibleParserError
from ansible.module_utils.common.text.converters import to_native
diff --git a/test/integration/targets/inventory_cache/plugins/inventory/cache_host.py b/test/integration/targets/inventory_cache/plugins/inventory/cache_host.py
index 6c93f03d45..8283d3b788 100644
--- a/test/integration/targets/inventory_cache/plugins/inventory/cache_host.py
+++ b/test/integration/targets/inventory_cache/plugins/inventory/cache_host.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
inventory: cache_host
short_description: add a host to inventory and cache it
description: add a host to inventory and cache it
@@ -13,7 +13,7 @@ DOCUMENTATION = '''
plugin:
required: true
description: name of the plugin (cache_host)
-'''
+"""
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable
import random
diff --git a/test/integration/targets/inventory_cache/plugins/inventory/exercise_cache.py b/test/integration/targets/inventory_cache/plugins/inventory/exercise_cache.py
index 04afd0e953..66714eab54 100644
--- a/test/integration/targets/inventory_cache/plugins/inventory/exercise_cache.py
+++ b/test/integration/targets/inventory_cache/plugins/inventory/exercise_cache.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
inventory: exercise_cache
short_description: run tests against the specified cache plugin
description:
@@ -23,7 +23,7 @@ DOCUMENTATION = '''
env: []
cli: []
default: 0 # never expire
-'''
+"""
from ansible.errors import AnsibleError
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable
diff --git a/test/integration/targets/loop-connection/collections/ansible_collections/ns/name/plugins/connection/dummy.py b/test/integration/targets/loop-connection/collections/ansible_collections/ns/name/plugins/connection/dummy.py
index ca2ac250c7..9fb555e7ed 100644
--- a/test/integration/targets/loop-connection/collections/ansible_collections/ns/name/plugins/connection/dummy.py
+++ b/test/integration/targets/loop-connection/collections/ansible_collections/ns/name/plugins/connection/dummy.py
@@ -1,13 +1,13 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
name: dummy
short_description: Used for loop-connection tests
description:
- See above
author: ansible (@core)
-'''
+"""
from ansible.errors import AnsibleError
from ansible.plugins.connection import ConnectionBase
diff --git a/test/integration/targets/module_defaults/action_plugins/debug.py b/test/integration/targets/module_defaults/action_plugins/debug.py
index 63c0779b13..942aa6dab2 100644
--- a/test/integration/targets/module_defaults/action_plugins/debug.py
+++ b/test/integration/targets/module_defaults/action_plugins/debug.py
@@ -24,7 +24,7 @@ from ansible.plugins.action import ActionBase
class ActionModule(ActionBase):
- ''' Print statements during execution '''
+ """ Print statements during execution """
TRANSFERS_FILES = False
_VALID_ARGS = frozenset(('msg', 'var', 'verbosity'))
diff --git a/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/eosfacts.py b/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/eosfacts.py
index 546205b1c9..632f3bb529 100644
--- a/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/eosfacts.py
+++ b/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/eosfacts.py
@@ -6,16 +6,16 @@
from __future__ import annotations
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: eosfacts
short_description: module to test module_defaults
description: module to test module_defaults
version_added: '2.13'
-'''
+"""
-EXAMPLES = r'''
-'''
+EXAMPLES = r"""
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/ios_facts.py b/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/ios_facts.py
index 2e230ec533..4d587c59a9 100644
--- a/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/ios_facts.py
+++ b/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/ios_facts.py
@@ -6,16 +6,16 @@
from __future__ import annotations
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: ios_facts
short_description: module to test module_defaults
description: module to test module_defaults
version_added: '2.13'
-'''
+"""
-EXAMPLES = r'''
-'''
+EXAMPLES = r"""
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/metadata.py b/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/metadata.py
index 439b415578..81a7f626b8 100644
--- a/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/metadata.py
+++ b/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/metadata.py
@@ -6,7 +6,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: metadata
version_added: 2.12
@@ -19,13 +19,13 @@ options:
type: str
author:
- Ansible Core Team
-'''
+"""
-EXAMPLES = '''
-'''
+EXAMPLES = """
+"""
-RETURN = '''
-'''
+RETURN = """
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/module.py b/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/module.py
index f7a1932d7c..710cd23672 100644
--- a/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/module.py
+++ b/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/module.py
@@ -6,16 +6,16 @@
from __future__ import annotations
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: module
short_description: module to test module_defaults
description: module to test module_defaults
version_added: '2.13'
-'''
+"""
-EXAMPLES = r'''
-'''
+EXAMPLES = r"""
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/ping.py b/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/ping.py
index b54b701d57..33c282b888 100644
--- a/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/ping.py
+++ b/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/ping.py
@@ -8,7 +8,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: ping
version_added: historical
@@ -35,9 +35,9 @@ author:
- Michael DeHaan
notes:
- Supports C(check_mode).
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
# Test we can logon to 'webservers' and execute python with json lib.
# ansible webservers -m ping
@@ -47,15 +47,15 @@ EXAMPLES = '''
- name: Induce an exception to see what happens
ansible.builtin.ping:
data: crash
-'''
+"""
-RETURN = '''
+RETURN = """
ping:
description: Value provided with the data parameter.
returned: success
type: str
sample: pong
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/vyosfacts.py b/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/vyosfacts.py
index 7af1c6bdc0..dc3528ed8c 100644
--- a/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/vyosfacts.py
+++ b/test/integration/targets/module_defaults/collections/ansible_collections/testns/testcoll/plugins/modules/vyosfacts.py
@@ -6,16 +6,16 @@
from __future__ import annotations
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: vyosfacts
short_description: module to test module_defaults
description: module to test module_defaults
version_added: '2.13'
-'''
+"""
-EXAMPLES = r'''
-'''
+EXAMPLES = r"""
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/module_defaults/library/legacy_ping.py b/test/integration/targets/module_defaults/library/legacy_ping.py
index b54b701d57..33c282b888 100644
--- a/test/integration/targets/module_defaults/library/legacy_ping.py
+++ b/test/integration/targets/module_defaults/library/legacy_ping.py
@@ -8,7 +8,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: ping
version_added: historical
@@ -35,9 +35,9 @@ author:
- Michael DeHaan
notes:
- Supports C(check_mode).
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
# Test we can logon to 'webservers' and execute python with json lib.
# ansible webservers -m ping
@@ -47,15 +47,15 @@ EXAMPLES = '''
- name: Induce an exception to see what happens
ansible.builtin.ping:
data: crash
-'''
+"""
-RETURN = '''
+RETURN = """
ping:
description: Value provided with the data parameter.
returned: success
type: str
sample: pong
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/module_precedence/lib_with_extension/ping.py b/test/integration/targets/module_precedence/lib_with_extension/ping.py
index ab4a9893d6..f31eb79b12 100644
--- a/test/integration/targets/module_precedence/lib_with_extension/ping.py
+++ b/test/integration/targets/module_precedence/lib_with_extension/ping.py
@@ -26,7 +26,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'supported_by': 'core'}
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: ping
version_added: historical
@@ -40,12 +40,12 @@ options: {}
author:
- "Ansible Core Team"
- "Michael DeHaan"
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
# Test we can logon to 'webservers' and execute python with json lib.
ansible webservers -m ping
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/module_precedence/multiple_roles/bar/library/ping.py b/test/integration/targets/module_precedence/multiple_roles/bar/library/ping.py
index 88fc595d27..a61c8d947b 100644
--- a/test/integration/targets/module_precedence/multiple_roles/bar/library/ping.py
+++ b/test/integration/targets/module_precedence/multiple_roles/bar/library/ping.py
@@ -26,7 +26,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'supported_by': 'core'}
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: ping
version_added: historical
@@ -40,12 +40,12 @@ options: {}
author:
- "Ansible Core Team"
- "Michael DeHaan"
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
# Test we can logon to 'webservers' and execute python with json lib.
ansible webservers -m ping
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/module_precedence/multiple_roles/foo/library/ping.py b/test/integration/targets/module_precedence/multiple_roles/foo/library/ping.py
index 72c3cb8bc0..68c33d055a 100644
--- a/test/integration/targets/module_precedence/multiple_roles/foo/library/ping.py
+++ b/test/integration/targets/module_precedence/multiple_roles/foo/library/ping.py
@@ -26,7 +26,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'supported_by': 'core'}
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: ping
version_added: historical
@@ -40,12 +40,12 @@ options: {}
author:
- "Ansible Core Team"
- "Michael DeHaan"
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
# Test we can logon to 'webservers' and execute python with json lib.
ansible webservers -m ping
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/module_precedence/roles_with_extension/foo/library/ping.py b/test/integration/targets/module_precedence/roles_with_extension/foo/library/ping.py
index 72c3cb8bc0..68c33d055a 100644
--- a/test/integration/targets/module_precedence/roles_with_extension/foo/library/ping.py
+++ b/test/integration/targets/module_precedence/roles_with_extension/foo/library/ping.py
@@ -26,7 +26,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'supported_by': 'core'}
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: ping
version_added: historical
@@ -40,12 +40,12 @@ options: {}
author:
- "Ansible Core Team"
- "Michael DeHaan"
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
# Test we can logon to 'webservers' and execute python with json lib.
ansible webservers -m ping
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
diff --git a/test/integration/targets/module_utils/callback/pure_json.py b/test/integration/targets/module_utils/callback/pure_json.py
index 7a9b800688..b60c1b77ec 100644
--- a/test/integration/targets/module_utils/callback/pure_json.py
+++ b/test/integration/targets/module_utils/callback/pure_json.py
@@ -3,11 +3,11 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
name: pure_json
type: stdout
short_description: only outputs the module results as json
-'''
+"""
import json
diff --git a/test/integration/targets/module_utils_ansible_release/library/ansible_release.py b/test/integration/targets/module_utils_ansible_release/library/ansible_release.py
index 8e15b856d4..7e43bde493 100644
--- a/test/integration/targets/module_utils_ansible_release/library/ansible_release.py
+++ b/test/integration/targets/module_utils_ansible_release/library/ansible_release.py
@@ -4,22 +4,22 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: ansible_release
short_description: Get ansible_release info from module_utils
description: Get ansible_release info from module_utils
author:
- Ansible Project
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
#
-'''
+"""
-RETURN = r'''
+RETURN = r"""
#
-'''
+"""
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.ansible_release import __version__, __author__, __codename__
diff --git a/test/integration/targets/module_utils_urls/library/test_peercert.py b/test/integration/targets/module_utils_urls/library/test_peercert.py
index 7bac222288..cc835c11cd 100644
--- a/test/integration/targets/module_utils_urls/library/test_peercert.py
+++ b/test/integration/targets/module_utils_urls/library/test_peercert.py
@@ -4,7 +4,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: test_perrcert
short_description: Test getting the peer certificate of a HTTP response
@@ -16,15 +16,15 @@ options:
type: str
author:
- Ansible Project
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
#
-'''
+"""
-RETURN = r'''
+RETURN = r"""
#
-'''
+"""
import base64
diff --git a/test/integration/targets/old_style_cache_plugins/plugins/cache/configurable_redis.py b/test/integration/targets/old_style_cache_plugins/plugins/cache/configurable_redis.py
index 805cdbafe8..631201ebaa 100644
--- a/test/integration/targets/old_style_cache_plugins/plugins/cache/configurable_redis.py
+++ b/test/integration/targets/old_style_cache_plugins/plugins/cache/configurable_redis.py
@@ -3,7 +3,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
cache: configurable_redis
short_description: Use Redis DB for cache
description:
@@ -38,7 +38,7 @@ DOCUMENTATION = '''
- key: fact_caching_timeout
section: defaults
type: integer
-'''
+"""
import time
import json
diff --git a/test/integration/targets/old_style_cache_plugins/plugins/cache/legacy_redis.py b/test/integration/targets/old_style_cache_plugins/plugins/cache/legacy_redis.py
index 98bd188c24..773d32977e 100644
--- a/test/integration/targets/old_style_cache_plugins/plugins/cache/legacy_redis.py
+++ b/test/integration/targets/old_style_cache_plugins/plugins/cache/legacy_redis.py
@@ -3,7 +3,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
cache: redis
short_description: Use Redis DB for cache
description:
@@ -37,7 +37,7 @@ DOCUMENTATION = '''
- key: fact_caching_timeout
section: defaults
type: integer
-'''
+"""
import time
import json
diff --git a/test/integration/targets/old_style_cache_plugins/plugins/inventory/test.py b/test/integration/targets/old_style_cache_plugins/plugins/inventory/test.py
index 6dd450f2dd..f1edd60e60 100644
--- a/test/integration/targets/old_style_cache_plugins/plugins/inventory/test.py
+++ b/test/integration/targets/old_style_cache_plugins/plugins/inventory/test.py
@@ -3,13 +3,13 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
name: test
plugin_type: inventory
short_description: test inventory source
extends_documentation_fragment:
- inventory_cache
-'''
+"""
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable
diff --git a/test/integration/targets/plugin_config_for_inventory/cache_plugins/none.py b/test/integration/targets/plugin_config_for_inventory/cache_plugins/none.py
index 771b418c92..449231f803 100644
--- a/test/integration/targets/plugin_config_for_inventory/cache_plugins/none.py
+++ b/test/integration/targets/plugin_config_for_inventory/cache_plugins/none.py
@@ -7,7 +7,7 @@ from __future__ import annotations
from ansible.plugins.cache import BaseCacheModule
-DOCUMENTATION = '''
+DOCUMENTATION = """
cache: none
short_description: write-only cache (no cache)
description:
@@ -24,7 +24,7 @@ DOCUMENTATION = '''
- key: fact_caching_timeout
section: defaults
type: integer
-'''
+"""
class CacheModule(BaseCacheModule):
diff --git a/test/integration/targets/plugin_config_for_inventory/test_inventory.py b/test/integration/targets/plugin_config_for_inventory/test_inventory.py
index ad39efc335..6d34ee566c 100644
--- a/test/integration/targets/plugin_config_for_inventory/test_inventory.py
+++ b/test/integration/targets/plugin_config_for_inventory/test_inventory.py
@@ -1,7 +1,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
name: test_inventory
plugin_type: inventory
authors:
@@ -42,15 +42,15 @@ DOCUMENTATION = '''
type: str
default: prefix_
required: False
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
# Example command line: ansible-inventory --list -i test_inventory.yml
plugin: test_inventory
departments:
- paris
-'''
+"""
from ansible.plugins.inventory import BaseInventoryPlugin
diff --git a/test/integration/targets/plugin_loader/file_collision/roles/r1/filter_plugins/custom.py b/test/integration/targets/plugin_loader/file_collision/roles/r1/filter_plugins/custom.py
index 7adbf7dced..858033c085 100644
--- a/test/integration/targets/plugin_loader/file_collision/roles/r1/filter_plugins/custom.py
+++ b/test/integration/targets/plugin_loader/file_collision/roles/r1/filter_plugins/custom.py
@@ -6,7 +6,7 @@ def do_nothing(myval):
class FilterModule(object):
- ''' Ansible core jinja2 filters '''
+ """ Ansible core jinja2 filters """
def filters(self):
return {
diff --git a/test/integration/targets/plugin_loader/file_collision/roles/r2/filter_plugins/custom.py b/test/integration/targets/plugin_loader/file_collision/roles/r2/filter_plugins/custom.py
index 8a7a4f5270..fa2d0e3efa 100644
--- a/test/integration/targets/plugin_loader/file_collision/roles/r2/filter_plugins/custom.py
+++ b/test/integration/targets/plugin_loader/file_collision/roles/r2/filter_plugins/custom.py
@@ -6,7 +6,7 @@ def do_nothing(myval):
class FilterModule(object):
- ''' Ansible core jinja2 filters '''
+ """ Ansible core jinja2 filters """
def filters(self):
return {
diff --git a/test/integration/targets/plugin_loader/override/filter_plugins/core.py b/test/integration/targets/plugin_loader/override/filter_plugins/core.py
index 89246377cb..415e8a9ff1 100644
--- a/test/integration/targets/plugin_loader/override/filter_plugins/core.py
+++ b/test/integration/targets/plugin_loader/override/filter_plugins/core.py
@@ -6,7 +6,7 @@ def do_flag(myval):
class FilterModule(object):
- ''' Ansible core jinja2 filters '''
+ """ Ansible core jinja2 filters """
def filters(self):
return {
diff --git a/test/integration/targets/prepare_http_tests/library/httptester_kinit.py b/test/integration/targets/prepare_http_tests/library/httptester_kinit.py
index a84e3fb443..db3ef6b1a7 100644
--- a/test/integration/targets/prepare_http_tests/library/httptester_kinit.py
+++ b/test/integration/targets/prepare_http_tests/library/httptester_kinit.py
@@ -4,7 +4,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: httptester_kinit
short_description: Get Kerberos ticket
@@ -20,15 +20,15 @@ options:
type: str
author:
- Ansible Project
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
#
-'''
+"""
-RETURN = r'''
+RETURN = r"""
#
-'''
+"""
import contextlib
import errno
diff --git a/test/integration/targets/rel_plugin_loading/subdir/inventory_plugins/notyaml.py b/test/integration/targets/rel_plugin_loading/subdir/inventory_plugins/notyaml.py
index e93b500c28..c068681292 100644
--- a/test/integration/targets/rel_plugin_loading/subdir/inventory_plugins/notyaml.py
+++ b/test/integration/targets/rel_plugin_loading/subdir/inventory_plugins/notyaml.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
inventory: yaml
version_added: "2.4"
short_description: Uses a specific YAML file as an inventory source.
@@ -30,8 +30,8 @@ DOCUMENTATION = '''
- section: inventory_plugin_yaml
key: yaml_valid_extensions
-'''
-EXAMPLES = '''
+"""
+EXAMPLES = """
all: # keys must be unique, i.e. only one 'hosts' per group
hosts:
test1:
@@ -55,7 +55,7 @@ all: # keys must be unique, i.e. only one 'hosts' per group
test1 # same host as above, additional group membership
vars:
group_last_var: value
-'''
+"""
import os
@@ -87,7 +87,7 @@ class InventoryModule(BaseFileInventoryPlugin):
return valid
def parse(self, inventory, loader, path, cache=True):
- ''' parses the inventory file '''
+ """ parses the inventory file """
super(InventoryModule, self).parse(inventory, loader, path)
self.set_options()
@@ -160,9 +160,9 @@ class InventoryModule(BaseFileInventoryPlugin):
self.display.warning("Skipping '%s' as this is not a valid group definition" % group)
def _parse_host(self, host_pattern):
- '''
+ """
Each host key can be a pattern, try to process it and add variables as needed
- '''
+ """
(hostnames, port) = self._expand_hostpattern(host_pattern)
return hostnames, port
diff --git a/test/integration/targets/shell/connection_plugins/test_connection_default.py b/test/integration/targets/shell/connection_plugins/test_connection_default.py
index 5ff494c812..db23b8a142 100644
--- a/test/integration/targets/shell/connection_plugins/test_connection_default.py
+++ b/test/integration/targets/shell/connection_plugins/test_connection_default.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
connection: test_connection_default
short_description: test connection plugin used in tests
description:
@@ -11,13 +11,13 @@ description:
author: ansible (@core)
version_added: historical
options:
-'''
+"""
from ansible.plugins.connection import ConnectionBase
class Connection(ConnectionBase):
- ''' test connection '''
+ """ test connection """
transport = 'test_connection_default'
diff --git a/test/integration/targets/shell/connection_plugins/test_connection_override.py b/test/integration/targets/shell/connection_plugins/test_connection_override.py
index b962dfa75f..776185489c 100644
--- a/test/integration/targets/shell/connection_plugins/test_connection_override.py
+++ b/test/integration/targets/shell/connection_plugins/test_connection_override.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-DOCUMENTATION = '''
+DOCUMENTATION = """
connection: test_connection_override
short_description: test connection plugin used in tests
description:
@@ -11,13 +11,13 @@ description:
author: ansible (@core)
version_added: historical
options:
-'''
+"""
from ansible.plugins.connection import ConnectionBase
class Connection(ConnectionBase):
- ''' test connection '''
+ """ test connection """
transport = 'test_connection_override'
diff --git a/test/integration/targets/var_precedence/ansible-var-precedence-check.py b/test/integration/targets/var_precedence/ansible-var-precedence-check.py
index 6511169014..e75bcdd315 100755
--- a/test/integration/targets/var_precedence/ansible-var-precedence-check.py
+++ b/test/integration/targets/var_precedence/ansible-var-precedence-check.py
@@ -373,12 +373,12 @@ class VarTestMaker(object):
self.write_playbook()
def run(self):
- '''
+ """
if self.dynamic_inventory:
cmd = 'ansible-playbook -c local -i inventory/hosts site.yml'
else:
cmd = 'ansible-playbook -c local -i inventory site.yml'
- '''
+ """
cmd = 'ansible-playbook -c local -i inventory site.yml'
if 'extra_vars' in self.features:
cmd += ' --extra-vars="findme=extra_vars"'
diff --git a/test/integration/targets/windows-minimal/library/win_ping.py b/test/integration/targets/windows-minimal/library/win_ping.py
index 6d35f37994..8784bc9c07 100644
--- a/test/integration/targets/windows-minimal/library/win_ping.py
+++ b/test/integration/targets/windows-minimal/library/win_ping.py
@@ -11,7 +11,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'core'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_ping
version_added: "1.7"
@@ -32,9 +32,9 @@ seealso:
- module: ping
author:
- Chris Church (@cchurch)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
# Test connectivity to a windows host
# ansible winserver -m win_ping
@@ -44,12 +44,12 @@ EXAMPLES = r'''
- name: Induce an exception to see what happens
win_ping:
data: crash
-'''
+"""
-RETURN = r'''
+RETURN = r"""
ping:
description: Value provided with the data parameter.
returned: success
type: str
sample: pong
-'''
+"""
diff --git a/test/support/integration/plugins/modules/pkgng.py b/test/support/integration/plugins/modules/pkgng.py
index 85c563664b..f6cbd6be40 100644
--- a/test/support/integration/plugins/modules/pkgng.py
+++ b/test/support/integration/plugins/modules/pkgng.py
@@ -17,7 +17,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'supported_by': 'community'}
-DOCUMENTATION = '''
+DOCUMENTATION = """
---
module: pkgng
short_description: Package manager for FreeBSD >= 9.0
@@ -88,9 +88,9 @@ notes:
- When using pkgsite, be careful that already in cache packages won't be downloaded again.
- When used with a `loop:` each package will be processed individually,
it is much more efficient to pass the list directly to the `name` option.
-'''
+"""
-EXAMPLES = '''
+EXAMPLES = """
- name: Install package foo
pkgng:
name: foo
@@ -111,7 +111,7 @@ EXAMPLES = '''
pkgng:
name: baz
state: latest
-'''
+"""
import re
diff --git a/test/support/windows-integration/collections/ansible_collections/ansible/windows/plugins/modules/win_uri.py b/test/support/windows-integration/collections/ansible_collections/ansible/windows/plugins/modules/win_uri.py
index 3b1094eacf..9b9d857889 100644
--- a/test/support/windows-integration/collections/ansible_collections/ansible/windows/plugins/modules/win_uri.py
+++ b/test/support/windows-integration/collections/ansible_collections/ansible/windows/plugins/modules/win_uri.py
@@ -5,7 +5,7 @@
# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_uri
short_description: Interacts with webservices
@@ -88,9 +88,9 @@ seealso:
author:
- Corwin Brown (@blakfeld)
- Dag Wieers (@dagwieers)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
- name: Perform a GET and Store Output
ansible.windows.win_uri:
url: http://example.com/endpoint
@@ -114,9 +114,9 @@ EXAMPLES = r'''
url: http://www.somesite.com/
method: POST
body: "{ 'some': 'json' }"
-'''
+"""
-RETURN = r'''
+RETURN = r"""
elapsed:
description: The number of seconds that elapsed while performing the download.
returned: always
@@ -152,4 +152,4 @@ json:
returned: success and Content-Type is "application/json" or "application/javascript" and return_content is True
type: dict
sample: {"this-is-dependent": "on the actual return content"}
-'''
+"""
diff --git a/test/support/windows-integration/plugins/action/win_copy.py b/test/support/windows-integration/plugins/action/win_copy.py
index f68b2ab670..02702c51fe 100644
--- a/test/support/windows-integration/plugins/action/win_copy.py
+++ b/test/support/windows-integration/plugins/action/win_copy.py
@@ -217,7 +217,7 @@ class ActionModule(ActionBase):
WIN_PATH_SEPARATOR = "\\"
def _create_content_tempfile(self, content):
- ''' Create a tempfile containing defined content '''
+ """ Create a tempfile containing defined content """
fd, content_tempfile = tempfile.mkstemp(dir=C.DEFAULT_LOCAL_TMP)
f = os.fdopen(fd, 'wb')
content = to_bytes(content)
@@ -328,7 +328,7 @@ class ActionModule(ActionBase):
return module_return
def run(self, tmp=None, task_vars=None):
- ''' handler for file transfer operations '''
+ """ handler for file transfer operations """
if task_vars is None:
task_vars = dict()
diff --git a/test/support/windows-integration/plugins/modules/win_acl.py b/test/support/windows-integration/plugins/modules/win_acl.py
index 14fbd82f3a..1d5feefce9 100644
--- a/test/support/windows-integration/plugins/modules/win_acl.py
+++ b/test/support/windows-integration/plugins/modules/win_acl.py
@@ -10,7 +10,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'core'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_acl
version_added: "2.0"
@@ -82,9 +82,9 @@ author:
- Phil Schwartz (@schwartzmx)
- Trond Hindenes (@trondhindenes)
- Hans-Joachim Kliemeck (@h0nIg)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
- name: Restrict write and execute access to User Fed-Phil
win_acl:
user: Fed-Phil
@@ -129,4 +129,4 @@ EXAMPLES = r'''
rights: Read,Write,Modify,FullControl,Delete
type: deny
state: present
-'''
+"""
diff --git a/test/support/windows-integration/plugins/modules/win_certificate_store.py b/test/support/windows-integration/plugins/modules/win_certificate_store.py
index dc617e33fd..bfcea7ad40 100644
--- a/test/support/windows-integration/plugins/modules/win_certificate_store.py
+++ b/test/support/windows-integration/plugins/modules/win_certificate_store.py
@@ -8,7 +8,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_certificate_store
version_added: '2.5'
@@ -130,9 +130,9 @@ notes:
binding the certificate to the https endpoint.
author:
- Jordan Borean (@jborean93)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
- name: Import a certificate
win_certificate_store:
path: C:\Temp\cert.pem
@@ -196,13 +196,13 @@ EXAMPLES = r'''
store_location: LocalMachine
key_storage: machine
state: present
-'''
+"""
-RETURN = r'''
+RETURN = r"""
thumbprints:
description: A list of certificate thumbprints that were touched by the
module.
returned: success
type: list
sample: ["BC05633694E675449136679A658281F17A191087"]
-'''
+"""
diff --git a/test/support/windows-integration/plugins/modules/win_command.py b/test/support/windows-integration/plugins/modules/win_command.py
index 508419b28b..0c9158b1cd 100644
--- a/test/support/windows-integration/plugins/modules/win_command.py
+++ b/test/support/windows-integration/plugins/modules/win_command.py
@@ -8,7 +8,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'core'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_command
short_description: Executes a command on a remote Windows node
@@ -68,9 +68,9 @@ seealso:
- module: win_shell
author:
- Matt Davis (@nitzmahone)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
- name: Save the result of 'whoami' in 'whoami_out'
win_command: whoami
register: whoami_out
@@ -85,9 +85,9 @@ EXAMPLES = r'''
win_command: powershell.exe -
args:
stdin: Write-Host test
-'''
+"""
-RETURN = r'''
+RETURN = r"""
msg:
description: changed
returned: always
@@ -133,4 +133,4 @@ stdout_lines:
returned: always
type: list
sample: [u'Clustering node rabbit@slave1 with rabbit@master ...']
-'''
+"""
diff --git a/test/support/windows-integration/plugins/modules/win_copy.py b/test/support/windows-integration/plugins/modules/win_copy.py
index bb8dbd61f2..f256f9220f 100644
--- a/test/support/windows-integration/plugins/modules/win_copy.py
+++ b/test/support/windows-integration/plugins/modules/win_copy.py
@@ -9,7 +9,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'core'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_copy
version_added: '1.9.2'
@@ -109,9 +109,9 @@ seealso:
author:
- Jon Hawkesworth (@jhawkesworth)
- Jordan Borean (@jborean93)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
- name: Copy a single file
win_copy:
src: /srv/myfiles/foo.conf
@@ -166,9 +166,9 @@ EXAMPLES = r'''
# This ensures the become user will have permissions for the operation
# Make sure to specify a folder both the ansible_user and the become_user have access to (i.e not %TEMP% which is user specific and requires Admin)
ansible_remote_tmp: 'c:\tmp'
-'''
+"""
-RETURN = r'''
+RETURN = r"""
backup_file:
description: Name of the backup file that was created.
returned: if backup=yes
@@ -204,4 +204,4 @@ original_basename:
returned: changed, src is a file
type: str
sample: foo.txt
-'''
+"""
diff --git a/test/support/windows-integration/plugins/modules/win_file.py b/test/support/windows-integration/plugins/modules/win_file.py
index 28149579cd..7821b5a40c 100644
--- a/test/support/windows-integration/plugins/modules/win_file.py
+++ b/test/support/windows-integration/plugins/modules/win_file.py
@@ -8,7 +8,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'core'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_file
version_added: "1.9.2"
@@ -45,9 +45,9 @@ seealso:
- module: win_stat
author:
- Jon Hawkesworth (@jhawkesworth)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
- name: Touch a file (creates if not present, updates modification time if present)
win_file:
path: C:\Temp\foo.conf
@@ -67,4 +67,4 @@ EXAMPLES = r'''
win_file:
path: C:\Temp
state: absent
-'''
+"""
diff --git a/test/support/windows-integration/plugins/modules/win_get_url.py b/test/support/windows-integration/plugins/modules/win_get_url.py
index ef5b5f970b..10de477cef 100644
--- a/test/support/windows-integration/plugins/modules/win_get_url.py
+++ b/test/support/windows-integration/plugins/modules/win_get_url.py
@@ -11,7 +11,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'core'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_get_url
version_added: "1.7"
@@ -125,9 +125,9 @@ seealso:
author:
- Paul Durivage (@angstwad)
- Takeshi Kuramochi (@tksarah)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
- name: Download earthrise.jpg to specified path
win_get_url:
url: http://www.example.com/earthrise.jpg
@@ -169,9 +169,9 @@ EXAMPLES = r'''
checksum: a97e6837f60cec6da4491bab387296bbcd72bdba
checksum_algorithm: sha1
force: True
-'''
+"""
-RETURN = r'''
+RETURN = r"""
dest:
description: destination file/path
returned: always
@@ -212,4 +212,4 @@ status_code:
returned: always
type: int
sample: 200
-'''
+"""
diff --git a/test/support/windows-integration/plugins/modules/win_lineinfile.py b/test/support/windows-integration/plugins/modules/win_lineinfile.py
index f4fb7f5afa..9dbc449290 100644
--- a/test/support/windows-integration/plugins/modules/win_lineinfile.py
+++ b/test/support/windows-integration/plugins/modules/win_lineinfile.py
@@ -7,7 +7,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_lineinfile
short_description: Ensure a particular line is in a file, or replace an existing line using a back-referenced regular expression
@@ -107,9 +107,9 @@ seealso:
- module: lineinfile
author:
- Brian Lloyd (@brianlloyd)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
# Before Ansible 2.3, option 'dest', 'destfile' or 'name' was used instead of 'path'
- name: Insert path without converting \r\n
win_lineinfile:
@@ -162,9 +162,9 @@ EXAMPLES = r'''
backrefs: yes
regex: '(^name=)'
line: '$1JohnDoe'
-'''
+"""
-RETURN = r'''
+RETURN = r"""
backup:
description:
- Name of the backup file that was created.
@@ -177,4 +177,4 @@ backup_file:
returned: if backup=yes
type: str
sample: C:\Path\To\File.txt.11540.20150212-220915.bak
-'''
+"""
diff --git a/test/support/windows-integration/plugins/modules/win_ping.py b/test/support/windows-integration/plugins/modules/win_ping.py
index 6d35f37994..8784bc9c07 100644
--- a/test/support/windows-integration/plugins/modules/win_ping.py
+++ b/test/support/windows-integration/plugins/modules/win_ping.py
@@ -11,7 +11,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'core'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_ping
version_added: "1.7"
@@ -32,9 +32,9 @@ seealso:
- module: ping
author:
- Chris Church (@cchurch)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
# Test connectivity to a windows host
# ansible winserver -m win_ping
@@ -44,12 +44,12 @@ EXAMPLES = r'''
- name: Induce an exception to see what happens
win_ping:
data: crash
-'''
+"""
-RETURN = r'''
+RETURN = r"""
ping:
description: Value provided with the data parameter.
returned: success
type: str
sample: pong
-'''
+"""
diff --git a/test/support/windows-integration/plugins/modules/win_reboot.py b/test/support/windows-integration/plugins/modules/win_reboot.py
index 1431804143..7f1645673e 100644
--- a/test/support/windows-integration/plugins/modules/win_reboot.py
+++ b/test/support/windows-integration/plugins/modules/win_reboot.py
@@ -7,7 +7,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'core'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_reboot
short_description: Reboot a windows machine
@@ -79,9 +79,9 @@ seealso:
- module: reboot
author:
- Matt Davis (@nitzmahone)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
- name: Reboot the machine with all defaults
win_reboot:
@@ -115,9 +115,9 @@ EXAMPLES = r'''
- name: Validate that the netlogon service has started, before running the next task
win_reboot:
test_command: 'exit (Get-Service -Name Netlogon).Status -ne "Running"'
-'''
+"""
-RETURN = r'''
+RETURN = r"""
rebooted:
description: True if the machine was rebooted.
returned: always
@@ -128,4 +128,4 @@ elapsed:
returned: always
type: float
sample: 23.2
-'''
+"""
diff --git a/test/support/windows-integration/plugins/modules/win_regedit.py b/test/support/windows-integration/plugins/modules/win_regedit.py
index 2c0fff7124..ca4c146e4b 100644
--- a/test/support/windows-integration/plugins/modules/win_regedit.py
+++ b/test/support/windows-integration/plugins/modules/win_regedit.py
@@ -13,7 +13,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'supported_by': 'core'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_regedit
version_added: '2.0'
@@ -99,9 +99,9 @@ author:
- Adam Keech (@smadam813)
- Josh Ludwig (@joshludwig)
- Jordan Borean (@jborean93)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
- name: Create registry path MyCompany
win_regedit:
path: HKCU:\Software\MyCompany
@@ -194,9 +194,9 @@ EXAMPLES = r'''
type: str
state: present
hive: C:\Users\Default\NTUSER.dat
-'''
+"""
-RETURN = r'''
+RETURN = r"""
data_changed:
description: Whether this invocation changed the data in the registry value.
returned: success
@@ -207,4 +207,4 @@ data_type_changed:
returned: success
type: bool
sample: true
-'''
+"""
diff --git a/test/support/windows-integration/plugins/modules/win_shell.py b/test/support/windows-integration/plugins/modules/win_shell.py
index ee2cd76240..461ccea3ae 100644
--- a/test/support/windows-integration/plugins/modules/win_shell.py
+++ b/test/support/windows-integration/plugins/modules/win_shell.py
@@ -8,7 +8,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'core'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_shell
short_description: Execute shell commands on target hosts
@@ -80,9 +80,9 @@ seealso:
- module: win_psexec
author:
- Matt Davis (@nitzmahone)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
# Execute a command in the remote shell; stdout goes to the specified
# file on the remote.
- win_shell: C:\somescript.ps1 >> C:\somelog.txt
@@ -116,9 +116,9 @@ EXAMPLES = r'''
win_shell: '$string = [Console]::In.ReadToEnd(); Write-Output $string.Trim()'
args:
stdin: Input message
-'''
+"""
-RETURN = r'''
+RETURN = r"""
msg:
description: Changed.
returned: always
@@ -164,4 +164,4 @@ stdout_lines:
returned: always
type: list
sample: [u'Clustering node rabbit@slave1 with rabbit@master ...']
-'''
+"""
diff --git a/test/support/windows-integration/plugins/modules/win_stat.py b/test/support/windows-integration/plugins/modules/win_stat.py
index 0676b5b235..acc5aaaf3b 100644
--- a/test/support/windows-integration/plugins/modules/win_stat.py
+++ b/test/support/windows-integration/plugins/modules/win_stat.py
@@ -11,7 +11,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'core'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_stat
version_added: "1.7"
@@ -56,9 +56,9 @@ seealso:
- module: win_owner
author:
- Chris Church (@cchurch)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
- name: Obtain information about a file
win_stat:
path: C:\foo.ini
@@ -97,9 +97,9 @@ EXAMPLES = r'''
- debug:
var: sha256_checksum.stat.checksum
-'''
+"""
-RETURN = r'''
+RETURN = r"""
changed:
description: Whether anything was changed
returned: always
@@ -233,4 +233,4 @@ stat:
returned: success, path exists, file is not a link
type: int
sample: 1024
-'''
+"""
diff --git a/test/support/windows-integration/plugins/modules/win_user.py b/test/support/windows-integration/plugins/modules/win_user.py
index 5fc0633d06..e7264c6543 100644
--- a/test/support/windows-integration/plugins/modules/win_user.py
+++ b/test/support/windows-integration/plugins/modules/win_user.py
@@ -11,7 +11,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'core'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_user
version_added: "1.7"
@@ -113,9 +113,9 @@ seealso:
author:
- Paul Durivage (@angstwad)
- Chris Church (@cchurch)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
- name: Ensure user bob is present
win_user:
name: bob
@@ -128,9 +128,9 @@ EXAMPLES = r'''
win_user:
name: bob
state: absent
-'''
+"""
-RETURN = r'''
+RETURN = r"""
account_disabled:
description: Whether the user is disabled.
returned: user exists
@@ -191,4 +191,4 @@ user_cannot_change_password:
returned: user exists
type: bool
sample: false
-'''
+"""
diff --git a/test/support/windows-integration/plugins/modules/win_user_right.py b/test/support/windows-integration/plugins/modules/win_user_right.py
index 5588208333..a0881d72d2 100644
--- a/test/support/windows-integration/plugins/modules/win_user_right.py
+++ b/test/support/windows-integration/plugins/modules/win_user_right.py
@@ -11,7 +11,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_user_right
version_added: '2.4'
@@ -56,9 +56,9 @@ seealso:
- module: win_user
author:
- Jordan Borean (@jborean93)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
---
- name: Replace the entries of Deny log on locally
win_user_right:
@@ -90,9 +90,9 @@ EXAMPLES = r'''
win_user_right:
name: SeDenyRemoteInteractiveLogonRight
users: []
-'''
+"""
-RETURN = r'''
+RETURN = r"""
added:
description: A list of accounts that were added to the right, this is empty
if no accounts were added.
@@ -105,4 +105,4 @@ removed:
returned: success
type: list
sample: ["SERVERNAME\\Administrator", "BUILTIN\\Administrators"]
-'''
+"""
diff --git a/test/support/windows-integration/plugins/modules/win_wait_for.py b/test/support/windows-integration/plugins/modules/win_wait_for.py
index 85721e7d53..1a97a3bc47 100644
--- a/test/support/windows-integration/plugins/modules/win_wait_for.py
+++ b/test/support/windows-integration/plugins/modules/win_wait_for.py
@@ -11,7 +11,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_wait_for
version_added: '2.4'
@@ -96,9 +96,9 @@ seealso:
- module: win_wait_for_process
author:
- Jordan Borean (@jborean93)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
- name: Wait 300 seconds for port 8000 to become open on the host, don't start checking for 10 seconds
win_wait_for:
port: 8000
@@ -137,9 +137,9 @@ EXAMPLES = r'''
port: 1234
state: absent
sleep: 10
-'''
+"""
-RETURN = r'''
+RETURN = r"""
wait_attempts:
description: The number of attempts to poll the file or port before module
finishes.
@@ -152,4 +152,4 @@ elapsed:
returned: always
type: float
sample: 2.1406487
-'''
+"""
diff --git a/test/support/windows-integration/plugins/modules/win_whoami.py b/test/support/windows-integration/plugins/modules/win_whoami.py
index d647374b6c..5059c67bcf 100644
--- a/test/support/windows-integration/plugins/modules/win_whoami.py
+++ b/test/support/windows-integration/plugins/modules/win_whoami.py
@@ -11,7 +11,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
-DOCUMENTATION = r'''
+DOCUMENTATION = r"""
---
module: win_whoami
version_added: "2.5"
@@ -30,14 +30,14 @@ seealso:
- module: win_user_right
author:
- Jordan Borean (@jborean93)
-'''
+"""
-EXAMPLES = r'''
+EXAMPLES = r"""
- name: Get whoami information
win_whoami:
-'''
+"""
-RETURN = r'''
+RETURN = r"""
authentication_package:
description: The name of the authentication package used to authenticate the
user in the session.
@@ -200,4 +200,4 @@ token_type:
returned: success
type: str
sample: TokenPrimary
-'''
+"""
diff --git a/test/units/cli/test_galaxy.py b/test/units/cli/test_galaxy.py
index 9d6d32bb2a..84908b96f2 100644
--- a/test/units/cli/test_galaxy.py
+++ b/test/units/cli/test_galaxy.py
@@ -55,7 +55,7 @@ def reset_cli_args():
class TestGalaxy(unittest.TestCase):
@classmethod
def setUpClass(cls):
- '''creating prerequisites for installing a role; setUpClass occurs ONCE whereas setUp occurs with every method tested.'''
+ """creating prerequisites for installing a role; setUpClass occurs ONCE whereas setUp occurs with every method tested."""
# class data for easy viewing: role_dir, role_tar, role_name, role_req, role_path
cls.temp_dir = tempfile.mkdtemp(prefix='ansible-test_galaxy-')
@@ -84,14 +84,14 @@ class TestGalaxy(unittest.TestCase):
@classmethod
def makeTar(cls, output_file, source_dir):
- ''' used for making a tarfile from a role directory '''
+ """ used for making a tarfile from a role directory """
# adding directory into a tar file
with tarfile.open(output_file, "w:gz") as tar:
tar.add(source_dir, arcname=os.path.basename(source_dir))
@classmethod
def tearDownClass(cls):
- '''After tests are finished removes things created in setUpClass'''
+ """After tests are finished removes things created in setUpClass"""
# deleting the temp role directory
shutil.rmtree(cls.role_dir, ignore_errors=True)
with contextlib.suppress(FileNotFoundError):
@@ -131,7 +131,7 @@ class TestGalaxy(unittest.TestCase):
self.assertNotEqual(display_result.find('\n\tgalaxy_info:'), -1, 'Expected galaxy_info to be indented once')
def test_run(self):
- ''' verifies that the GalaxyCLI object's api is created and that execute() is called. '''
+ """ verifies that the GalaxyCLI object's api is created and that execute() is called. """
gc = GalaxyCLI(args=["ansible-galaxy", "install", "--ignore-errors", "imaginary_role"])
gc.parse()
with patch.object(ansible.cli.CLI, "run", return_value=None) as mock_run:
@@ -161,7 +161,7 @@ class TestGalaxy(unittest.TestCase):
self.assertTrue(removed_role)
def test_exit_without_ignore_without_flag(self):
- ''' tests that GalaxyCLI exits with the error specified if the --ignore-errors flag is not used '''
+ """ tests that GalaxyCLI exits with the error specified if the --ignore-errors flag is not used """
gc = GalaxyCLI(args=["ansible-galaxy", "install", "--server=None", "fake_role_name"])
with patch.object(ansible.utils.display.Display, "display", return_value=None) as mocked_display:
# testing that error expected is raised
@@ -171,7 +171,7 @@ class TestGalaxy(unittest.TestCase):
assert "fake_role_name was NOT installed successfully" in mocked_display.mock_calls[1].args[0]
def test_exit_without_ignore_with_flag(self):
- ''' tests that GalaxyCLI exits without the error specified if the --ignore-errors flag is used '''
+ """ tests that GalaxyCLI exits without the error specified if the --ignore-errors flag is used """
# testing with --ignore-errors flag
gc = GalaxyCLI(args=["ansible-galaxy", "install", "--server=None", "fake_role_name", "--ignore-errors"])
with patch.object(ansible.utils.display.Display, "display", return_value=None) as mocked_display:
@@ -181,23 +181,23 @@ class TestGalaxy(unittest.TestCase):
assert "fake_role_name was NOT installed successfully" in mocked_display.mock_calls[1].args[0]
def test_parse_no_action(self):
- ''' testing the options parser when no action is given '''
+ """ testing the options parser when no action is given """
gc = GalaxyCLI(args=["ansible-galaxy", ""])
self.assertRaises(SystemExit, gc.parse)
def test_parse_invalid_action(self):
- ''' testing the options parser when an invalid action is given '''
+ """ testing the options parser when an invalid action is given """
gc = GalaxyCLI(args=["ansible-galaxy", "NOT_ACTION"])
self.assertRaises(SystemExit, gc.parse)
def test_parse_delete(self):
- ''' testing the options parser when the action 'delete' is given '''
+ """ testing the options parser when the action 'delete' is given """
gc = GalaxyCLI(args=["ansible-galaxy", "delete", "foo", "bar"])
gc.parse()
self.assertEqual(context.CLIARGS['verbosity'], 0)
def test_parse_import(self):
- ''' testing the options parser when the action 'import' is given '''
+ """ testing the options parser when the action 'import' is given """
gc = GalaxyCLI(args=["ansible-galaxy", "import", "foo", "bar"])
gc.parse()
assert context.CLIARGS['wait']
@@ -206,20 +206,20 @@ class TestGalaxy(unittest.TestCase):
assert context.CLIARGS['verbosity'] == 0
def test_parse_info(self):
- ''' testing the options parser when the action 'info' is given '''
+ """ testing the options parser when the action 'info' is given """
gc = GalaxyCLI(args=["ansible-galaxy", "info", "foo", "bar"])
gc.parse()
assert not context.CLIARGS['offline']
def test_parse_init(self):
- ''' testing the options parser when the action 'init' is given '''
+ """ testing the options parser when the action 'init' is given """
gc = GalaxyCLI(args=["ansible-galaxy", "init", "foo"])
gc.parse()
assert not context.CLIARGS['offline']
assert not context.CLIARGS['force']
def test_parse_install(self):
- ''' testing the options parser when the action 'install' is given '''
+ """ testing the options parser when the action 'install' is given """
gc = GalaxyCLI(args=["ansible-galaxy", "install"])
gc.parse()
assert not context.CLIARGS['ignore_errors']
@@ -228,19 +228,19 @@ class TestGalaxy(unittest.TestCase):
assert not context.CLIARGS['force']
def test_parse_list(self):
- ''' testing the options parser when the action 'list' is given '''
+ """ testing the options parser when the action 'list' is given """
gc = GalaxyCLI(args=["ansible-galaxy", "list"])
gc.parse()
self.assertEqual(context.CLIARGS['verbosity'], 0)
def test_parse_remove(self):
- ''' testing the options parser when the action 'remove' is given '''
+ """ testing the options parser when the action 'remove' is given """
gc = GalaxyCLI(args=["ansible-galaxy", "remove", "foo"])
gc.parse()
self.assertEqual(context.CLIARGS['verbosity'], 0)
def test_parse_search(self):
- ''' testing the options parswer when the action 'search' is given '''
+ """ testing the options parswer when the action 'search' is given """
gc = GalaxyCLI(args=["ansible-galaxy", "search"])
gc.parse()
assert context.CLIARGS['platforms'] is None
@@ -248,7 +248,7 @@ class TestGalaxy(unittest.TestCase):
assert context.CLIARGS['author'] is None
def test_parse_setup(self):
- ''' testing the options parser when the action 'setup' is given '''
+ """ testing the options parser when the action 'setup' is given """
gc = GalaxyCLI(args=["ansible-galaxy", "setup", "source", "github_user", "github_repo", "secret"])
gc.parse()
assert context.CLIARGS['verbosity'] == 0
@@ -568,7 +568,7 @@ def test_collection_skeleton(collection_skeleton):
@pytest.fixture()
def collection_artifact(collection_skeleton, tmp_path_factory):
- ''' Creates a collection artifact tarball that is ready to be published and installed '''
+ """ Creates a collection artifact tarball that is ready to be published and installed """
output_dir = to_text(tmp_path_factory.mktemp('test-ÅÑŚÌβŁÈ Output'))
# Create a file with +x in the collection so we can test the permissions
@@ -792,12 +792,12 @@ def test_collection_install_with_requirements_file(collection_install):
requirements_file = os.path.join(output_dir, 'requirements.yml')
with open(requirements_file, 'wb') as req_obj:
- req_obj.write(b'''---
+ req_obj.write(b"""---
collections:
- namespace.coll
- name: namespace2.coll
version: '>2.0.1'
-''')
+""")
galaxy_args = ['ansible-galaxy', 'collection', 'install', '--requirements-file', requirements_file,
'--collections-path', output_dir]
@@ -1085,11 +1085,11 @@ def test_parse_requirements_file_that_isnt_yaml(requirements_cli, requirements_f
requirements_cli._parse_requirements_file(requirements_file)
-@pytest.mark.parametrize('requirements_file', [('''
+@pytest.mark.parametrize('requirements_file', [("""
# Older role based requirements.yml
- galaxy.role
- anotherrole
-''')], indirect=True)
+""")], indirect=True)
def test_parse_requirements_in_older_format_illegal(requirements_cli, requirements_file):
expected = "Expecting requirements file to be a dict with the key 'collections' that contains a list of " \
"collections to install"
@@ -1098,10 +1098,10 @@ def test_parse_requirements_in_older_format_illegal(requirements_cli, requiremen
requirements_cli._parse_requirements_file(requirements_file, allow_old_format=False)
-@pytest.mark.parametrize('requirements_file', ['''
+@pytest.mark.parametrize('requirements_file', ["""
collections:
- version: 1.0.0
-'''], indirect=True)
+"""], indirect=True)
def test_parse_requirements_without_mandatory_name_key(requirements_cli, requirements_file):
# Used to be "Collections requirement entry should contain the key name."
# Should we check that either source or name is provided before using the dep resolver?
@@ -1114,15 +1114,15 @@ def test_parse_requirements_without_mandatory_name_key(requirements_cli, require
requirements_cli._parse_requirements_file(requirements_file)
-@pytest.mark.parametrize('requirements_file', [('''
+@pytest.mark.parametrize('requirements_file', [("""
collections:
- namespace.collection1
- namespace.collection2
-'''), ('''
+"""), ("""
collections:
- name: namespace.collection1
- name: namespace.collection2
-''')], indirect=True)
+""")], indirect=True)
def test_parse_requirements(requirements_cli, requirements_file):
expected = {
'roles': [],
@@ -1134,12 +1134,12 @@ def test_parse_requirements(requirements_cli, requirements_file):
assert actual == expected
-@pytest.mark.parametrize('requirements_file', ['''
+@pytest.mark.parametrize('requirements_file', ["""
collections:
- name: namespace.collection1
version: ">=1.0.0,<=2.0.0"
source: https://galaxy-dev.ansible.com
-- namespace.collection2'''], indirect=True)
+- namespace.collection2"""], indirect=True)
def test_parse_requirements_with_extra_info(requirements_cli, requirements_file):
actual = requirements_cli._parse_requirements_file(requirements_file)
actual['collections'] = [('%s.%s' % (r.namespace, r.name), r.ver, r.src, r.type,) for r in actual.get('collections', [])]
@@ -1153,7 +1153,7 @@ def test_parse_requirements_with_extra_info(requirements_cli, requirements_file)
assert actual['collections'][1] == ('namespace.collection2', '*', None, 'galaxy')
-@pytest.mark.parametrize('requirements_file', ['''
+@pytest.mark.parametrize('requirements_file', ["""
roles:
- username.role_name
- src: username2.role_name2
@@ -1162,7 +1162,7 @@ roles:
collections:
- namespace.collection2
-'''], indirect=True)
+"""], indirect=True)
def test_parse_requirements_with_roles_and_collections(requirements_cli, requirements_file):
actual = requirements_cli._parse_requirements_file(requirements_file)
actual['collections'] = [('%s.%s' % (r.namespace, r.name), r.ver, r.src, r.type,) for r in actual.get('collections', [])]
@@ -1177,14 +1177,14 @@ def test_parse_requirements_with_roles_and_collections(requirements_cli, require
assert actual['collections'][0] == ('namespace.collection2', '*', None, 'galaxy')
-@pytest.mark.parametrize('requirements_file', ['''
+@pytest.mark.parametrize('requirements_file', ["""
collections:
- name: namespace.collection
- name: namespace2.collection2
source: https://galaxy-dev.ansible.com/
- name: namespace3.collection3
source: server
-'''], indirect=True)
+"""], indirect=True)
def test_parse_requirements_with_collection_source(requirements_cli, requirements_file):
galaxy_api = GalaxyAPI(requirements_cli.api, 'server', 'https://config-server')
requirements_cli.api_servers.append(galaxy_api)
@@ -1205,10 +1205,10 @@ def test_parse_requirements_with_collection_source(requirements_cli, requirement
assert actual['collections'][2][2].api_server == 'https://config-server'
-@pytest.mark.parametrize('requirements_file', ['''
+@pytest.mark.parametrize('requirements_file', ["""
- username.included_role
- src: https://github.com/user/repo
-'''], indirect=True)
+"""], indirect=True)
def test_parse_requirements_roles_with_include(requirements_cli, requirements_file):
reqs = [
'ansible.role',
@@ -1228,10 +1228,10 @@ def test_parse_requirements_roles_with_include(requirements_cli, requirements_fi
assert actual['roles'][2].src == 'https://github.com/user/repo'
-@pytest.mark.parametrize('requirements_file', ['''
+@pytest.mark.parametrize('requirements_file', ["""
- username.role
- include: missing.yml
-'''], indirect=True)
+"""], indirect=True)
def test_parse_requirements_roles_with_include_missing(requirements_cli, requirements_file):
expected = "Failed to find include requirements file 'missing.yml' in '%s'" % to_native(requirements_file)
@@ -1239,12 +1239,12 @@ def test_parse_requirements_roles_with_include_missing(requirements_cli, require
requirements_cli._parse_requirements_file(requirements_file)
-@pytest.mark.parametrize('requirements_file', ['''
+@pytest.mark.parametrize('requirements_file', ["""
collections:
- namespace.name
roles:
- namespace.name
-'''], indirect=True)
+"""], indirect=True)
def test_install_implicit_role_with_collections(requirements_file, monkeypatch):
mock_collection_install = MagicMock()
monkeypatch.setattr(GalaxyCLI, '_execute_install_collection', mock_collection_install)
@@ -1269,12 +1269,12 @@ def test_install_implicit_role_with_collections(requirements_file, monkeypatch):
assert not any(list('contains collections which will be ignored' in mock_call[1][0] for mock_call in mock_display.mock_calls))
-@pytest.mark.parametrize('requirements_file', ['''
+@pytest.mark.parametrize('requirements_file', ["""
collections:
- namespace.name
roles:
- namespace.name
-'''], indirect=True)
+"""], indirect=True)
def test_install_explicit_role_with_collections(requirements_file, monkeypatch):
mock_collection_install = MagicMock()
monkeypatch.setattr(GalaxyCLI, '_execute_install_collection', mock_collection_install)
@@ -1296,12 +1296,12 @@ def test_install_explicit_role_with_collections(requirements_file, monkeypatch):
assert any(list('contains collections which will be ignored' in mock_call[1][0] for mock_call in mock_display.mock_calls))
-@pytest.mark.parametrize('requirements_file', ['''
+@pytest.mark.parametrize('requirements_file', ["""
collections:
- namespace.name
roles:
- namespace.name
-'''], indirect=True)
+"""], indirect=True)
def test_install_role_with_collections_and_path(requirements_file, monkeypatch):
mock_collection_install = MagicMock()
monkeypatch.setattr(GalaxyCLI, '_execute_install_collection', mock_collection_install)
@@ -1323,12 +1323,12 @@ def test_install_role_with_collections_and_path(requirements_file, monkeypatch):
assert any(list('contains collections which will be ignored' in mock_call[1][0] for mock_call in mock_display.mock_calls))
-@pytest.mark.parametrize('requirements_file', ['''
+@pytest.mark.parametrize('requirements_file', ["""
collections:
- namespace.name
roles:
- namespace.name
-'''], indirect=True)
+"""], indirect=True)
def test_install_collection_with_roles(requirements_file, monkeypatch):
mock_collection_install = MagicMock()
monkeypatch.setattr(GalaxyCLI, '_execute_install_collection', mock_collection_install)
diff --git a/test/units/errors/test_errors.py b/test/units/errors/test_errors.py
index 94c905bcf7..9285f983bc 100644
--- a/test/units/errors/test_errors.py
+++ b/test/units/errors/test_errors.py
@@ -44,7 +44,7 @@ class TestErrors(unittest.TestCase):
@patch.object(AnsibleError, '_get_error_lines_from_file')
def test_error_with_kv(self, mock_method):
- ''' This tests a task with both YAML and k=v syntax
+ """ This tests a task with both YAML and k=v syntax
- lineinfile: line=foo path=bar
line: foo
@@ -52,7 +52,7 @@ class TestErrors(unittest.TestCase):
An accurate error message and position indicator are expected.
_get_error_lines_from_file() returns (target_line, prev_line)
- '''
+ """
self.obj.ansible_pos = ('foo.yml', 2, 1)
diff --git a/test/units/executor/module_common/test_modify_module.py b/test/units/executor/module_common/test_modify_module.py
index 0ea191826e..969246e5b1 100644
--- a/test/units/executor/module_common/test_modify_module.py
+++ b/test/units/executor/module_common/test_modify_module.py
@@ -9,10 +9,10 @@ import pytest
from ansible.executor.module_common import modify_module
-FAKE_OLD_MODULE = b'''#!/usr/bin/python
+FAKE_OLD_MODULE = b"""#!/usr/bin/python
import sys
print('{"result": "%s"}' % sys.executable)
-'''
+"""
@pytest.fixture
diff --git a/test/units/executor/test_playbook_executor.py b/test/units/executor/test_playbook_executor.py
index 62fa1a36e1..085d7fbf30 100644
--- a/test/units/executor/test_playbook_executor.py
+++ b/test/units/executor/test_playbook_executor.py
@@ -40,40 +40,40 @@ class TestPlaybookExecutor(unittest.TestCase):
def test_get_serialized_batches(self):
fake_loader = DictDataLoader({
- 'no_serial.yml': '''
+ 'no_serial.yml': """
- hosts: all
gather_facts: no
tasks:
- debug: var=inventory_hostname
- ''',
- 'serial_int.yml': '''
+ """,
+ 'serial_int.yml': """
- hosts: all
gather_facts: no
serial: 2
tasks:
- debug: var=inventory_hostname
- ''',
- 'serial_pct.yml': '''
+ """,
+ 'serial_pct.yml': """
- hosts: all
gather_facts: no
serial: 20%
tasks:
- debug: var=inventory_hostname
- ''',
- 'serial_list.yml': '''
+ """,
+ 'serial_list.yml': """
- hosts: all
gather_facts: no
serial: [1, 2, 3]
tasks:
- debug: var=inventory_hostname
- ''',
- 'serial_list_mixed.yml': '''
+ """,
+ 'serial_list_mixed.yml': """
- hosts: all
gather_facts: no
serial: [1, "20%", -1]
tasks:
- debug: var=inventory_hostname
- ''',
+ """,
})
mock_inventory = MagicMock()
diff --git a/test/units/galaxy/test_api.py b/test/units/galaxy/test_api.py
index 2ef1d07325..22d83e43b3 100644
--- a/test/units/galaxy/test_api.py
+++ b/test/units/galaxy/test_api.py
@@ -40,7 +40,7 @@ def reset_cli_args():
@pytest.fixture()
def collection_artifact(tmp_path_factory):
- ''' Creates a collection artifact tarball that is ready to be published '''
+ """ Creates a collection artifact tarball that is ready to be published """
output_dir = to_text(tmp_path_factory.mktemp('test-ÅÑŚÌβŁÈ Output'))
tar_path = os.path.join(output_dir, 'namespace-collection-v1.0.0.tar.gz')
diff --git a/test/units/galaxy/test_collection.py b/test/units/galaxy/test_collection.py
index 73e915dee6..0c00c1884b 100644
--- a/test/units/galaxy/test_collection.py
+++ b/test/units/galaxy/test_collection.py
@@ -64,7 +64,7 @@ def collection_input(tmp_path_factory, collection_path_suffix):
@pytest.fixture()
def collection_artifact(monkeypatch, tmp_path_factory):
- ''' Creates a temp collection artifact and mocked open_url instance for publishing tests '''
+ """ Creates a temp collection artifact and mocked open_url instance for publishing tests """
mock_open = MagicMock()
monkeypatch.setattr(collection.concrete_artifact_manager, 'open_url', mock_open)
@@ -97,7 +97,7 @@ def galaxy_yml_dir(request, tmp_path_factory):
@pytest.fixture()
def tmp_tarfile(tmp_path_factory, manifest_info):
- ''' Creates a temporary tar file for _extract_tar_file tests '''
+ """ Creates a temporary tar file for _extract_tar_file tests """
filename = u'ÅÑŚÌβŁÈ'
temp_dir = to_bytes(tmp_path_factory.mktemp('test-%s Collections' % to_native(filename)))
tar_file = os.path.join(temp_dir, to_bytes('%s.tar.gz' % filename))
diff --git a/test/units/inventory/test_group.py b/test/units/inventory/test_group.py
index 5a9d540d90..4d735a5bb5 100644
--- a/test/units/inventory/test_group.py
+++ b/test/units/inventory/test_group.py
@@ -142,10 +142,10 @@ class TestGroup(unittest.TestCase):
)
def test_ancestors_recursive_loop_safe(self):
- '''
+ """
The get_ancestors method may be referenced before circular parenting
checks, so the method is expected to be stable even with loops
- '''
+ """
A = Group('A')
B = Group('B')
A.parent_groups.append(B)
diff --git a/test/units/mock/vault_helper.py b/test/units/mock/vault_helper.py
index 1b40e381a1..c145413727 100644
--- a/test/units/mock/vault_helper.py
+++ b/test/units/mock/vault_helper.py
@@ -19,10 +19,10 @@ from ansible.parsing.vault import VaultSecret
class TextVaultSecret(VaultSecret):
- '''A secret piece of text. ie, a password. Tracks text encoding.
+ """A secret piece of text. ie, a password. Tracks text encoding.
The text encoding of the text may not be the default text encoding so
- we keep track of the encoding so we encode it to the same bytes.'''
+ we keep track of the encoding so we encode it to the same bytes."""
def __init__(self, text, encoding=None, errors=None, _bytes=None):
super(TextVaultSecret, self).__init__()
@@ -33,5 +33,5 @@ class TextVaultSecret(VaultSecret):
@property
def bytes(self):
- '''The text encoded with encoding, unless we specifically set _bytes.'''
+ """The text encoded with encoding, unless we specifically set _bytes."""
return self._bytes or to_bytes(self.text, encoding=self.encoding, errors=self.errors)
diff --git a/test/units/module_utils/basic/test_set_cwd.py b/test/units/module_utils/basic/test_set_cwd.py
index b060b50b1f..c32c777080 100644
--- a/test/units/module_utils/basic/test_set_cwd.py
+++ b/test/units/module_utils/basic/test_set_cwd.py
@@ -18,7 +18,7 @@ class TestAnsibleModuleSetCwd:
def test_set_cwd(self, monkeypatch):
- '''make sure /tmp is used'''
+ """make sure /tmp is used"""
def mock_getcwd():
return '/tmp'
@@ -40,7 +40,7 @@ class TestAnsibleModuleSetCwd:
def test_set_cwd_unreadable_use_self_tmpdir(self, monkeypatch):
- '''pwd is not readable, use instance's tmpdir property'''
+ """pwd is not readable, use instance's tmpdir property"""
def mock_getcwd():
return '/tmp'
@@ -77,7 +77,7 @@ class TestAnsibleModuleSetCwd:
def test_set_cwd_unreadable_use_home(self, monkeypatch):
- '''cwd and instance tmpdir are unreadable, use home'''
+ """cwd and instance tmpdir are unreadable, use home"""
def mock_getcwd():
return '/tmp'
@@ -114,7 +114,7 @@ class TestAnsibleModuleSetCwd:
def test_set_cwd_unreadable_use_gettempdir(self, monkeypatch):
- '''fallback to tempfile.gettempdir'''
+ """fallback to tempfile.gettempdir"""
thisdir = None
@@ -154,7 +154,7 @@ class TestAnsibleModuleSetCwd:
def test_set_cwd_unreadable_use_None(self, monkeypatch):
- '''all paths are unreable, should return None and not an exception'''
+ """all paths are unreable, should return None and not an exception"""
def mock_getcwd():
return '/tmp'
diff --git a/test/units/module_utils/common/test_dict_transformations.py b/test/units/module_utils/common/test_dict_transformations.py
index 7e7c0d3d5c..e1bf1e4f23 100644
--- a/test/units/module_utils/common/test_dict_transformations.py
+++ b/test/units/module_utils/common/test_dict_transformations.py
@@ -115,12 +115,12 @@ class TestCaseDictMerge:
class TestCaseAzureIncidental:
def test_dict_merge_invalid_dict(self):
- ''' if b is not a dict, return b '''
+ """ if b is not a dict, return b """
res = dict_merge({}, None)
assert res is None
def test_merge_sub_dicts(self):
- '''merge sub dicts '''
+ """merge sub dicts """
a = {'a': {'a1': 1}}
b = {'a': {'b1': 2}}
c = {'a': {'a1': 1, 'b1': 2}}
diff --git a/test/units/module_utils/common/validation/test_check_type_float.py b/test/units/module_utils/common/validation/test_check_type_float.py
index d7e12e1445..7d36903caa 100644
--- a/test/units/module_utils/common/validation/test_check_type_float.py
+++ b/test/units/module_utils/common/validation/test_check_type_float.py
@@ -13,7 +13,7 @@ from ansible.module_utils.common.validation import check_type_float
def test_check_type_float():
test_cases = (
('1.5', 1.5),
- ('''1.5''', 1.5),
+ ("""1.5""", 1.5),
(u'1.5', 1.5),
(1002, 1002.0),
(1.0, 1.0),
diff --git a/test/units/module_utils/facts/network/test_generic_bsd.py b/test/units/module_utils/facts/network/test_generic_bsd.py
index 3b26f0a0e1..66810cbe58 100644
--- a/test/units/module_utils/facts/network/test_generic_bsd.py
+++ b/test/units/module_utils/facts/network/test_generic_bsd.py
@@ -17,7 +17,7 @@ def mock_get_bin_path(command):
return cmds.get(command, None)
-NETBSD_IFCONFIG_A_OUT_7_1 = r'''
+NETBSD_IFCONFIG_A_OUT_7_1 = r"""
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33624
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
@@ -33,9 +33,9 @@ re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
status: active
inet 192.168.122.205 netmask 0xffffff00 broadcast 192.168.122.255
inet6 fe80::5054:ff:fe63:55af%re0 prefixlen 64 scopeid 0x2
-'''
+"""
-NETBSD_IFCONFIG_A_OUT_POST_7_1 = r'''
+NETBSD_IFCONFIG_A_OUT_POST_7_1 = r"""
lo0: flags=0x8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33624
inet 127.0.0.1/8 flags 0x0
inet6 ::1/128 flags 0x20<NODAD>
@@ -51,7 +51,7 @@ re0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
status: active
inet 192.168.122.205/24 broadcast 192.168.122.255 flags 0x0
inet6 fe80::5054:ff:fe63:55af%re0/64 flags 0x0 scopeid 0x2
-'''
+"""
NETBSD_EXPECTED = {'all_ipv4_addresses': ['192.168.122.205'],
'all_ipv6_addresses': ['fe80::5054:ff:fe63:55af%re0'],
diff --git a/test/units/module_utils/facts/other/test_facter.py b/test/units/module_utils/facts/other/test_facter.py
index 62ff5196cc..69cce6a832 100644
--- a/test/units/module_utils/facts/other/test_facter.py
+++ b/test/units/module_utils/facts/other/test_facter.py
@@ -23,7 +23,7 @@ from .. base import BaseFactsTest
from ansible.module_utils.facts.other.facter import FacterFactCollector
-facter_json_output = '''
+facter_json_output = """
{
"operatingsystemmajrelease": "25",
"hardwareisa": "x86_64",
@@ -177,7 +177,7 @@ facter_json_output = '''
"uptime_hours": 432,
"kernelversion": "4.9.14"
}
-'''
+"""
class TestFacterCollector(BaseFactsTest):
diff --git a/test/units/module_utils/facts/other/test_ohai.py b/test/units/module_utils/facts/other/test_ohai.py
index f5084c5d45..d2bac55361 100644
--- a/test/units/module_utils/facts/other/test_ohai.py
+++ b/test/units/module_utils/facts/other/test_ohai.py
@@ -23,7 +23,7 @@ from .. base import BaseFactsTest
from ansible.module_utils.facts.other.ohai import OhaiFactCollector
-ohai_json_output = r'''
+ohai_json_output = r"""
{
"kernel": {
"name": "Linux",
@@ -6717,7 +6717,7 @@ ohai_json_output = r'''
"cloud_v2": null,
"cloud": null
}
-''' # noqa
+""" # noqa
class TestOhaiCollector(BaseFactsTest):
diff --git a/test/units/module_utils/facts/system/test_lsb.py b/test/units/module_utils/facts/system/test_lsb.py
index 385a754079..01da02cc66 100644
--- a/test/units/module_utils/facts/system/test_lsb.py
+++ b/test/units/module_utils/facts/system/test_lsb.py
@@ -24,25 +24,25 @@ from .. base import BaseFactsTest
from ansible.module_utils.facts.system.lsb import LSBFactCollector
-lsb_release_a_fedora_output = '''
+lsb_release_a_fedora_output = """
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 25 (Twenty Five)
Release: 25
Codename: TwentyFive
-''' # noqa
+""" # noqa
# FIXME: a
-etc_lsb_release_ubuntu14 = '''DISTRIB_ID=Ubuntu
+etc_lsb_release_ubuntu14 = """DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"
-'''
-etc_lsb_release_no_decimal = '''DISTRIB_ID=AwesomeOS
+"""
+etc_lsb_release_no_decimal = """DISTRIB_ID=AwesomeOS
DISTRIB_RELEASE=11
DISTRIB_CODENAME=stonehenge
DISTRIB_DESCRIPTION="AwesomeÖS 11"
-'''
+"""
class TestLSBFacts(BaseFactsTest):
diff --git a/test/units/module_utils/urls/test_gzip.py b/test/units/module_utils/urls/test_gzip.py
index 8d850f2dbe..fb6b9b3481 100644
--- a/test/units/module_utils/urls/test_gzip.py
+++ b/test/units/module_utils/urls/test_gzip.py
@@ -37,22 +37,22 @@ def urlopen_mock(mocker):
JSON_DATA = b'{"foo": "bar", "baz": "qux", "sandwich": "ham", "tech_level": "pickle", "pop": "corn", "ansible": "awesome"}'
-RESP = b'''HTTP/1.1 200 OK
+RESP = b"""HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Set-Cookie: foo
Set-Cookie: bar
Content-Length: 108
-%s''' % JSON_DATA
+%s""" % JSON_DATA
-GZIP_RESP = b'''HTTP/1.1 200 OK
+GZIP_RESP = b"""HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Set-Cookie: foo
Set-Cookie: bar
Content-Encoding: gzip
Content-Length: 100
-%s''' % compress(JSON_DATA)
+%s""" % compress(JSON_DATA)
def test_Request_open_gzip(urlopen_mock):
diff --git a/test/units/parsing/test_dataloader.py b/test/units/parsing/test_dataloader.py
index 05040c3bfa..c6e0f5f5f3 100644
--- a/test/units/parsing/test_dataloader.py
+++ b/test/units/parsing/test_dataloader.py
@@ -71,7 +71,7 @@ class TestDataLoader(unittest.TestCase):
@patch.object(DataLoader, '_get_file_contents')
def test_tab_error(self, mock_def, mock_get_error_lines):
mock_def.return_value = (u"""---\nhosts: localhost\nvars:\n foo: bar\n\tblip: baz""", True)
- mock_get_error_lines.return_value = ('''\tblip: baz''', '''..foo: bar''')
+ mock_get_error_lines.return_value = ("""\tblip: baz""", """..foo: bar""")
with self.assertRaises(AnsibleParserError) as cm:
self._loader.load_from_file('dummy_yaml_text.txt')
self.assertIn(yaml_strings.YAML_COMMON_LEADING_TAB_ERROR, str(cm.exception))
diff --git a/test/units/parsing/vault/test_vault.py b/test/units/parsing/vault/test_vault.py
index 3b84b475f4..3262cac9a9 100644
--- a/test/units/parsing/vault/test_vault.py
+++ b/test/units/parsing/vault/test_vault.py
@@ -63,12 +63,12 @@ class TestUnhexlify(unittest.TestCase):
class TestParseVaulttext(unittest.TestCase):
def test(self):
- vaulttext_envelope = u'''$ANSIBLE_VAULT;1.1;AES256
+ vaulttext_envelope = u"""$ANSIBLE_VAULT;1.1;AES256
33363965326261303234626463623963633531343539616138316433353830356566396130353436
3562643163366231316662386565383735653432386435610a306664636137376132643732393835
63383038383730306639353234326630666539346233376330303938323639306661313032396437
6233623062366136310a633866373936313238333730653739323461656662303864663666653563
-3138'''
+3138"""
b_vaulttext_envelope = to_bytes(vaulttext_envelope, errors='strict', encoding='utf-8')
b_vaulttext, b_version, cipher_name, vault_id = vault.parse_vaulttext_envelope(b_vaulttext_envelope)
@@ -78,12 +78,12 @@ class TestParseVaulttext(unittest.TestCase):
self.assertIsInstance(res[2], bytes)
def test_non_hex(self):
- vaulttext_envelope = u'''$ANSIBLE_VAULT;1.1;AES256
+ vaulttext_envelope = u"""$ANSIBLE_VAULT;1.1;AES256
3336396J326261303234626463623963633531343539616138316433353830356566396130353436
3562643163366231316662386565383735653432386435610a306664636137376132643732393835
63383038383730306639353234326630666539346233376330303938323639306661313032396437
6233623062366136310a633866373936313238333730653739323461656662303864663666653563
-3138'''
+3138"""
b_vaulttext_envelope = to_bytes(vaulttext_envelope, errors='strict', encoding='utf-8')
b_vaulttext, b_version, cipher_name, vault_id = vault.parse_vaulttext_envelope(b_vaulttext_envelope)
@@ -210,13 +210,13 @@ class TestFileVaultSecret(unittest.TestCase):
password = 'some password'
# 'some password' encrypted with 'test-ansible-password'
- password_file_content = '''$ANSIBLE_VAULT;1.1;AES256
+ password_file_content = """$ANSIBLE_VAULT;1.1;AES256
61393863643638653437313566313632306462383837303132346434616433313438353634613762
3334363431623364386164616163326537366333353663650a663634306232363432626162353665
39623061353266373631636331643761306665343731376633623439313138396330346237653930
6432643864346136640a653364386634666461306231353765636662316335613235383565306437
3737
-'''
+"""
tmp_file = tempfile.NamedTemporaryFile(delete=False)
tmp_file.write(to_bytes(password_file_content))
@@ -758,12 +758,12 @@ class TestVaultLib(unittest.TestCase):
def test_encrypt_decrypt_aes256_existing_vault(self):
self.v.cipher_name = u'AES256'
b_orig_plaintext = b"Setec Astronomy"
- vaulttext = u'''$ANSIBLE_VAULT;1.1;AES256
+ vaulttext = u"""$ANSIBLE_VAULT;1.1;AES256
33363965326261303234626463623963633531343539616138316433353830356566396130353436
3562643163366231316662386565383735653432386435610a306664636137376132643732393835
63383038383730306639353234326630666539346233376330303938323639306661313032396437
6233623062366136310a633866373936313238333730653739323461656662303864663666653563
-3138'''
+3138"""
b_plaintext = self.v.decrypt(vaulttext)
self.assertEqual(b_plaintext, b_plaintext, msg="decryption failed")
@@ -774,12 +774,12 @@ class TestVaultLib(unittest.TestCase):
def test_decrypt_and_get_vault_id(self):
b_expected_plaintext = to_bytes('foo bar\n')
- vaulttext = '''$ANSIBLE_VAULT;1.2;AES256;ansible_devel
+ vaulttext = """$ANSIBLE_VAULT;1.2;AES256;ansible_devel
65616435333934613466373335363332373764363365633035303466643439313864663837393234
3330656363343637313962633731333237313636633534630a386264363438363362326132363239
39363166646664346264383934393935653933316263333838386362633534326664646166663736
6462303664383765650a356637643633366663643566353036303162386237336233393065393164
-6264'''
+6264"""
vault_secrets = self._vault_secrets_from_password('ansible_devel', 'ansible')
v = vault.VaultLib(vault_secrets)
@@ -794,12 +794,12 @@ class TestVaultLib(unittest.TestCase):
def test_decrypt_non_default_1_2(self):
b_expected_plaintext = to_bytes('foo bar\n')
- vaulttext = '''$ANSIBLE_VAULT;1.2;AES256;ansible_devel
+ vaulttext = """$ANSIBLE_VAULT;1.2;AES256;ansible_devel
65616435333934613466373335363332373764363365633035303466643439313864663837393234
3330656363343637313962633731333237313636633534630a386264363438363362326132363239
39363166646664346264383934393935653933316263333838386362633534326664646166663736
6462303664383765650a356637643633366663643566353036303162386237336233393065393164
-6264'''
+6264"""
vault_secrets = self._vault_secrets_from_password('default', 'ansible')
v = vault.VaultLib(vault_secrets)
diff --git a/test/units/plugins/action/test_action.py b/test/units/plugins/action/test_action.py
index 7d9c2915dd..a525a88df9 100644
--- a/test/units/plugins/action/test_action.py
+++ b/test/units/plugins/action/test_action.py
@@ -359,9 +359,9 @@ class TestActionBase(unittest.TestCase):
execute=execute)
def get_shell_option_for_arg(args_kv, default):
- '''A helper for get_shell_option. Returns a function that, if
+ """A helper for get_shell_option. Returns a function that, if
called with ``option`` that exists in args_kv, will return the
- value, else will return ``default`` for every other given arg'''
+ value, else will return ``default`` for every other given arg"""
def _helper(option, *args, **kwargs):
return args_kv.get(option, default)
return _helper
@@ -855,10 +855,10 @@ class TestActionBaseParseReturnedData(unittest.TestCase):
def test_json_facts_add_host(self):
action_base = _action_base()
rc = 0
- stdout = '''{"ansible_facts": {"foo": "bar", "ansible_blip": "blip_value"},
+ stdout = """{"ansible_facts": {"foo": "bar", "ansible_blip": "blip_value"},
"add_host": {"host_vars": {"some_key": ["whatever the add_host object is"]}
}
- }\n'''
+ }\n"""
err = ''
returned_data = {'rc': rc,
diff --git a/test/units/plugins/callback/test_callback.py b/test/units/plugins/callback/test_callback.py
index dd83820e1b..f134cf6e46 100644
--- a/test/units/plugins/callback/test_callback.py
+++ b/test/units/plugins/callback/test_callback.py
@@ -230,7 +230,7 @@ class TestCallbackDiff(unittest.TestCase):
'before': 'one\ntwo\nthree\n',
'after': 'one\nthree\nfour\n',
})),
- textwrap.dedent('''\
+ textwrap.dedent("""\
--- before: somefile.txt
+++ after: generated from template somefile.j2
@@ -1,3 +1,3 @@
@@ -239,7 +239,7 @@ class TestCallbackDiff(unittest.TestCase):
three
+four
- '''))
+ """))
def test_new_file(self):
self.assertMultiLineEqual(
@@ -249,7 +249,7 @@ class TestCallbackDiff(unittest.TestCase):
'before': '',
'after': 'one\ntwo\nthree\n',
})),
- textwrap.dedent('''\
+ textwrap.dedent("""\
--- before: somefile.txt
+++ after: generated from template somefile.j2
@@ -0,0 +1,3 @@
@@ -257,7 +257,7 @@ class TestCallbackDiff(unittest.TestCase):
+two
+three
- '''))
+ """))
def test_clear_file(self):
self.assertMultiLineEqual(
@@ -267,7 +267,7 @@ class TestCallbackDiff(unittest.TestCase):
'before': 'one\ntwo\nthree\n',
'after': '',
})),
- textwrap.dedent('''\
+ textwrap.dedent("""\
--- before: somefile.txt
+++ after: generated from template somefile.j2
@@ -1,3 +0,0 @@
@@ -275,7 +275,7 @@ class TestCallbackDiff(unittest.TestCase):
-two
-three
- '''))
+ """))
def test_no_trailing_newline_before(self):
self.assertMultiLineEqual(
@@ -285,7 +285,7 @@ class TestCallbackDiff(unittest.TestCase):
'before': 'one\ntwo\nthree',
'after': 'one\ntwo\nthree\n',
})),
- textwrap.dedent('''\
+ textwrap.dedent("""\
--- before: somefile.txt
+++ after: generated from template somefile.j2
@@ -1,3 +1,3 @@
@@ -295,7 +295,7 @@ class TestCallbackDiff(unittest.TestCase):
\\ No newline at end of file
+three
- '''))
+ """))
def test_no_trailing_newline_after(self):
self.assertMultiLineEqual(
@@ -305,7 +305,7 @@ class TestCallbackDiff(unittest.TestCase):
'before': 'one\ntwo\nthree\n',
'after': 'one\ntwo\nthree',
})),
- textwrap.dedent('''\
+ textwrap.dedent("""\
--- before: somefile.txt
+++ after: generated from template somefile.j2
@@ -1,3 +1,3 @@
@@ -315,7 +315,7 @@ class TestCallbackDiff(unittest.TestCase):
+three
\\ No newline at end of file
- '''))
+ """))
def test_no_trailing_newline_both(self):
self.assertMultiLineEqual(
@@ -335,7 +335,7 @@ class TestCallbackDiff(unittest.TestCase):
'before': 'one\ntwo\nthree',
'after': 'one\nfive\nthree',
})),
- textwrap.dedent('''\
+ textwrap.dedent("""\
--- before: somefile.txt
+++ after: generated from template somefile.j2
@@ -1,3 +1,3 @@
@@ -345,7 +345,7 @@ class TestCallbackDiff(unittest.TestCase):
three
\\ No newline at end of file
- '''))
+ """))
def test_diff_dicts(self):
self.assertMultiLineEqual(
@@ -353,7 +353,7 @@ class TestCallbackDiff(unittest.TestCase):
'before': dict(one=1, two=2, three=3),
'after': dict(one=1, three=3, four=4),
})),
- textwrap.dedent('''\
+ textwrap.dedent("""\
--- before
+++ after
@@ -1,5 +1,5 @@
@@ -365,7 +365,7 @@ class TestCallbackDiff(unittest.TestCase):
+ "three": 3
}
- '''))
+ """))
def test_diff_before_none(self):
self.assertMultiLineEqual(
@@ -373,13 +373,13 @@ class TestCallbackDiff(unittest.TestCase):
'before': None,
'after': 'one line\n',
})),
- textwrap.dedent('''\
+ textwrap.dedent("""\
--- before
+++ after
@@ -0,0 +1 @@
+one line
- '''))
+ """))
def test_diff_after_none(self):
self.assertMultiLineEqual(
@@ -387,13 +387,13 @@ class TestCallbackDiff(unittest.TestCase):
'before': 'one line\n',
'after': None,
})),
- textwrap.dedent('''\
+ textwrap.dedent("""\
--- before
+++ after
@@ -1 +0,0 @@
-one line
- '''))
+ """))
class TestCallbackOnMethods(unittest.TestCase):
diff --git a/test/units/plugins/connection/test_connection.py b/test/units/plugins/connection/test_connection.py
index da140ea24e..8f1bd306eb 100644
--- a/test/units/plugins/connection/test_connection.py
+++ b/test/units/plugins/connection/test_connection.py
@@ -74,7 +74,7 @@ class TestConnectionBaseClass(unittest.TestCase):
b'BECOME-SUCCESS-ouzmdnewuhucvuaabtjmweasarviygqq\n'
)
- ssh_pipelining_vvvv = b'''
+ ssh_pipelining_vvvv = b"""
debug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 251
debug2: process_mux_new_session: channel 1: request tty 0, X 1, agent 1, subsys 0, term "xterm-256color", cmd "/bin/sh -c 'sudo -H -S -p "[sudo via ansible, key=ouzmdnewuhucvuaabtjmweasarviygqq] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-ouzmdnewuhucvuaabtjmweasarviygqq; /bin/true'"'"' && sleep 0'", env 0
debug3: process_mux_new_session: got fds stdin 9, stdout 10, stderr 11
@@ -85,9 +85,9 @@ debug2: channel 2: rcvd ext data 67
[sudo via ansible, key=ouzmdnewuhucvuaabtjmweasarviygqq] password: debug2: channel 2: written 67 to efd 11
BECOME-SUCCESS-ouzmdnewuhucvuaabtjmweasarviygqq
debug3: receive packet: type 98
-''' # noqa
+""" # noqa
- ssh_nopipelining_vvvv = b'''
+ ssh_nopipelining_vvvv = b"""
debug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 251
debug2: process_mux_new_session: channel 1: request tty 1, X 1, agent 1, subsys 0, term "xterm-256color", cmd "/bin/sh -c 'sudo -H -S -p "[sudo via ansible, key=ouzmdnewuhucvuaabtjmweasarviygqq] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-ouzmdnewuhucvuaabtjmweasarviygqq; /bin/true'"'"' && sleep 0'", env 0
debug3: mux_client_request_session: session request sent
@@ -101,7 +101,7 @@ debug3: Received SSH2_MSG_IGNORE
BECOME-SUCCESS-ouzmdnewuhucvuaabtjmweasarviygqq
debug3: receive packet: type 98
-''' # noqa
+""" # noqa
ssh_novvvv = (
b'[sudo via ansible, key=ouzmdnewuhucvuaabtjmweasarviygqq] password: \n'
@@ -117,9 +117,9 @@ debug3: receive packet: type 98
nothing = b''
- in_front = b'''
+ in_front = b"""
debug1: Sending command: /bin/sh -c 'sudo -H -S -p "[sudo via ansible, key=ouzmdnewuhucvuaabtjmweasarviygqq] password: " -u root /bin/sh -c '"'"'echo
-'''
+"""
c = NoOpConnection(self.play_context, self.in_stream)
c.set_become_plugin(become_loader.get('sudo'))
diff --git a/test/units/plugins/test_plugins.py b/test/units/plugins/test_plugins.py
index 4bd96a1756..1bd9aef3a2 100644
--- a/test/units/plugins/test_plugins.py
+++ b/test/units/plugins/test_plugins.py
@@ -86,11 +86,11 @@ class TestErrors(unittest.TestCase):
self.assertPluginLoaderConfigBecomes(None, [])
def test__load_module_source_no_duplicate_names(self):
- '''
+ """
This test simulates importing 2 plugins with the same name,
and validating that the import is short circuited if a file with the same name
has already been imported
- '''
+ """
fixture_path = os.path.join(os.path.dirname(__file__), 'loader_fixtures')
@@ -104,10 +104,10 @@ class TestErrors(unittest.TestCase):
@patch('ansible.plugins.loader.glob')
@patch.object(PluginLoader, '_get_paths_with_context')
def test_all_no_duplicate_names(self, gp_mock, glob_mock):
- '''
+ """
This test goes along with ``test__load_module_source_no_duplicate_names``
and ensures that we ignore duplicate imports on multiple paths
- '''
+ """
fixture_path = os.path.join(os.path.dirname(__file__), 'loader_fixtures')
diff --git a/test/units/template/test_templar.py b/test/units/template/test_templar.py
index dd7f340650..920b64fa36 100644
--- a/test/units/template/test_templar.py
+++ b/test/units/template/test_templar.py
@@ -207,7 +207,7 @@ class TestTemplarTemplate(BaseTemplar, unittest.TestCase):
self.assertTrue(self.is_unsafe(res), 'returned value from template.template (%s) is not marked unsafe' % res)
def test_weird(self):
- data = u'''1 2 #}huh{# %}ddfg{% }}dfdfg{{ {%what%} {{#foo#}} {%{bar}%} {#%blip%#} {{asdfsd%} 3 4 {{foo}} 5 6 7'''
+ data = u"""1 2 #}huh{# %}ddfg{% }}dfdfg{{ {%what%} {{#foo#}} {%{bar}%} {#%blip%#} {{asdfsd%} 3 4 {{foo}} 5 6 7"""
self.assertRaisesRegex(AnsibleError,
'template error while templating string',
self.templar.template,
diff --git a/test/units/utils/display/test_logger.py b/test/units/utils/display/test_logger.py
index b3203f8cff..7218448b81 100644
--- a/test/units/utils/display/test_logger.py
+++ b/test/units/utils/display/test_logger.py
@@ -10,10 +10,10 @@ import sys
def test_logger():
- '''
+ """
Avoid CVE-2019-14846 as 3rd party libs will disclose secrets when
logging is set to DEBUG
- '''
+ """
# clear loaded modules to have unadultered test.
for loaded in list(sys.modules.keys()):
diff --git a/test/units/vars/test_variable_manager.py b/test/units/vars/test_variable_manager.py
index 0318d9cc40..d3cdf0de08 100644
--- a/test/units/vars/test_variable_manager.py
+++ b/test/units/vars/test_variable_manager.py
@@ -249,9 +249,9 @@ class TestVariableManager(unittest.TestCase):
@patch('ansible.playbook.role.definition.unfrackpath', mock_unfrackpath_noop)
def test_variable_manager_role_vars_dependencies(self):
- '''
+ """
Tests vars from role dependencies with duplicate dependencies.
- '''
+ """
mock_inventory = MagicMock()
fake_loader = DictDataLoader({