-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
cell
field to JSON output format
- Loading branch information
1 parent
88bca6c
commit e057a7b
Showing
9 changed files
with
254 additions
and
19 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
105 changes: 105 additions & 0 deletions
105
...ruff_linter/src/message/snapshots/ruff_linter__message__json__tests__notebook_output.snap
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,105 @@ | ||
--- | ||
source: crates/ruff_linter/src/message/json.rs | ||
expression: content | ||
--- | ||
[ | ||
{ | ||
"cell": 1, | ||
"code": "F401", | ||
"end_location": { | ||
"column": 10, | ||
"row": 2 | ||
}, | ||
"filename": "notebook.ipynb", | ||
"fix": { | ||
"applicability": "safe", | ||
"edits": [ | ||
{ | ||
"content": "", | ||
"end_location": { | ||
"column": 10, | ||
"row": 2 | ||
}, | ||
"location": { | ||
"column": 1, | ||
"row": 2 | ||
} | ||
} | ||
], | ||
"message": "Remove unused import: `os`" | ||
}, | ||
"location": { | ||
"column": 8, | ||
"row": 2 | ||
}, | ||
"message": "`os` imported but unused", | ||
"noqa_row": 2, | ||
"url": "https://docs.astral.sh/ruff/rules/unused-import" | ||
}, | ||
{ | ||
"cell": 2, | ||
"code": "F401", | ||
"end_location": { | ||
"column": 12, | ||
"row": 2 | ||
}, | ||
"filename": "notebook.ipynb", | ||
"fix": { | ||
"applicability": "safe", | ||
"edits": [ | ||
{ | ||
"content": "", | ||
"end_location": { | ||
"column": 1, | ||
"row": 3 | ||
}, | ||
"location": { | ||
"column": 1, | ||
"row": 2 | ||
} | ||
} | ||
], | ||
"message": "Remove unused import: `math`" | ||
}, | ||
"location": { | ||
"column": 8, | ||
"row": 2 | ||
}, | ||
"message": "`math` imported but unused", | ||
"noqa_row": 2, | ||
"url": "https://docs.astral.sh/ruff/rules/unused-import" | ||
}, | ||
{ | ||
"cell": 3, | ||
"code": "F841", | ||
"end_location": { | ||
"column": 6, | ||
"row": 4 | ||
}, | ||
"filename": "notebook.ipynb", | ||
"fix": { | ||
"applicability": "unsafe", | ||
"edits": [ | ||
{ | ||
"content": "", | ||
"end_location": { | ||
"column": 10, | ||
"row": 4 | ||
}, | ||
"location": { | ||
"column": 1, | ||
"row": 4 | ||
} | ||
} | ||
], | ||
"message": "Remove assignment to unused variable `x`" | ||
}, | ||
"location": { | ||
"column": 5, | ||
"row": 4 | ||
}, | ||
"message": "Local variable `x` is assigned to but never used", | ||
"noqa_row": 4, | ||
"url": "https://docs.astral.sh/ruff/rules/unused-variable" | ||
} | ||
] |
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
8 changes: 8 additions & 0 deletions
8
...inter/src/message/snapshots/ruff_linter__message__json_lines__tests__notebook_output.snap
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,8 @@ | ||
--- | ||
source: crates/ruff_linter/src/message/json_lines.rs | ||
expression: content | ||
--- | ||
{"cell":1,"code":"F401","end_location":{"column":10,"row":2},"filename":"notebook.ipynb","fix":{"applicability":"safe","edits":[{"content":"","end_location":{"column":10,"row":2},"location":{"column":1,"row":2}}],"message":"Remove unused import: `os`"},"location":{"column":8,"row":2},"message":"`os` imported but unused","noqa_row":2,"url":"https://docs.astral.sh/ruff/rules/unused-import"} | ||
{"cell":2,"code":"F401","end_location":{"column":12,"row":2},"filename":"notebook.ipynb","fix":{"applicability":"safe","edits":[{"content":"","end_location":{"column":1,"row":3},"location":{"column":1,"row":2}}],"message":"Remove unused import: `math`"},"location":{"column":8,"row":2},"message":"`math` imported but unused","noqa_row":2,"url":"https://docs.astral.sh/ruff/rules/unused-import"} | ||
{"cell":3,"code":"F841","end_location":{"column":6,"row":4},"filename":"notebook.ipynb","fix":{"applicability":"unsafe","edits":[{"content":"","end_location":{"column":10,"row":4},"location":{"column":1,"row":4}}],"message":"Remove assignment to unused variable `x`"},"location":{"column":5,"row":4},"message":"Local variable `x` is assigned to but never used","noqa_row":4,"url":"https://docs.astral.sh/ruff/rules/unused-variable"} | ||
|
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
Oops, something went wrong.