Fix minor typos in docstrings (#4085)
This commit is contained in:
parent
a0e270d0f2
commit
66ec056e39
@ -14,7 +14,7 @@ def format_hex(text: str) -> str:
|
|||||||
|
|
||||||
|
|
||||||
def format_scientific_notation(text: str) -> str:
|
def format_scientific_notation(text: str) -> str:
|
||||||
"""Formats a numeric string utilizing scentific notation"""
|
"""Formats a numeric string utilizing scientific notation"""
|
||||||
before, after = text.split("e")
|
before, after = text.split("e")
|
||||||
sign = ""
|
sign = ""
|
||||||
if after.startswith("-"):
|
if after.startswith("-"):
|
||||||
|
@ -172,7 +172,7 @@ class _TopLevelStatementsVisitor(Visitor[None]):
|
|||||||
A node visitor that converts unchanged top-level statements to
|
A node visitor that converts unchanged top-level statements to
|
||||||
STANDALONE_COMMENT.
|
STANDALONE_COMMENT.
|
||||||
|
|
||||||
This is used in addition to _convert_unchanged_lines_by_flatterning, to
|
This is used in addition to _convert_unchanged_line_by_line, to
|
||||||
speed up formatting when there are unchanged top-level
|
speed up formatting when there are unchanged top-level
|
||||||
classes/functions/statements.
|
classes/functions/statements.
|
||||||
"""
|
"""
|
||||||
@ -302,7 +302,7 @@ def _convert_node_to_standalone_comment(node: LN) -> None:
|
|||||||
index = node.remove()
|
index = node.remove()
|
||||||
if index is not None:
|
if index is not None:
|
||||||
# Remove the '\n', as STANDALONE_COMMENT will have '\n' appended when
|
# Remove the '\n', as STANDALONE_COMMENT will have '\n' appended when
|
||||||
# genearting the formatted code.
|
# generating the formatted code.
|
||||||
value = str(node)[:-1]
|
value = str(node)[:-1]
|
||||||
parent.insert_child(
|
parent.insert_child(
|
||||||
index,
|
index,
|
||||||
|
Loading…
Reference in New Issue
Block a user