-
Notifications
You must be signed in to change notification settings - Fork 232
Use ruff for linting #742
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
Use ruff for linting #742
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 introduces ruff as the linting tool for the project by configuring per-file ignores for various code quality issues and reorganizing import statements to comply with ruff's import sorting rules.
- Adds ruff linting configuration with per-file ignores for examples, benchmarks, tests, and specific modules
- Reorganizes import statements to follow proper import sorting order (standard library, third-party, local imports)
- Removes unnecessary f-string formatting where simple strings suffice
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Adds ruff per-file ignore configurations for different directories and files |
| .github/workflows/check.yml | Adds new lint job and updates format check to target nats/ directory |
| nats/tests/*.py | Reorganizes imports and removes unnecessary f-string usage |
| nats/examples/*.py | Reorganizes imports to follow proper sorting order |
| nats-client/tests/*.py | Adds blank lines after imports for better formatting |
| nats-client/src/nats/client/*.py | Consolidates imports and removes unused imports |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
72af19a to
766a012
Compare
43bcd3b to
31f4436
Compare
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
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| "nats/examples/*" = ["E722", "F821", "F841", "I001", "W291"] | ||
| "nats/benchmark/*" = ["E722", "F403", "F405"] | ||
| "nats/tests/*" = ["F403", "F405", "F841", "E711", "E402", "I001", "E722", "F601", "E712", "F401"] |
Copilot
AI
Oct 8, 2025
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.
[nitpick] The per-file ignores contain many lint violations (E722, F403, F405, F841, etc.) that should ideally be fixed rather than ignored. Consider creating a plan to gradually address these violations to improve code quality.
31f4436 to
1884e7d
Compare
Signed-off-by: Casper Beyer <[email protected]>
1884e7d to
7c40b66
Compare
No description provided.