feat (server): added new properties and improved documentation#142
Merged
mdevolde merged 1 commit intojxmorris12:masterfrom Nov 23, 2025
Merged
feat (server): added new properties and improved documentation#142mdevolde merged 1 commit intojxmorris12:masterfrom
mdevolde merged 1 commit intojxmorris12:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the LanguageTool class to improve encapsulation and API consistency by converting public attributes to private ones with property accessors. It also adds new read-only properties for server configuration (url, is_remote, host, port) and enhances documentation throughout. Additionally, _SPELL_CHECKING_CATEGORIES is converted from an instance attribute to a class constant, and the coverage badge URL in README.md is corrected to use an absolute path.
Key Changes
- Added property accessors for previously public attributes (
disabled_rules,enabled_rules,disabled_categories,enabled_categories,enabled_rules_only,preferred_variants,picky,config,language_tool_download_version) - Introduced four new read-only properties (
url,is_remote,host,port) to expose server configuration details - Converted
_spell_checking_categoriesfrom an instance attribute to a class constant_SPELL_CHECKING_CATEGORIES
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| language_tool_python/server.py | Refactored attributes to use private naming with property accessors; added new read-only properties for server configuration; converted spell checking categories to class constant; improved documentation throughout |
| README.md | Fixed coverage badge to use absolute GitHub URL instead of relative path for proper display |
| coverage-badge.svg | Updated coverage percentage from 78.69% to 77.48% |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
feat (server): added new properties and improved documentation
Why the pull request was made
This pull request improves the
LanguageToolclass API by making it more consistent, well-documented, and user-friendly. The changes provide better encapsulation, clearer property access patterns, and comprehensive documentation following established conventions.Summary of changes
README.mdScreenshots (if appropriate):
Not applicable.
How has this been tested?
Applied local tests.
Resources
Not applicable.
Types of changes
Checklist