From 32471ba77b81661bdae8347c6c263de90eb34391 Mon Sep 17 00:00:00 2001 From: user202729 <25191436+user202729@users.noreply.github.com> Date: Thu, 20 May 2021 22:34:06 +0700 Subject: [PATCH] Fix several mistakes in docstring --- plover/formatting.py | 6 +++--- plover/machine/base.py | 4 ++-- plover/translation.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plover/formatting.py b/plover/formatting.py index 84b3453fb..c75dd5154 100644 --- a/plover/formatting.py +++ b/plover/formatting.py @@ -731,7 +731,7 @@ def _translation_to_actions(translation, ctx): translation -- A string with the translation to render. - last_action -- The action in whose context this translation is formatted. + ctx -- The context in which this translation is formatted. Returns: A list of actions. @@ -765,7 +765,7 @@ def _raw_to_actions(stroke, ctx): stroke -- A string representation of the stroke. - last_action -- The context in which the new actions are created + ctx -- The context in which the new actions are created. Returns: A list of actions. @@ -804,7 +804,7 @@ def _atom_to_action(atom, ctx): either entirely a single meta command or entirely text containing no meta commands. - last_action -- The context in which the new action takes place. + ctx -- The context in which the new action takes place. Returns: An action for the atom. diff --git a/plover/machine/base.py b/plover/machine/base.py index 4f52445ae..a05ae1def 100644 --- a/plover/machine/base.py +++ b/plover/machine/base.py @@ -194,8 +194,8 @@ class SerialStenotypeBase(ThreadedStenotypeBase): def __init__(self, serial_params): """Monitor the stenotype over a serial port. - Keyword arguments are the same as the keyword arguments for a - serial.Serial object. + The key-value pairs in the dict are the same + as the keyword arguments for a serial.Serial object. """ ThreadedStenotypeBase.__init__(self) diff --git a/plover/translation.py b/plover/translation.py index 3643939e1..2cec6ec3f 100644 --- a/plover/translation.py +++ b/plover/translation.py @@ -287,7 +287,7 @@ def set_state(self, state): self._state = state def clear_state(self): - """Reset the sate of the translator.""" + """Reset the state of the translator.""" self._state = _State() def translate_stroke(self, stroke):