From 580b6cd3e104c22065d5d1212ed3c719d45b0242 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 17 Nov 2023 15:22:30 -0500 Subject: [PATCH 1/2] chore: use native Ruff Jupyter support Signed-off-by: Henry Schreiner --- .pre-commit-config.yaml | 11 +++-------- pyproject.toml | 1 + 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 637aa35b22..57b402b6c9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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"] @@ -44,6 +44,8 @@ repos: rev: 23.10.1 hooks: - id: black-jupyter + types_or: [python, pyi, jupyter] + types_or: [python, pyi, jupyter] - repo: https://github.com/adamchainz/blacken-docs rev: 1.16.0 @@ -66,13 +68,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: diff --git a/pyproject.toml b/pyproject.toml index 8161145a15..e2a17df696 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"] From 82138483613ebccf4e4e6dfe57bc9f61607ce68a Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Fri, 17 Nov 2023 14:34:01 -0600 Subject: [PATCH 2/2] fix: Remove duplicated 'types_or' key --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 57b402b6c9..ae20e15066 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -45,7 +45,6 @@ repos: hooks: - id: black-jupyter types_or: [python, pyi, jupyter] - types_or: [python, pyi, jupyter] - repo: https://github.com/adamchainz/blacken-docs rev: 1.16.0