Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable codespell #3080

Merged
merged 1 commit into from
Mar 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ exclude: |
^docs/conf.py$
)
repos:
- repo: https://github.com/codespell-project/codespell
rev: v2.0.0
hooks:
- id: codespell
- repo: https://github.com/PyCQA/isort
rev: 5.6.4
hooks:
Expand Down
2 changes: 1 addition & 1 deletion docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ test roles from a monolith repo.
└── README.md

The role initialized with Molecule (baz in this case) would simply reference
the dependant roles via it's ``converge.yml`` or meta dependencies.
the dependent roles via it's ``converge.yml`` or meta dependencies.

Molecule can test complex scenarios leveraging this technique.

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ being listed first:
- `How to test Ansible and don’t go nuts <https://www.goncharov.xyz/it/ansible-testing-en.html>`_ `@ultral`

.. When updating the list remember to remove broken links or outdated content
that is no longer appliable to current versions. If older articles are
that is no longer applicable to current versions. If older articles are
updated to match latest versions move them up.
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Install Molecule:
$ python3 -m pip install --user "molecule[lint]"

Molecule uses the "delegated" driver by default. Other drivers can
be installed seperately from PyPI, such as the molecule-docker driver.
be installed separately from PyPI, such as the molecule-docker driver.
If you would like to use docker as the molecule driver, the installation
command would look like this:

Expand Down
2 changes: 1 addition & 1 deletion src/molecule/command/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def execute_subcommand(config, subcommand):
command = getattr(command_module, text.camelize(subcommand))
# knowledge of the current action is used by some provisioners
# to ensure they behave correctly during certain sequence steps,
# particulary the setting of ansible options in create/destroy,
# particularly the setting of ansible options in create/destroy,
# and is also used for reporting in execute_cmdline_scenarios
config.action = subcommand

Expand Down
2 changes: 1 addition & 1 deletion src/molecule/command/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Prepare(base.Base):

.. option:: molecule prepare --force

Force the execution fo the prepare playbook.
Force the execution for the prepare playbook.

.. program:: molecule --debug prepare

Expand Down
2 changes: 1 addition & 1 deletion src/molecule/driver/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def _converged(self):
return str(self._config.state.converged).lower()

def __eq__(self, other):
"""Implement equality comparision."""
"""Implement equality comparison."""
# trick that allows us to test if a driver is loaded via:
# if 'driver-name' in drivers()
return str(self) == str(other)
Expand Down
8 changes: 4 additions & 4 deletions src/molecule/provisioner/ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Ansible(base.Base):
between Ansible and Molecule, it is best to perform these tasks in the
prepare or converge playbooks.

It is the developers responsiblity to properly map the modules's fact
It is the developers responsibility to properly map the modules' fact
data into the instance_conf_dict fact in the create playbook. This
allows Molecule to properly configure Ansible inventory.

Expand Down Expand Up @@ -209,7 +209,7 @@ class Ansible(base.Base):
$ephemeral_directory/plugins/filter/:$project_directory/filter/plugins/:~/.ansible/plugins/filter:/usr/share/ansible/plugins/modules

Environment variables can be passed to the provisioner. Variables in this
section which match the names above will be appened to the above defaults,
section which match the names above will be appended to the above defaults,
and converted to absolute paths, where the relative parent is the
$scenario_directory.

Expand Down Expand Up @@ -301,7 +301,7 @@ class Ansible(base.Base):
The extra hosts added to the inventory using this key won't be
created/destroyed by Molecule. It is the developers responsibility
to target the proper hosts in the playbook. Only the hosts defined
under `Platforms`_ should be targetted instead of ``all``.
under `Platforms`_ should be targeted instead of ``all``.


An alternative to the above is symlinking. Molecule creates symlinks to
Expand All @@ -319,7 +319,7 @@ class Ansible(base.Base):

Again, it is the developers responsibility to target the proper hosts
in the playbook. Only the hosts defined under
`Platforms`_ should be targetted instead of ``all``.
`Platforms`_ should be targeted instead of ``all``.

.. note::

Expand Down
4 changes: 2 additions & 2 deletions src/molecule/test/unit/command/test_converge.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_execute(

def test_ansible_args_passed_to_scenarios_get_configs(mocker):
# Scenarios patch is needed to safely invoke CliRunner
# in the test environment and block scenario exectution
# in the test environment and block scenario execution
mocker.patch("molecule.scenarios.Scenarios")
patched_get_configs = mocker.patch("molecule.command.base.get_configs")

Expand All @@ -58,6 +58,6 @@ def test_ansible_args_passed_to_scenarios_get_configs(mocker):
ansible_args = args[2:]
runner.invoke(main, args, obj={})

# call index [0][2] is the 3rd positional arguement to get_configs,
# call index [0][2] is the 3rd positional argument to get_configs,
# which should be the tuple of parsed ansible_args from the CLI
assert patched_get_configs.call_args[0][2] == ansible_args
2 changes: 1 addition & 1 deletion src/molecule/test/unit/model/v2/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
"""Unittest for v2 condig format."""
"""Unittest for v2 config format."""

import os

Expand Down
4 changes: 2 additions & 2 deletions src/molecule/verifier/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ def env(self):
)

def __eq__(self, other):
"""Implement equality comparision."""
"""Implement equality comparison."""
return str(self) == str(other)

def __lt__(self, other):
"""Implement lower than comparision."""
"""Implement lower than comparison."""
return str.__lt__(str(self), str(other))

def __hash__(self):
Expand Down