mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 05:15:12 +00:00

## Summary Ensures that any lint rules that include line locations render them as relative to the cell (and include the cell number) when inside a Jupyter notebook. Closes https://github.com/astral-sh/ruff/issues/6672. ## Test Plan `cargo test`
60 lines
1.1 KiB
Text
60 lines
1.1 KiB
Text
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "33faf7ad-a3fd-4ac4-a0c3-52e507ed49df",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import os\n",
|
|
"import os.path as path"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "481fb4bf-c1b9-47da-927f-3cfdfe4b49ec",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"for os in range(3):\n",
|
|
" pass"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"outputs": [],
|
|
"source": [
|
|
"for path in range(3):\n",
|
|
" pass"
|
|
],
|
|
"metadata": {
|
|
"collapsed": false
|
|
},
|
|
"id": "2f0c65a5-0a0e-4080-afce-5a8ed0d706df"
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python (ruff-playground)",
|
|
"language": "python",
|
|
"name": "ruff-playground"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 3
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython3",
|
|
"version": "3.11.3"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|