[pre-commit] fix typos and configure codespell

This chanage enabled codespell in precommit and
fixes the existing typos.

A followup commit will enable this in tox and ci.

Change-Id: I0a11bcd5a88247a48d3437525fc8a3cb3cdd4e58
This commit is contained in:
Sean Mooney
2024-10-22 19:31:14 +01:00
parent 4d5022ab94
commit 5f79ab87c7
39 changed files with 71 additions and 65 deletions

View File

@@ -52,8 +52,8 @@ class DefaultStrategySelector(base.BaseSelector):
else:
available_strategies = self.strategy_loader.list_available()
available_strategies_for_goal = list(
key for key, strat in available_strategies.items()
if strat.get_goal_name() == self.goal_name)
key for key, strategy in available_strategies.items()
if strategy.get_goal_name() == self.goal_name)
if not available_strategies_for_goal:
raise exception.NoAvailableStrategyForGoal(

View File

@@ -32,7 +32,7 @@ class HostMaintenance(base.HostMaintenanceBaseStrategy):
*Description*
It is a migration strategy for one compute node maintenance,
without having the user's application been interruptted.
without having the user's application been interrupted.
If given one backup node, the strategy will firstly
migrate all instances from the maintenance node to
the backup node. If the backup node is not provided,

View File

@@ -563,7 +563,7 @@ class ZoneMigration(base.ZoneMigrationBaseStrategy):
filter_actions = self.get_priority_filter_list()
LOG.debug(filter_actions)
# apply all filters set in input prameter
# apply all filters set in input parameter
for action in list(reversed(filter_actions)):
LOG.debug(action)
result = action.apply_filter(result)
@@ -795,7 +795,7 @@ class ComputeHostSortFilter(SortMovingToFrontFilter):
:param item: instance object
:param sort_key: compute host name
:returns: true: compute name on which intance is equals sort_key
:returns: true: compute name on where instance host equals sort_key
false: otherwise
"""
@@ -823,7 +823,7 @@ class StorageHostSortFilter(SortMovingToFrontFilter):
:param item: volume object
:param sort_key: storage pool name
:returns: true: pool name on which intance is equals sort_key
:returns: true: pool name on where instance.host equals sort_key
false: otherwise
"""

View File

@@ -59,7 +59,7 @@ class DecisionEngineThreadPool(object, metaclass=service.Singleton):
:param futures: list, set or dictionary of futures
:type futures: list :py:class:`futurist.GreenFuture`
:param fn: function to execute upon the future finishing exection
:param fn: function to execute upon the future finishing execution
:param args: arguments for the function
:param kwargs: amount of arguments for the function
"""
@@ -83,7 +83,7 @@ class DecisionEngineThreadPool(object, metaclass=service.Singleton):
:param futures: list, set or dictionary of futures
:type futures: list :py:class:`futurist.GreenFuture`
:param fn: function to execute upon the future finishing exection
:param fn: function to execute upon the future finishing execution
:param args: arguments for the function
:param kwargs: amount of arguments for the function
"""