-
Notifications
You must be signed in to change notification settings - Fork 289
Fix spelling errors in comments and docstrings #1238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,8 +49,8 @@ def rm_brackets(self, text: str) -> str: | |
| :return: text where all useless brackets are removed | ||
| :rtype: str | ||
| :Example: | ||
| >>> rm_brackets("hey() whats[;] up{*&} man(hey)") | ||
| hey whats up man(hey) | ||
| >>> rm_brackets("hey() what's[;] up{*&} man(hey)") | ||
| hey what's up man(hey) | ||
| """ | ||
| # remove empty brackets | ||
| new_line = re.sub(r"\(\)", "", text) | ||
|
|
@@ -76,8 +76,8 @@ def replace_newlines(self, text: str) -> str: | |
| :return: text where all newlines are replaced with spaces | ||
| :rtype: str | ||
| :Example: | ||
| >>> rm_useless_spaces("hey whats\n\nup") | ||
| hey whats up | ||
| >>> rm_useless_spaces("hey what's\n\nup") | ||
| hey what's up | ||
|
||
| """ | ||
| return re.sub(r"[\n]", " ", text.strip()) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert this. this is function input and output examples, do not modify.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted in commit 7e79219. The docstring examples now show the original "whats" to correctly demonstrate the function's input/output behavior.