Skip to content

Commit 552ae14

Browse files
committed
Do not auto-format include generated notebooks
1 parent b1bbd39 commit 552ae14

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,15 @@ ignore = [
149149
]
150150

151151
[tool.ruff.lint.extend-per-file-ignores]
152-
"tests/*/*ipynb" = ["E402"] #
152+
"tests/*/*ipynb" = ["E402"] # module-import-not-at-top-of-file
153153

154154
[tool.ruff.lint.isort]
155155
force-sort-within-sections = true
156156

157+
[tool.ruff.format]
158+
# These are reference outputs and reformatting them makes a mess
159+
exclude = ["tests/test_codecell_file/*ipynb"]
160+
157161
[tool.pytest.ini_options]
158162
filterwarnings = [
159163
'error',

tests/test_codecell_file/test_codecell_file.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"source": [
2020
"# flake8: noqa\n",
2121
"\n",
22-
"import numpy as np"
22+
"import numpy as np\n"
2323
]
2424
}
2525
],

tests/test_codecell_file/test_codecell_file_warnings.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"source": [
2020
"# flake8: noqa\n",
2121
"\n",
22-
"import numpy as np"
22+
"import numpy as np\n"
2323
]
2424
}
2525
],

0 commit comments

Comments
 (0)