Skip to content

Conversation

@mdevolde
Copy link
Collaborator

fix: from camel case to snake case for some params and attribs (breaking)

Why the pull request was made

To comply with Python best practices, and take advantage of the upcoming version change with other breaking changes to do so.

Summary of changes

Screenshots (if appropriate):

Not applicable

How has this been tested?

Applied local tests.

Resources

Not applicable.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (changes to documentation only)
  • Refactor / code style update (non-breaking change that improves code structure or readability)
  • Tests / CI improvement (adding or updating tests or CI configuration only)
  • Other (please describe):

Checklist

  • Followed the project's contributing guidelines.
  • Updated any relevant tests.
  • Updated any relevant documentation.
  • Added comments to your code where necessary.
  • Formatted your code, run the linters, checked types and tests.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the codebase to follow Python naming conventions by converting camelCase parameter and attribute names to snake_case. This is a breaking change that aligns with PEP 8 standards.

Key changes:

  • Renamed attributes: ruleIdrule_id, errorLengtherror_length, offsetInContextoffset_in_context, ruleIssueTyperule_issue_type, matchedTextmatched_text
  • Renamed parameters: motherTonguemother_tongue, newSpellingsnew_spellings
  • Refactored code: replaced list creation + shuffle with random.sample(), and simplified set creation with set comprehension

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_major_functionality.py Updated test assertions and expected values to use snake_case attribute names
language_tool_python/utils.py Updated Match attribute references from camelCase to snake_case
language_tool_python/server.py Renamed parameters, properties, and internal references from camelCase to snake_case; refactored port selection and set creation
language_tool_python/match.py Updated Match class attributes, properties, and methods to use snake_case naming
language_tool_python/main.py Updated parameter and attribute references to snake_case
README.md Updated documentation examples to reflect snake_case attribute names
MANIFEST.in Added exclusion for .readthedocs.yaml file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mdevolde mdevolde merged commit 2e77067 into jxmorris12:master Nov 18, 2025
14 checks passed
@mdevolde mdevolde deleted the snake_case branch November 18, 2025 13:10
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.

1 participant