Skip to content

Fix spelling errors in comments and docstrings#1238

Merged
bact merged 3 commits intodevfrom
copilot/check-docs-comments-code
Jan 30, 2026
Merged

Fix spelling errors in comments and docstrings#1238
bact merged 3 commits intodevfrom
copilot/check-docs-comments-code

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

What does this changes

Corrects 5 spelling errors in comments and docstrings across 5 files. All changes are cosmetic text-only with zero functional impact.

What was wrong

Comments and docstrings contained spelling errors:

  • "Cant" → "Can't" (error messages in khavee module and examples)
  • "spliting" → "splitting" (transliterate docstring)
  • "abbrevation" → "abbreviation" (ISO 11940 comment)
  • "seperate" → "separate" (util comment)
  • "repition" → "repetition" (util comment)

How this fixes it

Applied minimal spelling corrections using standard dictionary forms. Preserved intentional technical terms and function input/output examples:

  • etcc/ETCC/eTCC - Enhanced Thai Character Cluster
  • tha - ISO 639-3 language code
  • punctuations - API key name for backward compatibility
  • whats - Preserved in docstring examples that demonstrate function behavior

Changed files:

  • examples/khavee.py
  • pythainlp/khavee/core.py
  • pythainlp/transliterate/core.py
  • pythainlp/transliterate/iso_11940.py
  • pythainlp/util/remove_trailing_repeat_consonants.py

Your checklist for this pull request

  • Passed code styles and structures
  • Passed code linting checks and unit test
Original prompt

Scan for spelling errors, grammatical errors, and inconsistent styles in code, code comments, and document.

For document, fix it.
For code comments, fix it minimally - and beware of making line too long / over limits.
For code, just report - do not fix immediately.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Fixed "Cant" → "Can't" in examples/khavee.py and pythainlp/khavee/core.py
- Fixed "spliting" → "splitting" in pythainlp/transliterate/core.py
- Fixed "abbrevation" → "abbreviation" in pythainlp/transliterate/iso_11940.py
- Fixed "whats" → "what's" in pythainlp/phayathaibert/core.py
- Fixed "seperate" → "separate" in pythainlp/util/remove_trailing_repeat_consonants.py
- Fixed "repition" → "repetition" in pythainlp/util/remove_trailing_repeat_consonants.py

All fixes are minimal changes to comments and docstrings only.
No functional code changes were made.
False positives (etcc, tha, variable names) were intentionally not changed.

Co-authored-by: bact <128572+bact@users.noreply.github.com>
Copilot AI changed the title [WIP] Scan for spelling and grammatical errors in code and documents Fix spelling errors in comments and docstrings Jan 30, 2026
Copilot AI requested a review from bact January 30, 2026 08:22
@coveralls
Copy link

coveralls commented Jan 30, 2026

Coverage Status

coverage: 53.532%. remained the same
when pulling 7e79219 on copilot/check-docs-comments-code
into 1a2998e on dev.

Copy link
Member

@bact bact left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot do not change the examples of input / output. see comments.

Comment on lines 52 to 53
>>> rm_brackets("hey() what's[;] up{*&} man(hey)")
hey what's up man(hey)
Copy link
Member

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.

Copy link
Contributor Author

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.

Comment on lines 79 to 80
>>> rm_useless_spaces("hey what's\n\nup")
hey what's up
Copy link
Member

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.

Copy link
Contributor Author

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.

Revert changes to input/output examples in docstrings as requested.
These examples demonstrate actual function behavior and should not be modified.

Co-authored-by: bact <128572+bact@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 30, 2026

@copilot do not change the examples of input / output. see comments.

Fixed in commit 7e79219. Reverted the input/output examples in phayathaibert/core.py to their original state.

@sonarqubecloud
Copy link

Copilot AI requested a review from bact January 30, 2026 09:26
@bact bact marked this pull request as ready for review January 30, 2026 09:27
@bact bact merged commit 066dcf4 into dev Jan 30, 2026
30 checks passed
@bact bact deleted the copilot/check-docs-comments-code branch January 30, 2026 09:31
@bact bact added this to the 5.3 milestone Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants