Skip to content

Conversation

@caspervonb
Copy link
Collaborator

@caspervonb caspervonb commented Oct 5, 2025

No description provided.

@caspervonb caspervonb requested a review from Copilot October 5, 2025 09:03
Copy link

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

@caspervonb caspervonb marked this pull request as ready for review October 5, 2025 12:34
@caspervonb caspervonb force-pushed the switch-to-ruff-for-formatting branch 3 times, most recently from 72af19a to 766a012 Compare October 8, 2025 19:41
@caspervonb caspervonb changed the base branch from switch-to-ruff-for-formatting to main October 8, 2025 19:52
@caspervonb caspervonb force-pushed the use-ruff-for-linting branch from 43bcd3b to 31f4436 Compare October 8, 2025 19:57
@caspervonb caspervonb requested a review from Copilot October 8, 2025 19:58
Copy link

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

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.

Comment on lines +42 to +32
"nats/examples/*" = ["E722", "F821", "F841", "I001", "W291"]
"nats/benchmark/*" = ["E722", "F403", "F405"]
"nats/tests/*" = ["F403", "F405", "F841", "E711", "E402", "I001", "E722", "F601", "E712", "F401"]
Copy link

Copilot AI Oct 8, 2025

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.

Copilot uses AI. Check for mistakes.
@caspervonb caspervonb force-pushed the use-ruff-for-linting branch from 31f4436 to 1884e7d Compare October 8, 2025 20:01
Signed-off-by: Casper Beyer <[email protected]>
@caspervonb caspervonb force-pushed the use-ruff-for-linting branch from 1884e7d to 7c40b66 Compare October 8, 2025 20:05
@caspervonb caspervonb merged commit 1d38f9b into main Oct 8, 2025
58 checks passed
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.

2 participants