Skip to content

Commit

Permalink
Keep formatting Jupyter notebooks with black-jupyter
Browse files Browse the repository at this point in the history
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
  • Loading branch information
hakonanes committed Jan 1, 2025
1 parent b0c5536 commit 0f7020e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
22 changes: 6 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,19 @@
## You should have received a copy of the GNU General Public License
## along with kikuchipy. If not, see <http://www.gnu.org/licenses/>.##
repos:
# # https://docs.astral.sh/ruff/configuration
# - repo: https://github.com/astral-sh/ruff-pre-commit
# rev: v0.6.8
# hooks:
# - id: ruff
# args: [ --fix ]
# - id: ruff-format
# https://docs.astral.sh/ruff/configuration
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
hooks:
- id: ruff
- id: ruff-format
# https://black.readthedocs.io/en/stable/index.html
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
- id: black
- id: black-jupyter
files: \.ipynb
args: [--line-length=77]
# https://pycqa.github.io/isort/
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args:
[--profile=black, --filter-files, --force-sort-within-sections]
- repo: https://github.com/johann-petrak/licenseheaders.git
rev: 'v0.8.8'
hooks:
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,6 @@ select = [
# isort
"I"
]
extend-ignore = ["E501"]

[tool.ruff.format]
exclude = ["*.ipynb"]

0 comments on commit 0f7020e

Please sign in to comment.