Add type hints to noauto test suite modules - #1269
Merged
Merged
Conversation
Co-authored-by: bact <128572+bact@users.noreply.github.com>
Co-authored-by: bact <128572+bact@users.noreply.github.com>
|
Copilot
AI
changed the title
[WIP] Add type hints to submodules incrementally
Add type hints to noauto test suite modules
Feb 3, 2026
bact
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 do these changes do
Adds complete type annotations to spell and tag modules tested by the noauto test suite, achieving 100% type hints coverage for these entry points.
What was wrong
Functions and classes in
wanchanberta_thai_grammarly,words_spelling_correction,named_entity, andthai_nnermodules lacked type annotations, preventing static type checking and degrading IDE support for noauto test suite functionality.How this fixes it
Spell modules:
wanchanberta_thai_grammarly.py: TypedBertModelclass methods andevaluate_one_text()helperwords_spelling_correction.py: Typed all 11FastTextEncodermethods with appropriate use ofAnyfor numpy/ONNX typesTag modules:
named_entity.py: TypedNER.tag()andNNER.tag()parameters; improved return type precision todict[str, Any]thai_nner.py: TypedThai_NNERmethods; fixed mutable default argument anti-patternAll type hints maintain Python 3.9 compatibility using native types and
Union[]syntax.Your checklist for this pull request
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.