File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
tests/external/pre_commit Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -42,9 +42,9 @@ def test_pre_commit_hook_sync_reformat_code_and_markdown(
4242 jupytext_pre_commit_config ["repos" ][0 ]["hooks" ][0 ]["additional_dependencies" ] = [
4343 "nbconvert==5.0.8"
4444 ]
45- jupytext_pre_commit_config ["repos" ][0 ]["hooks" ][ 1 ] = jupytext_pre_commit_config [
46- "repos"
47- ][ 0 ][ "hooks" ][ 0 ]
45+ jupytext_pre_commit_config ["repos" ][0 ]["hooks" ]. append (
46+ jupytext_pre_commit_config [ "repos" ][ 0 ][ "hooks" ][ 0 ]
47+ )
4848 jupytext_pre_commit_config ["repos" ][0 ]["hooks" ][1 ]["args" ] = [
4949 "--sync" ,
5050 "--pipe" ,
@@ -58,11 +58,13 @@ def test_pre_commit_hook_sync_reformat_code_and_markdown(
5858 # Use python as language as we will need to install additional dependencies
5959 jupytext_pre_commit_config ["repos" ][0 ]["hooks" ][0 ]["language" ] = "python"
6060 jupytext_pre_commit_config ["repos" ][0 ]["hooks" ][1 ]["language" ] = "python"
61- jupytext_pre_commit_config ["repos" ][1 ] = {
62- "repo" : "https://github.com/psf/black" ,
63- "rev" : "22.3.0" ,
64- "hooks" : [{"id" : "black" }],
65- }
61+ jupytext_pre_commit_config ["repos" ].append (
62+ {
63+ "repo" : "https://github.com/psf/black" ,
64+ "rev" : "22.3.0" ,
65+ "hooks" : [{"id" : "black" }],
66+ }
67+ )
6668
6769 with open (os .path .join (tmpdir , ".pre-commit-config.yaml" ), "w" ) as file :
6870 yaml .dump (jupytext_pre_commit_config , file )
You can’t perform that action at this time.
0 commit comments