Skip to content

Commit

Permalink
Update the hooks used in the documentation and tests (#943)
Browse files Browse the repository at this point in the history
* Update the hooks used in the documentation and tests
  • Loading branch information
mwouts authored Apr 2, 2022
1 parent 7627198 commit 3ad96e2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ repos:
args: ["--profile", "black"]

- repo: https://github.com/psf/black
rev: 22.1.0
rev: 22.3.0
hooks:
- id: black

- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
rev: v2.31.1
hooks:
- id: pyupgrade
args: ["--py3-plus", "--py36-plus"]
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Jupytext ChangeLog
**Changed**
- The Jupytext contents manager is derived from the `LargeFileManager` imported from `jupyter_server` rathen than `notebook` ([#933](https://github.com/mwouts/jupytext/issues/933))
- Allow for markdown-it-py v2 ([#924](https://github.com/mwouts/jupytext/issues/924))
- We have updated the hooks used in the test pre-commits, to fix an issue on the CI ([#940](https://github.com/mwouts/jupytext/issues/940), [#942](https://github.com/mwouts/jupytext/issues/942))


1.13.7 (2022-02-09)
Expand Down
10 changes: 5 additions & 5 deletions docs/using-pre-commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Jupytext works well with the [pre-commit](https://pre-commit.com/) framework. Yo
```yaml
repos:
- repo: https://github.com/mwouts/jupytext
rev: v1.10.0 # CURRENT_TAG/COMMIT_HASH
rev: v1.13.7 # CURRENT_TAG/COMMIT_HASH
hooks:
- id: jupytext
args: [--sync]
Expand All @@ -16,7 +16,7 @@ You can provide almost all command line arguments to Jupytext in pre-commit, for
```yaml
repos:
- repo: https://github.com/mwouts/jupytext
rev: v1.11.0 # CURRENT_TAG/COMMIT_HASH
rev: v1.13.7 # CURRENT_TAG/COMMIT_HASH
hooks:
- id: jupytext
args: [--from, ipynb, --to, "py:percent"]
Expand All @@ -27,15 +27,15 @@ If you are combining Jupytext with other pre-commit hooks, you must ensure that
```yaml
repos:
- repo: https://github.com/mwouts/jupytext
rev: v1.11.0 # CURRENT_TAG/COMMIT_HASH
rev: v1.13.7 # CURRENT_TAG/COMMIT_HASH
hooks:
- id: jupytext
args: [--sync, --pipe, black]
additional_dependencies:
- black==20.8b1 # Matches hook
- black==22.3.0 # Matches hook
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 22.3.0
hooks:
- id: black
language_version: python3
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pre_commit_2_sync_nbstripout.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_pre_commit_hook_sync_nbstripout(
args: [--sync]
- repo: https://github.com/kynan/nbstripout
rev: 0.3.9
rev: 0.5.0
hooks:
- id: nbstripout
"""
Expand Down
6 changes: 3 additions & 3 deletions tests/test_pre_commit_3_sync_black_nbstripout.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ def test_pre_commit_hook_sync_black_nbstripout(
- id: jupytext
args: [--sync, --pipe, black]
additional_dependencies:
- black==20.8b1 # Matches hook
- black==22.3.0 # Matches hook
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/kynan/nbstripout
rev: 0.3.9
rev: 0.5.0
hooks:
- id: nbstripout
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_pre_commit_5_reformat_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ def test_pre_commit_hook_sync_reformat_code_and_markdown(
- id: jupytext
args: [--sync, --pipe, black, --show-changes]
additional_dependencies:
- black==20.8b1 # Matches black hook below
- black==22.3.0 # Matches black hook below
- nbformat==5.0.8 # for compatibility with the pandoc hook above
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 22.3.0
hooks:
- id: black
"""
Expand Down

0 comments on commit 3ad96e2

Please sign in to comment.