-
Notifications
You must be signed in to change notification settings - Fork 71
Patched ruff warnings, applied ruff format, better integrated/configured ruff into the contribution process #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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.
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 formatfix: 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
Checklist