Skip to content

Commit 5213b93

Browse files
committed
Lint and make sure we install pre-commit
1 parent 6abb935 commit 5213b93

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@
4242
// Mount the parent as /workspaces so we can pip install peers as editable
4343
"workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind",
4444
// After the container is created, install the python project in editable form
45-
"postCreateCommand": "pip install $([ -f dev-requirements.txt ] && echo '-c dev-requirements.txt') -e '.[dev]'"
45+
"postCreateCommand": "pip install $([ -f dev-requirements.txt ] && echo '-c dev-requirements.txt') -e '.[dev]' && pre-commit install"
4646
}

tests/test_example.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,23 @@ def make_venv(project_path: Path) -> callable:
4040
venv_path = project_path / "venv"
4141
run_pipe(f"python -m venv {venv_path}")
4242
run = functools.partial(run_pipe, cwd=str(project_path))
43-
run(f"./venv/bin/pip install -e .[dev]")
43+
run("./venv/bin/pip install -e .[dev]")
4444
return run
4545

4646

4747
def test_template(tmp_path: Path):
4848
copy_project(tmp_path)
4949
run = make_venv(tmp_path)
50-
run(f"./venv/bin/tox -p")
51-
run(f"./venv/bin/pip install build twine")
52-
run(f"./venv/bin/python -m build")
53-
run(f"./venv/bin/twine check --strict dist/*")
50+
run("./venv/bin/tox -p")
51+
run("./venv/bin/pip install build twine")
52+
run("./venv/bin/python -m build")
53+
run("./venv/bin/twine check --strict dist/*")
5454

5555

5656
def test_template_no_docs(tmp_path: Path):
5757
copy_project(tmp_path, docs_type="README")
5858
run = make_venv(tmp_path)
59-
run(f"./venv/bin/tox -p")
60-
59+
run("./venv/bin/tox -p")
6160

6261

6362
def test_bad_repo_name(tmp_path: Path):

0 commit comments

Comments
 (0)