Skip to content

Commit 0805d05

Browse files
Fix messages
1 parent 2fa84e7 commit 0805d05

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/usethis/_integrations/pre_commit/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def install_pre_commit_hooks() -> None:
2424
in a git repo.
2525
"""
2626
if usethis_config.frozen:
27-
box_print("Run 'pre-commit install' to register pre-commit with git.")
27+
box_print("Run 'pre-commit install' to register pre-commit.")
2828
return
2929

3030
tick_print("Ensuring pre-commit is installed to Git.")
@@ -51,7 +51,7 @@ def uninstall_pre_commit_hooks() -> None:
5151
"""
5252
if usethis_config.frozen:
5353
box_print(
54-
"Run 'uv run --with pre-commit pre-commit uninstall' to deregister pre-commit with git."
54+
"Run 'uv run --with pre-commit pre-commit uninstall' to deregister pre-commit."
5555
)
5656
return
5757

tests/usethis/_core/test_tool.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def test_pre_commit_after(
389389
"☐ Install the dependency 'pre-commit'.\n"
390390
"✔ Writing '.pre-commit-config.yaml'.\n"
391391
"✔ Adding hook 'deptry' to '.pre-commit-config.yaml'.\n"
392-
"☐ Run 'pre-commit install' to register pre-commit with git.\n"
392+
"☐ Run 'pre-commit install' to register pre-commit.\n"
393393
"☐ Run 'pre-commit run --all-files' to run the hooks manually.\n"
394394
)
395395

@@ -603,7 +603,7 @@ def test_fresh(self, uv_init_dir: Path, capfd: pytest.CaptureFixture[str]):
603603
"☐ Remove the placeholder hook in '.pre-commit-config.yaml'.\n"
604604
"☐ Replace it with your own hooks.\n"
605605
"☐ Alternatively, use 'usethis tool' to add other tools and their hooks.\n"
606-
"☐ Run 'pre-commit install' to register pre-commit with git.\n"
606+
"☐ Run 'pre-commit install' to register pre-commit.\n"
607607
"☐ Run 'pre-commit run --all-files' to run the hooks manually.\n"
608608
)
609609
# Config file
@@ -780,7 +780,7 @@ def test_stdout(self, uv_init_dir: Path, capfd: pytest.CaptureFixture[str]):
780780
out, err = capfd.readouterr()
781781
assert not err
782782
assert out == (
783-
"☐ Run 'uvx pre-commit uninstall' to deregister pre-commit with git.\n"
783+
"☐ Run 'uv run --with pre-commit pre-commit uninstall' to deregister pre-commit.\n"
784784
"✔ Removing '.pre-commit-config.yaml'.\n"
785785
"✔ Removing dependency 'pre-commit' from the 'dev' group in 'pyproject.toml'.\n"
786786
)
@@ -802,7 +802,7 @@ def test_requirements_txt_used(
802802
# Assert
803803
out, _ = capfd.readouterr()
804804
assert out == (
805-
"☐ Run 'uvx pre-commit uninstall' to deregister pre-commit with git.\n"
805+
"☐ Run 'uv run --with pre-commit pre-commit uninstall' to deregister pre-commit.\n"
806806
"✔ Removing '.pre-commit-config.yaml'.\n"
807807
"✔ Removing dependency 'pre-commit' from the 'dev' group in 'pyproject.toml'.\n"
808808
"☐ Run 'uv export --no-dev --output-file=requirements.txt' to write \n'requirements.txt'.\n"
@@ -824,7 +824,7 @@ def test_pyproject_fmt_used(
824824
# Assert
825825
out, _ = capfd.readouterr()
826826
assert out == (
827-
"☐ Run 'uvx pre-commit uninstall' to deregister pre-commit with git.\n"
827+
"☐ Run 'uv run --with pre-commit pre-commit uninstall' to deregister pre-commit.\n"
828828
"✔ Removing '.pre-commit-config.yaml'.\n"
829829
"✔ Removing dependency 'pre-commit' from the 'dev' group in 'pyproject.toml'.\n"
830830
"✔ Adding dependency 'pyproject-fmt' to the 'dev' group in 'pyproject.toml'.\n"
@@ -850,7 +850,7 @@ def test_codepsell_used(
850850
out, err = capfd.readouterr()
851851
assert not err
852852
assert out == (
853-
"☐ Run 'uvx pre-commit uninstall' to deregister pre-commit with git.\n"
853+
"☐ Run 'uv run --with pre-commit pre-commit uninstall' to deregister pre-commit.\n"
854854
"✔ Removing '.pre-commit-config.yaml'.\n"
855855
"✔ Removing dependency 'pre-commit' from the 'dev' group in 'pyproject.toml'.\n"
856856
"✔ Adding dependency 'codespell' to the 'dev' group in 'pyproject.toml'.\n"
@@ -927,7 +927,7 @@ def test_remove(self, uv_init_dir: Path, capfd: pytest.CaptureFixture[str]):
927927
assert out == (
928928
"✔ Removing 'Run pre-commit' from default pipeline in 'bitbucket-pipelines.yml'.\n"
929929
"✔ Adding cache 'uv' definition to 'bitbucket-pipelines.yml'.\n"
930-
"☐ Run 'uvx pre-commit uninstall' to deregister pre-commit with git.\n"
930+
"☐ Run 'uv run --with pre-commit pre-commit uninstall' to deregister pre-commit.\n"
931931
"✔ Removing '.pre-commit-config.yaml'.\n"
932932
"✔ Removing dependency 'pre-commit' from the 'dev' group in 'pyproject.toml'.\n"
933933
)

0 commit comments

Comments
 (0)