Skip to content

Commit f78442a

Browse files
authored
chore: Use native Ruff Jupyter support (#2383)
* Remove github.com/nbQA-dev/nbQA in favor of native Ruff Jupyter support. * Add support for python, pyi, jupyter types to black-jupyter hook. * Update github.com/astral-sh/ruff-pre-commit: v0.1.4 → v0.1.6.
1 parent 156bd11 commit f78442a

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ repos:
3535
- id: rst-inline-touching-normal
3636

3737
- repo: https://github.com/astral-sh/ruff-pre-commit
38-
rev: "v0.1.4"
38+
rev: "v0.1.6"
3939
hooks:
4040
- id: ruff
4141
args: ["--fix", "--show-fixes"]
@@ -44,6 +44,7 @@ repos:
4444
rev: 23.10.1
4545
hooks:
4646
- id: black-jupyter
47+
types_or: [python, pyi, jupyter]
4748

4849
- repo: https://github.com/adamchainz/blacken-docs
4950
rev: 1.16.0
@@ -66,13 +67,6 @@ repos:
6667
name: mypy with Python 3.11
6768
args: ["--python-version=3.11"]
6869

69-
- repo: https://github.com/nbQA-dev/nbQA
70-
rev: 1.7.0
71-
hooks:
72-
- id: nbqa-ruff
73-
additional_dependencies: [ruff==v0.1.4]
74-
args: ["--extend-ignore=F821,F401,F841,F811"]
75-
7670
- repo: https://github.com/codespell-project/codespell
7771
rev: v2.2.6
7872
hooks:

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,3 +308,4 @@ flake8-tidy-imports.ban-relative-imports = "all"
308308

309309
[tool.ruff.lint.per-file-ignores]
310310
"docs/lite/jupyterlite.py" = ["F401", "F704"]
311+
"**.ipynb" = ["F821", "F401", "F841", "F811", "E703"]

0 commit comments

Comments
 (0)