diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 598f72b7..6cd70234 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: - id: update-docs - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-merge-conflict - id: debug-statements @@ -36,7 +36,7 @@ repos: args: ["--filter-files"] - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.4.2 hooks: - id: black diff --git a/plugins/plugin_utils/base/cli_parser.py b/plugins/plugin_utils/base/cli_parser.py index 3433e64e..7fbdd0be 100644 --- a/plugins/plugin_utils/base/cli_parser.py +++ b/plugins/plugin_utils/base/cli_parser.py @@ -1,6 +1,7 @@ """ The base class for cli_parsers """ + from __future__ import absolute_import, division, print_function diff --git a/plugins/plugin_utils/base/validate.py b/plugins/plugin_utils/base/validate.py index 9e882807..a38aeb41 100644 --- a/plugins/plugin_utils/base/validate.py +++ b/plugins/plugin_utils/base/validate.py @@ -1,6 +1,7 @@ """ The base class for validator """ + from __future__ import absolute_import, division, print_function @@ -181,10 +182,10 @@ def _load_validator(engine, data, criteria, plugin_vars=None, cls_name="Validate return validator, result except Exception as exc: result["failed"] = True - result[ - "msg" - ] = "For engine '{engine}' error loading the corresponding validate plugin: {err}".format( - engine=engine, - err=to_native(exc), + result["msg"] = ( + "For engine '{engine}' error loading the corresponding validate plugin: {err}".format( + engine=engine, + err=to_native(exc), + ) ) return None, result diff --git a/plugins/sub_plugins/cli_parser/json_parser.py b/plugins/sub_plugins/cli_parser/json_parser.py index b0c51590..b2db24ca 100644 --- a/plugins/sub_plugins/cli_parser/json_parser.py +++ b/plugins/sub_plugins/cli_parser/json_parser.py @@ -3,6 +3,7 @@ This is the json parser for use with the cli_parse module and action plugin """ + from __future__ import absolute_import, division, print_function diff --git a/plugins/sub_plugins/cli_parser/textfsm_parser.py b/plugins/sub_plugins/cli_parser/textfsm_parser.py index 188465cd..f6e710d6 100644 --- a/plugins/sub_plugins/cli_parser/textfsm_parser.py +++ b/plugins/sub_plugins/cli_parser/textfsm_parser.py @@ -4,6 +4,7 @@ This is the textfsm parser for use with the cli_parse module and action plugin https://github.com/google/textfsm """ + from __future__ import absolute_import, division, print_function diff --git a/plugins/sub_plugins/cli_parser/ttp_parser.py b/plugins/sub_plugins/cli_parser/ttp_parser.py index f8d9c700..e52a466d 100644 --- a/plugins/sub_plugins/cli_parser/ttp_parser.py +++ b/plugins/sub_plugins/cli_parser/ttp_parser.py @@ -4,6 +4,7 @@ This is the ttp parser for use with the cli_parse module and action plugin https://github.com/dmulyalin/ttp """ + from __future__ import absolute_import, division, print_function diff --git a/plugins/sub_plugins/cli_parser/xml_parser.py b/plugins/sub_plugins/cli_parser/xml_parser.py index 6e532013..36e08235 100644 --- a/plugins/sub_plugins/cli_parser/xml_parser.py +++ b/plugins/sub_plugins/cli_parser/xml_parser.py @@ -4,6 +4,7 @@ This is the xml parser for use with the cli_parse module and action plugin https://github.com/martinblech/xmltodict """ + from __future__ import absolute_import, division, print_function