Fix typos in builtin modules (#81969)

pull/81975/head
Isaac Chung 8 months ago committed by GitHub
parent 4f04df75cc
commit 5812cabaf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -814,7 +814,7 @@ class DocCLI(CLI, RoleMixin):
else:
plugin_names = self._list_plugins(ptype, None)
docs['all'][ptype] = self._get_plugins_docs(ptype, plugin_names, fail_ok=(ptype in ('test', 'filter')), fail_on_errors=no_fail)
# reset list after each type to avoid polution
# reset list after each type to avoid pollution
elif listing:
if plugin_type == 'keyword':
docs = DocCLI._list_keywords()

@ -224,7 +224,7 @@ class TaskExecutor:
if self._task.loop_with:
if self._task.loop_with in self._shared_loader_obj.lookup_loader:
# TODO: hardcoded so it fails for non first_found lookups, but thhis shoudl be generalized for those that don't do their own templating
# TODO: hardcoded so it fails for non first_found lookups, but this should be generalized for those that don't do their own templating
# lookup prop/attribute?
fail = bool(self._task.loop_with != 'first_found')
loop_terms = listify_lookup_plugin_terms(terms=self._task.loop, templar=templar, fail_on_undefined=fail, convert_bare=False)

@ -135,7 +135,7 @@ class CollectionDependencyProviderBase(AbstractProvider):
:param resolutions: Mapping of identifier, candidate pairs.
:param candidates: Possible candidates for the identifer.
:param candidates: Possible candidates for the identifier.
Mapping of identifier, list of candidate pairs.
:param information: Requirement information of each package.
@ -442,7 +442,7 @@ class CollectionDependencyProviderBase(AbstractProvider):
# NOTE: This guard expression MUST perform an early exit only
# NOTE: after the `get_collection_dependencies()` call because
# NOTE: internally it polulates the artifact URL of the candidate,
# NOTE: internally it populates the artifact URL of the candidate,
# NOTE: its SHA hash and the Galaxy API token. These are still
# NOTE: necessary with `--no-deps` because even with the disabled
# NOTE: dependency resolution the outer layer will still need to

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2020-2021, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""Requiement reporter implementations."""
"""Requirement reporter implementations."""
from __future__ import annotations

@ -61,7 +61,7 @@ def to_masklen(val):
def to_subnet(addr, mask, dotted_notation=False):
""" coverts an addr / mask pair to a subnet in cidr notation """
""" converts an addr / mask pair to a subnet in cidr notation """
try:
if not is_masklen(mask):
raise ValueError

@ -107,7 +107,7 @@ class SunOSHardware(Hardware):
# Counting cores on Solaris can be complicated.
# https://blogs.oracle.com/mandalika/entry/solaris_show_me_the_cpu
# Treat 'processor_count' as physical sockets and 'processor_cores' as
# virtual CPUs visisble to Solaris. Not a true count of cores for modern SPARC as
# virtual CPUs visible to Solaris. Not a true count of cores for modern SPARC as
# these processors have: sockets -> cores -> threads/virtual CPU.
if len(sockets) > 0:
cpu_facts['processor_count'] = len(sockets)

@ -100,7 +100,7 @@ class ActionBase(ABC):
etc) associated with this task.
:returns: dictionary of results from the module
Implementors of action modules may find the following variables especially useful:
Implementers of action modules may find the following variables especially useful:
* Module parameters. These are stored in self._task.args
"""

@ -49,7 +49,7 @@ class ActionModule(ActionBase):
# TODO: create 'conflict' detection in base class to deal with repeats and aliases and warn user
args = combine_vars(raw, args)
else:
raise AnsibleActionFail('Invalid raw parameters passed, requires a dictonary/mapping got a %s' % type(raw))
raise AnsibleActionFail('Invalid raw parameters passed, requires a dictionary/mapping got a %s' % type(raw))
# Parse out any hostname:port patterns
new_name = args.get('name', args.get('hostname', args.get('host', None)))

@ -25,7 +25,7 @@ class ActionModule(ActionBase):
# deal with 'setup specific arguments'
if fact_module not in C._ACTION_SETUP:
# TODO: remove in favor of controller side argspec detecing valid arguments
# TODO: remove in favor of controller side argspec detecting valid arguments
# network facts modules must support gather_subset
try:
name = self._connection.ansible_name.removeprefix('ansible.netcommon.')

@ -113,7 +113,7 @@ class InventoryModule(BaseFileInventoryPlugin):
raise AnsibleParserError('Plugin configuration YAML file, not YAML inventory')
# We expect top level keys to correspond to groups, iterate over them
# to get host, vars and subgroups (which we iterate over recursivelly)
# to get host, vars and subgroups (which we iterate over recursively)
if isinstance(data, MutableMapping):
for group_name in data:
self._parse_group(group_name, data[group_name])

@ -48,7 +48,7 @@ tasks:
RETURN = """
_list:
description:
- list of composed dictonaries with key and value
- list of composed dictionaries with key and value
type: list
"""

@ -186,7 +186,7 @@ class LookupModule(LookupBase):
# NOTE: this is used as 'global' but can be set many times?!?!?
skip = self.get_option('skip')
# magic extra spliting to create lists
# magic extra splitting to create lists
filelist = _split_on(files, ',;')
pathlist = _split_on(paths, ',:;')
@ -238,6 +238,6 @@ class LookupModule(LookupBase):
# if we get here, no file was found
if skip:
# NOTE: global skip wont matter, only last 'skip' value in dict term
# NOTE: global skip won't matter, only last 'skip' value in dict term
return []
raise AnsibleLookupError("No file was found when using first_found.")

@ -64,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

@ -84,7 +84,7 @@ class TerminalBase(ABC):
This method is called right after the invoke_shell() is called from
the Paramiko SSHClient instance. It provides an opportunity to setup
terminal parameters such as disbling paging for instance.
terminal parameters such as disabling paging for instance.
"""
pass

@ -480,7 +480,7 @@ class JinjaPluginIntercept(MutableMapping):
self._seen_it.remove(key)
raise TemplateSyntaxError('Could not load "%s": %s' % (key, to_native(original_exc or e)), 0)
# if i do have func and it is a filter, it nees wrapping
# if i do have func and it is a filter, it needs wrapping
if self._pluginloader.type == 'filter':
# filter need wrapping
if key in C.STRING_TYPE_FILTERS:

Loading…
Cancel
Save