diff options
Diffstat (limited to 'lib/ansible/plugins/shell')
-rw-r--r-- | lib/ansible/plugins/shell/__init__.py | 7 | ||||
-rw-r--r-- | lib/ansible/plugins/shell/cmd.py | 3 | ||||
-rw-r--r-- | lib/ansible/plugins/shell/powershell.py | 3 | ||||
-rw-r--r-- | lib/ansible/plugins/shell/sh.py | 3 |
4 files changed, 6 insertions, 10 deletions
diff --git a/lib/ansible/plugins/shell/__init__.py b/lib/ansible/plugins/shell/__init__.py index c9f8add..5aa0a1b 100644 --- a/lib/ansible/plugins/shell/__init__.py +++ b/lib/ansible/plugins/shell/__init__.py @@ -14,8 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see <http://www.gnu.org/licenses/>. -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type +from __future__ import annotations import os import os.path @@ -65,12 +64,12 @@ class ShellBase(AnsiblePlugin): # TODO: config system should already resolve this so we should be able to just iterate over dicts env = self.get_option('environment') if isinstance(env, string_types): - raise AnsibleError('The "envirionment" keyword takes a list of dictionaries or a dictionary, not a string') + raise AnsibleError('The "environment" keyword takes a list of dictionaries or a dictionary, not a string') if not isinstance(env, Sequence): env = [env] for env_dict in env: if not isinstance(env_dict, Mapping): - raise AnsibleError('The "envirionment" keyword takes a list of dictionaries (or single dictionary), but got a "%s" instead' % type(env_dict)) + raise AnsibleError('The "environment" keyword takes a list of dictionaries (or single dictionary), but got a "%s" instead' % type(env_dict)) self.env.update(env_dict) # We can remove the try: except in the future when we make ShellBase a proper subset of diff --git a/lib/ansible/plugins/shell/cmd.py b/lib/ansible/plugins/shell/cmd.py index 152fdd0..db851df 100644 --- a/lib/ansible/plugins/shell/cmd.py +++ b/lib/ansible/plugins/shell/cmd.py @@ -1,7 +1,6 @@ # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type +from __future__ import annotations DOCUMENTATION = ''' name: cmd diff --git a/lib/ansible/plugins/shell/powershell.py b/lib/ansible/plugins/shell/powershell.py index f2e78cb..405211a 100644 --- a/lib/ansible/plugins/shell/powershell.py +++ b/lib/ansible/plugins/shell/powershell.py @@ -1,8 +1,7 @@ # Copyright (c) 2014, Chris Church <chris@ninemoreminutes.com> # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type +from __future__ import annotations DOCUMENTATION = ''' name: powershell diff --git a/lib/ansible/plugins/shell/sh.py b/lib/ansible/plugins/shell/sh.py index 146c466..e0412b7 100644 --- a/lib/ansible/plugins/shell/sh.py +++ b/lib/ansible/plugins/shell/sh.py @@ -1,8 +1,7 @@ # Copyright (c) 2014, Chris Church <chris@ninemoreminutes.com> # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type +from __future__ import annotations DOCUMENTATION = ''' name: sh |