Skip to content

Commit

Permalink
upgrade nbqa, add config options for black (#4135)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli authored Sep 26, 2020
1 parent a29da31 commit ce152fa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
4 changes: 0 additions & 4 deletions .nbqa.ini

This file was deleted.

3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ repos:
rev: v3.2.0
hooks:
- id: end-of-file-fixer
- id: check-toml
- repo: https://github.com/nbQA-dev/nbQA
rev: 0.1.29
rev: 0.2.0
hooks:
- id: nbqa
args: ['isort']
Expand Down
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
[tool.black]
line-length = 100

[tool.nbqa.config]
isort = "setup.cfg"
black = "pyproject.toml"

[tool.nbqa.mutate]
isort = 1
black = 1

[tool.nbqa.addopts]
isort = ["--treat-comment-as-code", "# %%"]

[tool.nbqa.ignore_cells]
black = "%%cython"

0 comments on commit ce152fa

Please sign in to comment.