Skip to content

Commit

Permalink
chore: Use native Ruff Jupyter support (#2383)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
henryiii authored Nov 17, 2023
1 parent 156bd11 commit f78442a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ repos:
- id: rst-inline-touching-normal

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.4"
rev: "v0.1.6"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand All @@ -44,6 +44,7 @@ repos:
rev: 23.10.1
hooks:
- id: black-jupyter
types_or: [python, pyi, jupyter]

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

- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
hooks:
- id: nbqa-ruff
additional_dependencies: [ruff==v0.1.4]
args: ["--extend-ignore=F821,F401,F841,F811"]

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -308,3 +308,4 @@ flake8-tidy-imports.ban-relative-imports = "all"

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

0 comments on commit f78442a

Please sign in to comment.