-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ruff `0.5.0` deprecated running on files without the `check` subcommand. Fix our `ruff-nbqa` definition to support this and forward args correctly. Fixes failures in [run](https://github.com/trunk-io/plugins/actions/runs/9709549433/job/26798463120)
- Loading branch information
1 parent
e8b2864
commit 70f8284
Showing
5 changed files
with
53 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
linters/ruff/test_data/ruff_nbqa_v0.5.0_basic_nb.check.shot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Testing linter ruff-nbqa test basic_nb 1`] = ` | ||
{ | ||
"issues": [ | ||
{ | ||
"code": "error", | ||
"file": "test_data/basic_nb.in.ipynb", | ||
"issueClass": "ISSUE_CLASS_EXISTING", | ||
"level": "LEVEL_HIGH", | ||
"linter": "ruff-nbqa", | ||
"message": "/tmp/plugins_/test_data/basic_nb.in.ipynb:cell_1:1:8: F401 [*] \`os\` imported but unused | ||
| | ||
1 | # %%NBQA-CELL-SEP | ||
2 | import os | ||
| ^^ F401 | ||
3 | | ||
4 | print("Hello World!") | ||
| | ||
= help: Remove unused import: \`os\`", | ||
"targetType": "jupyter", | ||
}, | ||
], | ||
"lintActions": [ | ||
{ | ||
"command": "lint", | ||
"fileGroupName": "jupyter", | ||
"linter": "ruff-nbqa", | ||
"paths": [ | ||
"test_data/basic_nb.in.ipynb", | ||
], | ||
"verb": "TRUNK_VERB_CHECK", | ||
}, | ||
{ | ||
"command": "lint", | ||
"fileGroupName": "jupyter", | ||
"linter": "ruff-nbqa", | ||
"paths": [ | ||
"test_data/basic_nb.in.ipynb", | ||
], | ||
"upstream": true, | ||
"verb": "TRUNK_VERB_CHECK", | ||
}, | ||
], | ||
"taskFailures": [], | ||
"unformattedFiles": [], | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters