diff --git a/README.md b/README.md index c62d47b8..115f6726 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ Additionally, the command line reference documentation can be viewed with `useth - [`usethis tool deptry`](https://usethis.readthedocs.io/en/stable/cli/reference#code-quality-tools) - Use the [deptry linter](https://github.com/fpgmaas/deptry): avoid missing or superfluous dependency declarations. - [`usethis tool import-linter`](https://usethis.readthedocs.io/en/stable/cli/reference#code-quality-tools) - Use [Import Linter](https://import-linter.readthedocs.io/en/stable/): enforce a self-imposed architecture on imports. - [`usethis tool pre-commit`](https://usethis.readthedocs.io/en/stable/cli/reference#code-quality-tools) - Use the [pre-commit](https://github.com/pre-commit/pre-commit) framework to manage and maintain Git hooks. Note that this will also install all the hooks to Git. - - [`usethis tool pyproject-fmt`](https://usethis.readthedocs.io/en/stable/cli/reference#code-quality-tools) - Use the [pyproject-fmt linter](https://github.com/tox-dev/pyproject-fmt): opinionated formatting of 'pyproject.toml' files. + - [`usethis tool pyproject-fmt`](https://usethis.readthedocs.io/en/stable/cli/reference#code-quality-tools) - Use the [pyproject-fmt formatter](https://github.com/tox-dev/toml-fmt/tree/main/pyproject-fmt): opinionated formatting of 'pyproject.toml' files. - [`usethis tool ruff`](https://usethis.readthedocs.io/en/stable/cli/reference#code-quality-tools) - Use [Ruff](https://github.com/astral-sh/ruff): an extremely fast Python linter and code formatter. - [`usethis tool coverage.py`](https://usethis.readthedocs.io/en/stable/cli/reference#testing) - Use [Coverage.py](https://github.com/nedbat/coveragepy): a code coverage measurement tool. - [`usethis tool pytest`](https://usethis.readthedocs.io/en/stable/cli/reference#testing) - Use the [pytest](https://github.com/pytest-dev/pytest) testing framework. diff --git a/docs/cli/overview.md b/docs/cli/overview.md index 4e2bb9f1..e19eb18c 100644 --- a/docs/cli/overview.md +++ b/docs/cli/overview.md @@ -17,7 +17,7 @@ - [`usethis tool deptry`](reference.md#code-quality-tools) - Use the [deptry linter](https://github.com/fpgmaas/deptry): avoid missing or superfluous dependency declarations. - [`usethis tool import-linter`](reference.md#code-quality-tools) - Use [Import Linter](https://import-linter.readthedocs.io/en/stable/): enforce a self-imposed architecture on imports. - [`usethis tool pre-commit`](reference.md#code-quality-tools) - Use the [pre-commit](https://github.com/pre-commit/pre-commit) framework to manage and maintain Git hooks. Note that this will also install all the hooks to Git. - - [`usethis tool pyproject-fmt`](reference.md#code-quality-tools) - Use the [pyproject-fmt linter](https://github.com/tox-dev/pyproject-fmt): opinionated formatting of 'pyproject.toml' files. + - [`usethis tool pyproject-fmt`](reference.md#code-quality-tools) - Use the [pyproject-fmt formatter](https://github.com/tox-dev/toml-fmt/tree/main/pyproject-fmt): opinionated formatting of 'pyproject.toml' files. - [`usethis tool ruff`](reference.md#code-quality-tools) - Use [Ruff](https://github.com/astral-sh/ruff): an extremely fast Python linter and code formatter. - [`usethis tool coverage.py`](reference.md#testing) - Use [Coverage.py](https://github.com/nedbat/coveragepy): a code coverage measurement tool. - [`usethis tool pytest`](reference.md#testing) - Use the [pytest](https://github.com/pytest-dev/pytest) testing framework. diff --git a/docs/cli/reference.md b/docs/cli/reference.md index 983ce970..965994e6 100644 --- a/docs/cli/reference.md +++ b/docs/cli/reference.md @@ -190,7 +190,7 @@ declaring dependencies with `uv add`. - `usethis tool deptry` - Use the [deptry linter](https://github.com/fpgmaas/deptry): avoid missing or superfluous dependency declarations. - `usethis tool import-linter` - Use [Import Linter](https://import-linter.readthedocs.io/en/stable/): enforce a self-imposed architecture on imports. - `usethis tool pre-commit` - Use the [pre-commit](https://github.com/pre-commit/pre-commit) framework to manage and maintain Git hooks. Note that this will also install all the hooks to Git. -- `usethis tool pyproject-fmt` - Use the [pyproject-fmt linter](https://github.com/tox-dev/pyproject-fmt): opinionated formatting of 'pyproject.toml' files. +- `usethis tool pyproject-fmt` - Use the [pyproject-fmt formatter](https://github.com/tox-dev/toml-fmt/tree/main/pyproject-fmt): opinionated formatting of 'pyproject.toml' files. - `usethis tool ruff` - Use [Ruff](https://github.com/astral-sh/ruff): an extremely fast Python linter and code formatter. ### Testing diff --git a/src/usethis/_tool/impl/pyproject_fmt.py b/src/usethis/_tool/impl/pyproject_fmt.py index 7816c6b7..cfa27cf1 100644 --- a/src/usethis/_tool/impl/pyproject_fmt.py +++ b/src/usethis/_tool/impl/pyproject_fmt.py @@ -19,6 +19,7 @@ class PyprojectFmtTool(Tool): + # https://github.com/tox-dev/toml-fmt/tree/main/pyproject-fmt # https://github.com/tox-dev/pyproject-fmt @property def name(self) -> str: diff --git a/tests/usethis/_tool/impl/test_pyproject_fmt.py b/tests/usethis/_tool/impl/test_pyproject_fmt.py index 3491f442..bdfc82f7 100644 --- a/tests/usethis/_tool/impl/test_pyproject_fmt.py +++ b/tests/usethis/_tool/impl/test_pyproject_fmt.py @@ -38,6 +38,8 @@ def test_latest_version(self): repo = config.repo assert isinstance(repo, UriRepo) try: + # N.B. this is the pre-commit mirror, it can lag behind the main repo + # at https://github.com/tox-dev/toml-fmt/tree/main/pyproject-fmt assert repo.rev == get_github_latest_tag( owner="tox-dev", repo="pyproject-fmt" )