Skip to content

Conversation

@mdevolde
Copy link
Collaborator

@mdevolde mdevolde commented Nov 9, 2025

Patched ruff warnings, applied ruff format, better integrated/configured ruff into the project

Why the pull request was made

Application of ruff to the project as a linter and formatter (i.e. application of its warnings and format), so that its application in future pull requests only reveals newly generated code faults. And better ruff configuration to make it more strict.

Summary of changes

feat: configured ruff in pyproject.toml
fix: edited formatter from black to ruff in CONTRIBUTING.md
refactor: applied ruff format
fix: fixed all warnings from applied ruff rules

Screenshots (if appropriate):

Not applicable.

How has this been tested?

Ran pytest to verify that everything is working correctly.

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): patched ruff warnings

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 and tests.

@mdevolde mdevolde requested a review from Copilot November 9, 2025 00:55
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 implements code formatting and linting standardization using ruff, replacing the previous black formatter. The changes convert all string literals to use double quotes, reorganize imports alphabetically, apply consistent code formatting, and add ruff linting rules to the project configuration.

Key changes:

  • Add ruff linting configuration to pyproject.toml with selected rule sets (F, W, I, B, SIM, RET, Q)
  • Standardize all string literals from single quotes to double quotes throughout the codebase
  • Reorganize imports alphabetically and add explicit all export list to init.py

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pyproject.toml Adds ruff linting configuration with selected rule sets
tests/test_major_functionality.py Converts quotes to double quotes and reformats test data structures
language_tool_python/utils.py Reorganizes imports, converts quotes, and applies contextlib.suppress pattern
language_tool_python/server.py Reorganizes imports, converts quotes, and adds explicit exception chaining
language_tool_python/match.py Reorganizes imports, converts quotes, and simplifies conditional logic
language_tool_python/language_tag.py Reorganizes imports, converts quotes, and adds exception chaining
language_tool_python/download_lt.py Reorganizes imports, converts quotes, and refactors file handling
language_tool_python/config_file.py Reorganizes imports, converts quotes, and refactors tempfile usage
language_tool_python/main.py Reorganizes imports, converts quotes, and reformats argument parser
language_tool_python/init.py Adds all export list and reorganizes imports
extract_long_description.py Reorganizes imports and converts quotes
CONTRIBUTING.md Updates documentation to use ruff format instead of black

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

@mdevolde mdevolde merged commit 5eac429 into jxmorris12:master Nov 9, 2025
3 checks passed
@mdevolde mdevolde deleted the ruff branch November 9, 2025 01:11
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