Skip to content

Commit

Permalink
Align doc and test
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Jan 20, 2021
1 parent caedd61 commit 07b323b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/using-pre-commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ repos:
rev: #CURRENT_TAG/COMMIT_HASH
hooks:
- id: jupytext
args: [--from, ipynb, --to, py:light, --to, markdown]
args: [--from, ipynb, --to, "py:percent"]
```
If you are combining Jupytext with other pre-commit hooks, you must ensure that all hooks will pass on any files you generate. For example, if you have a hook for using `black` to format all your python code, then you should use Jupytext's `--pipe` option to also format newly generated Python scripts before writing them:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_pre_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def test_pre_commit_hook_for_existing_changed_file(tmpdir):
rev: {repo_rev}
hooks:
- id: jupytext
args: [--from, ipynb, --to, "py:light"]
args: [--from, ipynb, --to, "py:percent"]
"""
)
tmpdir.join(".pre-commit-config.yaml").write(pre_commit_config_yaml)
Expand All @@ -547,7 +547,7 @@ def test_pre_commit_hook_for_existing_changed_file(tmpdir):
nb_file = str(tmpdir.join("test.ipynb"))
write(nb, nb_file)
py_file = str(tmpdir.join("test.py"))
jupytext(["--from", "ipynb", "--to", "py:light", str(nb_file)])
jupytext(["--from", "ipynb", "--to", "py:percent", str(nb_file)])

git("add", ".")
git("commit", "-m", "test")
Expand Down

0 comments on commit 07b323b

Please sign in to comment.