From 09e4f3584d529aa7046657944fc0c4cbb5d76a12 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Mon, 19 Sep 2022 15:17:35 -0700 Subject: [PATCH] Add NBQA for notebook and docs linting This is now possible after https://github.com/nbQA-dev/nbQA/pull/745 which solved this issue (https://github.com/nbQA-dev/nbQA/issues/668) I opened a year ago. --- .pre-commit-config.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 24816a1fb..51363404f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,3 +25,14 @@ repos: rev: 3.9.2 hooks: - id: flake8 + - repo: https://github.com/nbQA-dev/nbQA + rev: 1.5.0 + hooks: + - id: nbqa-black + additional_dependencies: [jupytext, black] + - id: nbqa-pyupgrade + args: ["--py37-plus"] + additional_dependencies: [jupytext, pyupgrade] + - id: nbqa-isort + args: ["--profile=black"] + additional_dependencies: [jupytext, isort]