From e9911888f6dcdf9031f3fdb2e32c52e45815fdbe Mon Sep 17 00:00:00 2001 From: Kate Case Date: Wed, 25 Jan 2023 08:37:58 -0500 Subject: Add prettier and isort to pre-commit. (#270) * Add prettier and isort to pre-commit. * Bump line-length to 100 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- plugins/modules/vyos_ping.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'plugins/modules/vyos_ping.py') diff --git a/plugins/modules/vyos_ping.py b/plugins/modules/vyos_ping.py index 79345830..8c0330df 100644 --- a/plugins/modules/vyos_ping.py +++ b/plugins/modules/vyos_ping.py @@ -134,12 +134,12 @@ rtt: sample: {"avg": 2, "max": 8, "min": 1, "mdev": 24} """ -from ansible.module_utils.basic import AnsibleModule -from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.vyos import ( - run_commands, -) import re +from ansible.module_utils.basic import AnsibleModule + +from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.vyos import run_commands + def main(): """main entry point for module execution""" @@ -150,9 +150,7 @@ def main(): ttl=dict(type="int"), size=dict(type="int"), interval=dict(type="int"), - state=dict( - type="str", choices=["absent", "present"], default="present" - ), + state=dict(type="str", choices=["absent", "present"], default="present"), ) module = AnsibleModule(argument_spec=argument_spec) @@ -170,9 +168,7 @@ def main(): if warnings: results["warnings"] = warnings - results["commands"] = [ - build_ping(dest, count, size, interval, source, ttl) - ] + results["commands"] = [build_ping(dest, count, size, interval, source, ttl)] ping_results = run_commands(module, commands=results["commands"]) ping_results_list = ping_results[0].split("\n") -- cgit v1.2.3