Skip to content

Commit

Permalink
fix: ruff range end is exclusive. (#1101)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan-turbofish authored Aug 27, 2024
1 parent 7a76586 commit 62e60f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/features/formatters/ruff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class RuffFormatter extends BaseFormatter {
): Thenable<TextEdit[]> {
const ruffArgs = ['format', '--diff', '--silent'];
if (range) {
ruffArgs.push(`--range=${range.start.line + 1}-${range.end.line}`);
ruffArgs.push(`--range=${range.start.line + 1}-${range.end.line + 1}`);
}
if (this.pythonSettings.formatting.ruffArgs.length > 0) {
ruffArgs.push(...this.pythonSettings.formatting.ruffArgs);
Expand Down

0 comments on commit 62e60f0

Please sign in to comment.