Update code comments and clean up codes #845
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this changes
This PR updates all comments in the codebase to fix problems such as grammatical errors, inconsistent capitalizations, and typos.
Note that I'm not a native English speaker, but I'm trying my best to guess what the comment author was trying to convey. As a large number of source files are affected in this PR, I invite the maintainers to review carefully the changes to make sure that I do not accidentally alter the intended meaning while fixing the abovementioned problems in the comments.
This PR also does some general code cleanups, including removing unused imports/variables and trailing whitespace, sorting imports, simplifying unnecessarily complicated expressions, replace deprecated aliases in
unittest
, and many others.This is also a good opportunity to remove commented out codes (especially in the test suite) as it is clearly stated in the contributing guides that commented out codes are dead codes. But since I do not know which ones should be kept and which ones should be removed, this PR does not touch on them.
What was wrong
There are many grammatical errors, inconsistent capitalizations, and typos in code comments.
How this fixes it
This PR checks all comments in the codebase and fixes any problems found.
Part of fix for #840.
Your checklist for this pull request
馃毃Please review the guidelines for contributing to this repository.