From 535c88a4ce02d7d02d72e68817f0c54e87dab767 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 8 Feb 2023 19:02:29 -0500 Subject: [PATCH 1/2] [DATALAD RUNCMD] Spell "thats" (typo) as "that is" === Do not change lines below === { "chain": [], "cmd": "git-sedi thats 'that is'", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- fire/docstrings_test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fire/docstrings_test.py b/fire/docstrings_test.py index 2328ef16..0d6e5d18 100644 --- a/fire/docstrings_test.py +++ b/fire/docstrings_test.py @@ -50,12 +50,12 @@ def test_one_line_simple_whitespace(self): def test_one_line_too_long(self): # pylint: disable=line-too-long - docstring = """A one line docstring thats both a little too verbose and a little too long so it keeps going well beyond a reasonable length for a one-liner. + docstring = """A one line docstring that is both a little too verbose and a little too long so it keeps going well beyond a reasonable length for a one-liner. """ # pylint: enable=line-too-long docstring_info = docstrings.parse(docstring) expected_docstring_info = DocstringInfo( - summary='A one line docstring thats both a little too verbose and ' + summary='A one line docstring that is both a little too verbose and ' 'a little too long so it keeps going well beyond a reasonable length ' 'for a one-liner.', ) @@ -63,25 +63,25 @@ def test_one_line_too_long(self): def test_one_line_runs_over(self): # pylint: disable=line-too-long - docstring = """A one line docstring thats both a little too verbose and a little too long + docstring = """A one line docstring that is both a little too verbose and a little too long so it runs onto a second line. """ # pylint: enable=line-too-long docstring_info = docstrings.parse(docstring) expected_docstring_info = DocstringInfo( - summary='A one line docstring thats both a little too verbose and ' + summary='A one line docstring that is both a little too verbose and ' 'a little too long so it runs onto a second line.', ) self.assertEqual(expected_docstring_info, docstring_info) def test_one_line_runs_over_whitespace(self): docstring = """ - A one line docstring thats both a little too verbose and a little too long + A one line docstring that is both a little too verbose and a little too long so it runs onto a second line. """ docstring_info = docstrings.parse(docstring) expected_docstring_info = DocstringInfo( - summary='A one line docstring thats both a little too verbose and ' + summary='A one line docstring that is both a little too verbose and ' 'a little too long so it runs onto a second line.', ) self.assertEqual(expected_docstring_info, docstring_info) From 5afa444af0439f817396b75bbf5135a9ebf4befe Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 8 Feb 2023 19:03:55 -0500 Subject: [PATCH 2/2] Run codespell -w with manual tune up for that alph -> alpha --- fire/console/console_attr.py | 6 +++--- fire/console/console_attr_os.py | 2 +- fire/console/console_pager.py | 2 +- fire/parser_test.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fire/console/console_attr.py b/fire/console/console_attr.py index f88d5788..815e16b8 100644 --- a/fire/console/console_attr.py +++ b/fire/console/console_attr.py @@ -268,7 +268,7 @@ def __init__(self, encoding=None, suppress_output=False): # ANSI "standard" attributes. if self.SupportsAnsi(): - # Select Graphic Rendition paramaters from + # Select Graphic Rendition parameters from # http://en.wikipedia.org/wiki/ANSI_escape_code#graphics # Italic '3' would be nice here but its not widely supported. self._csi = '\x1b[' @@ -394,7 +394,7 @@ def GetControlSequenceIndicator(self): """Returns the control sequence indicator string. Returns: - The conrol sequence indicator string or None if control sequences are not + The control sequence indicator string or None if control sequences are not supported. """ return self._csi @@ -408,7 +408,7 @@ def GetControlSequenceLen(self, buf): buf: The string to check for a control sequence. Returns: - The conrol sequence length at the beginning of buf or 0 if buf does not + The control sequence length at the beginning of buf or 0 if buf does not start with a control sequence. """ if not self._csi or not buf.startswith(self._csi): diff --git a/fire/console/console_attr_os.py b/fire/console/console_attr_os.py index 8482c7bc..869c5949 100644 --- a/fire/console/console_attr_os.py +++ b/fire/console/console_attr_os.py @@ -123,7 +123,7 @@ def _GetTermSizeEnvironment(): def _GetTermSizeTput(): - """Returns the terminal x and y dimemsions from tput(1).""" + """Returns the terminal x and y dimensions from tput(1).""" import subprocess # pylint: disable=g-import-not-at-top output = encoding.Decode(subprocess.check_output(['tput', 'cols'], stderr=subprocess.STDOUT)) diff --git a/fire/console/console_pager.py b/fire/console/console_pager.py index 044fcb37..565c7e1e 100644 --- a/fire/console/console_pager.py +++ b/fire/console/console_pager.py @@ -94,7 +94,7 @@ def __init__(self, contents, out=None, prompt=None): Args: contents: The entire contents of the text lines to page. out: The output stream, log.out (effectively) if None. - prompt: The page break prompt, a defalt prompt is used if None.. + prompt: The page break prompt, a default prompt is used if None.. """ self._contents = contents self._out = out or sys.stdout diff --git a/fire/parser_test.py b/fire/parser_test.py index 0257be28..6b6b79b1 100644 --- a/fire/parser_test.py +++ b/fire/parser_test.py @@ -117,8 +117,8 @@ def testDefaultParseValueBareWordsTuple(self): def testDefaultParseValueNestedContainers(self): self.assertEqual( - parser.DefaultParseValue('[(A, 2, "3"), 5, {alph: 10.2, beta: "cat"}]'), - [('A', 2, '3'), 5, {'alph': 10.2, 'beta': 'cat'}]) + parser.DefaultParseValue('[(A, 2, "3"), 5, {alpha: 10.2, beta: "cat"}]'), + [('A', 2, '3'), 5, {'alpha': 10.2, 'beta': 'cat'}]) def testDefaultParseValueComments(self): self.assertEqual(parser.DefaultParseValue('"0#comments"'), '0#comments')