diff options
author | Pablo Iranzo Gómez <Pablo.Iranzo@gmail.com> | 2016-06-30 16:28:54 +0200 |
---|---|---|
committer | Pablo Iranzo Gómez <Pablo.Iranzo@gmail.com> | 2016-06-30 17:44:49 +0200 |
commit | 74221942ef29f75a6bacf461e95df88c792136f5 (patch) | |
tree | c7bb276470e245cdf0dcd9f62b58eaa661b45775 /taskflow | |
parent | 21aa37553260b8a6a688657957612bc056b24e2b (diff) | |
download | taskflow-74221942ef29f75a6bacf461e95df88c792136f5.tar.gz |
Fix some misspellings in the function name and descriptions
Change-Id: I7e3451feb94b1f25b00c5e7b197bb6b527548306
Diffstat (limited to 'taskflow')
-rw-r--r-- | taskflow/engines/action_engine/compiler.py | 8 | ||||
-rw-r--r-- | taskflow/engines/action_engine/process_executor.py | 2 | ||||
-rw-r--r-- | taskflow/engines/base.py | 2 | ||||
-rw-r--r-- | taskflow/jobs/backends/impl_zookeeper.py | 2 | ||||
-rw-r--r-- | taskflow/jobs/base.py | 2 | ||||
-rw-r--r-- | taskflow/patterns/graph_flow.py | 2 | ||||
-rw-r--r-- | taskflow/persistence/backends/impl_memory.py | 2 | ||||
-rw-r--r-- | taskflow/storage.py | 2 | ||||
-rw-r--r-- | taskflow/tests/unit/test_failure.py | 2 | ||||
-rw-r--r-- | taskflow/tests/unit/test_types.py | 4 | ||||
-rw-r--r-- | taskflow/types/failure.py | 8 | ||||
-rw-r--r-- | taskflow/types/notifier.py | 4 | ||||
-rw-r--r-- | taskflow/types/tree.py | 2 |
13 files changed, 21 insertions, 21 deletions
diff --git a/taskflow/engines/action_engine/compiler.py b/taskflow/engines/action_engine/compiler.py index ab0e443..6087c47 100644 --- a/taskflow/engines/action_engine/compiler.py +++ b/taskflow/engines/action_engine/compiler.py @@ -101,11 +101,11 @@ class Compilation(object): @property def hierarchy(self): - """The hierachy of patterns (as a tree structure).""" + """The hierarchy of patterns (as a tree structure).""" return self._hierarchy -def _overlap_occurence_detector(to_graph, from_graph): +def _overlap_occurrence_detector(to_graph, from_graph): """Returns how many nodes in 'from' graph are in 'to' graph (if any).""" return iter_utils.count(node for node in from_graph.nodes_iter() if node in to_graph) @@ -167,7 +167,7 @@ class FlowCompiler(object): for child in flow) decomposed_graphs = list(six.itervalues(decomposed)) graph = gr.merge_graphs(graph, *decomposed_graphs, - overlap_detector=_overlap_occurence_detector) + overlap_detector=_overlap_occurrence_detector) for u, v, attr_dict in flow.iter_links(): u_graph = decomposed[u] v_graph = decomposed[v] @@ -270,7 +270,7 @@ class PatternCompiler(object): of tasks ``(b, c)`` and task ``d``. The algorithm that will be performed (mirroring the above described logic) - will go through the following steps (the tree hierachy building is left + will go through the following steps (the tree hierarchy building is left out as that is more obvious):: Compiling f diff --git a/taskflow/engines/action_engine/process_executor.py b/taskflow/engines/action_engine/process_executor.py index c45a92d..e59852f 100644 --- a/taskflow/engines/action_engine/process_executor.py +++ b/taskflow/engines/action_engine/process_executor.py @@ -673,7 +673,7 @@ class ParallelProcessTaskExecutor(base.ParallelTaskExecutor): def rebind_task(): # Creates and binds proxies for all events the task could receive # so that when the clone runs in another process that this task - # can recieve the same notifications (thus making it look like the + # can receive the same notifications (thus making it look like the # the notifications are transparently happening in this process). needed = set() for (event_type, listeners) in task.notifier.listeners_iter(): diff --git a/taskflow/engines/base.py b/taskflow/engines/base.py index a54efb0..0e76071 100644 --- a/taskflow/engines/base.py +++ b/taskflow/engines/base.py @@ -93,7 +93,7 @@ class Engine(object): If a flow had previously ended up (from a prior engine :py:func:`.run`) in the ``FAILURE``, ``SUCCESS`` or ``REVERTED`` states (or for some reason it ended up in an intermediary state) it - can be desireable to make it possible to run it again. Calling this + can be desirable to make it possible to run it again. Calling this method enables that to occur (without causing a state transition failure, which would typically occur if :py:meth:`.run` is called directly without doing a reset). diff --git a/taskflow/jobs/backends/impl_zookeeper.py b/taskflow/jobs/backends/impl_zookeeper.py index 098108e..6bdcbdd 100644 --- a/taskflow/jobs/backends/impl_zookeeper.py +++ b/taskflow/jobs/backends/impl_zookeeper.py @@ -406,7 +406,7 @@ class ZookeeperJobBoard(base.NotifyingJobBoard): path, exc_info=True) else: with self._job_cond: - # Now we can offically check if someone already placed this + # Now we can officially check if someone already placed this # jobs information into the known job set (if it's already # existing then just leave it alone). if path not in self._known_jobs: diff --git a/taskflow/jobs/base.py b/taskflow/jobs/base.py index 8fa0173..4e9bf1a 100644 --- a/taskflow/jobs/base.py +++ b/taskflow/jobs/base.py @@ -173,7 +173,7 @@ class Job(object): otherwise return true (a job failure exception may also be raised if the job information can not be read, for whatever reason). Periodic state checks will happen every ``delay`` seconds where ``delay`` will - be multipled by the given multipler after a state is found that is + be multiplied by the given multipler after a state is found that is **not** complete. Note that if no timeout is given this is equivalent to blocking diff --git a/taskflow/patterns/graph_flow.py b/taskflow/patterns/graph_flow.py index e3d9d9b..8296a6d 100644 --- a/taskflow/patterns/graph_flow.py +++ b/taskflow/patterns/graph_flow.py @@ -90,7 +90,7 @@ class Flow(flow.Flow): execute (or whether the execution of ``v`` should be ignored, and therefore not executed). It is expected to take as single keyword argument ``history`` which - will be the execution results of all ``u`` decideable + will be the execution results of all ``u`` decidable links that have ``v`` as a target. It is expected to return a single boolean (``True`` to allow ``v`` execution or ``False`` to not). diff --git a/taskflow/persistence/backends/impl_memory.py b/taskflow/persistence/backends/impl_memory.py index 1be48bb..3b6f10c 100644 --- a/taskflow/persistence/backends/impl_memory.py +++ b/taskflow/persistence/backends/impl_memory.py @@ -52,7 +52,7 @@ class FakeFilesystem(object): :meth:`~taskflow.persistence.backends.impl_memory.FakeFilesystem.get` or other read-only actions (like calling into :meth:`~taskflow.persistence.backends.impl_memory.FakeFilesystem.ls`) - are occuring at the same time. + are occurring at the same time. Example usage: diff --git a/taskflow/storage.py b/taskflow/storage.py index 9cd069f..15edb19 100644 --- a/taskflow/storage.py +++ b/taskflow/storage.py @@ -1028,7 +1028,7 @@ class Storage(object): optional_args=None): """Fetch ``execute`` arguments for an atom using its args mapping.""" def _extract_first_from(name, sources): - """Extracts/returns first occurence of key in list of dicts.""" + """Extracts/returns first occurrence of key in list of dicts.""" for i, source in enumerate(sources): if not source: continue diff --git a/taskflow/tests/unit/test_failure.py b/taskflow/tests/unit/test_failure.py index bc95dd0..0d0f264 100644 --- a/taskflow/tests/unit/test_failure.py +++ b/taskflow/tests/unit/test_failure.py @@ -460,7 +460,7 @@ class FailureCausesTest(test.TestCase): f = f.causes[0] self.assertEqual(0, len(f.causes)) - def test_causes_supress_context(self): + def test_causes_suppress_context(self): f = None try: try: diff --git a/taskflow/tests/unit/test_types.py b/taskflow/tests/unit/test_types.py index 8a9e316..ba9d8fe 100644 --- a/taskflow/tests/unit/test_types.py +++ b/taskflow/tests/unit/test_types.py @@ -151,13 +151,13 @@ b %(edge)s c; self.assertRaises(ValueError, graph.merge_graphs, g, g2) - def occurence_detector(to_graph, from_graph): + def occurrence_detector(to_graph, from_graph): return sum(1 for node in from_graph.nodes_iter() if node in to_graph) self.assertRaises(ValueError, graph.merge_graphs, g, g2, - overlap_detector=occurence_detector) + overlap_detector=occurrence_detector) g3 = graph.merge_graphs(g, g2, allow_overlaps=True) self.assertEqual(3, len(g3)) diff --git a/taskflow/types/failure.py b/taskflow/types/failure.py index ec33dd9..b798a5d 100644 --- a/taskflow/types/failure.py +++ b/taskflow/types/failure.py @@ -324,7 +324,7 @@ class Failure(mixins.StrMixin): """Re-raise exceptions if argument is not empty. If argument is empty list/tuple/iterator, this method returns - None. If argument is coverted into a list with a + None. If argument is converted into a list with a single ``Failure`` object in it, that failure is reraised. Else, a :class:`~taskflow.exceptions.WrappedFailure` exception is raised with the failure list as causes. @@ -378,9 +378,9 @@ class Failure(mixins.StrMixin): # # See: https://www.python.org/dev/peps/pep-0415/ for why/what # the '__suppress_context__' is/means/implies... - supress_context = getattr(exc_val, - '__suppress_context__', False) - if supress_context: + suppress_context = getattr(exc_val, + '__suppress_context__', False) + if suppress_context: attr_lookups = ['__cause__'] else: attr_lookups = ['__cause__', '__context__'] diff --git a/taskflow/types/notifier.py b/taskflow/types/notifier.py index eacdaac..b81d255 100644 --- a/taskflow/types/notifier.py +++ b/taskflow/types/notifier.py @@ -137,7 +137,7 @@ class Notifier(object): into :py:meth:`.register` or :py:meth:`.reset` at the same time could potentially end badly. It is thread-safe when only :py:meth:`.notify` calls or other read-only actions (like calling - into :py:meth:`.is_registered`) are occuring at the same time. + into :py:meth:`.is_registered`) are occurring at the same time. .. _pub/sub: http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern """ @@ -145,7 +145,7 @@ class Notifier(object): #: Keys that can *not* be used in callbacks arguments RESERVED_KEYS = ('details',) - #: Kleene star constant that is used to recieve all notifications + #: Kleene star constant that is used to receive all notifications ANY = '*' #: Events which can *not* be used to trigger notifications diff --git a/taskflow/types/tree.py b/taskflow/types/tree.py index b8df57a..8c0814f 100644 --- a/taskflow/types/tree.py +++ b/taskflow/types/tree.py @@ -205,7 +205,7 @@ class Node(object): def disassociate(self): """Removes this node from its parent (if any). - :returns: occurences of this node that were removed from its parent. + :returns: occurrences of this node that were removed from its parent. """ occurrences = 0 if self.parent is not None: |