diff --git a/changelogs/fragments/use-before.yaml b/changelogs/fragments/use-before.yaml new file mode 100644 index 0000000..ef8bf91 --- /dev/null +++ b/changelogs/fragments/use-before.yaml @@ -0,0 +1,3 @@ +--- +trivial: + - cli_parse - Fix spurious use-before-assign. diff --git a/plugins/action/cli_parse.py b/plugins/action/cli_parse.py index 4106dd7..3a6a38a 100644 --- a/plugins/action/cli_parse.py +++ b/plugins/action/cli_parse.py @@ -27,13 +27,6 @@ from ansible_collections.ansible.utils.plugins.module_utils.common.argspec_valid from ansible_collections.ansible.utils.plugins.modules.cli_parse import DOCUMENTATION -# python 2.7 compat for FileNotFoundError -try: - FileNotFoundError -except NameError: - FileNotFoundError = IOError - - ARGSPEC_CONDITIONALS = { "argument_spec": {"parser": {"mutually_exclusive": [["command", "template_path"]]}}, "required_one_of": [["command", "text"]],