diff --git a/.github/workflows/test-translations.yml b/.github/workflows/test-translations.yml index 45dc60aa3..e793937b8 100644 --- a/.github/workflows/test-translations.yml +++ b/.github/workflows/test-translations.yml @@ -67,7 +67,7 @@ jobs: run: python -m pip install --upgrade nox virtualenv sphinx-lint - name: Set Sphinx problem matcher - uses: sphinx-doc/github-problem-matcher@v1.0 + uses: sphinx-doc/github-problem-matcher@v1.1 - name: Build translated docs in ${{ matrix.language }} run: nox -s build -- -q -D language=${{ matrix.language }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8503ca720..799e95204 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,10 +24,10 @@ jobs: - linkcheck steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.11" cache: 'pip' diff --git a/.github/workflows/translation.yml b/.github/workflows/translation.yml index 7cfae2991..2a24a8e36 100644 --- a/.github/workflows/translation.yml +++ b/.github/workflows/translation.yml @@ -19,14 +19,14 @@ jobs: steps: - name: Grab the repo src - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 # To reach the common commit - name: Set up git user as [bot] # Refs: # * https://github.community/t/github-actions-bot-email-address/17204/6 # * https://github.com/actions/checkout/issues/13#issuecomment-724415212 - uses: fregante/setup-git-user@v1.1.0 + uses: fregante/setup-git-user@v2.0.2 - name: Switch to the translation source branch run: | @@ -51,7 +51,7 @@ jobs: git merge '${{ github.event.repository.default_branch }}' - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: >- 3.10 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index db8b1131a..e6b06cbf8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,16 +2,22 @@ ci: autoupdate_schedule: quarterly repos: +- repo: meta + hooks: + - id: check-hooks-apply + - id: check-useless-excludes + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - id: check-added-large-files - id: check-case-conflict - id: check-merge-conflict - - id: check-symlinks + - id: check-json - id: check-yaml - id: end-of-file-fixer - id: mixed-line-ending + - id: requirements-txt-fixer - id: trailing-whitespace - repo: https://github.com/codespell-project/codespell @@ -37,7 +43,12 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.1 + rev: v0.9.1 hooks: - id: ruff - id: ruff-format + +- repo: https://github.com/sphinx-contrib/sphinx-lint + rev: v1.0.0 + hooks: + - id: sphinx-lint diff --git a/requirements.txt b/requirements.txt index a3269a025..2aca1384a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ furo==2024.8.6 sphinx==7.2.6 sphinx-autobuild==2021.3.14 -sphinx-inline-tabs==2023.4.21 sphinx-copybutton==0.5.2 +sphinx-inline-tabs==2023.4.21 sphinx-toolbox==3.5.0 diff --git a/source/glossary.rst b/source/glossary.rst index dc6211833..f3eb2591d 100644 --- a/source/glossary.rst +++ b/source/glossary.rst @@ -257,7 +257,7 @@ Glossary `_, and discuss issues on the `distutils-sig mailing list `_ - and `the Python Discourse forum `__. + and `the Python Discourse forum `__. Python Package Index (PyPI) diff --git a/source/guides/creating-command-line-tools.rst b/source/guides/creating-command-line-tools.rst index 49ce0c9ed..495e69d78 100644 --- a/source/guides/creating-command-line-tools.rst +++ b/source/guides/creating-command-line-tools.rst @@ -102,9 +102,9 @@ so initizalize the command-line interface here: .. code-block:: python - if __name__ == "__main__": - from greetings.cli import app - app() + if __name__ == "__main__": + from greetings.cli import app + app() .. note:: @@ -123,8 +123,8 @@ For the project to be recognised as a command-line tool, additionally a ``consol .. code-block:: toml - [project.scripts] - greet = "greetings.cli:app" + [project.scripts] + greet = "greetings.cli:app" Now, the project's source tree is ready to be transformed into a :term:`distribution package `, which makes it installable. @@ -145,12 +145,12 @@ Let's test it: .. code-block:: console - $ greet --knight Lancelot - Greetings, dear Sir Lancelot! - $ greet --gender feminine Parks - Greetings, dear Ms. Parks! - $ greet --gender masculine - Greetings, dear Mr. what's-his-name! + $ greet --knight Lancelot + Greetings, dear Sir Lancelot! + $ greet --gender feminine Parks + Greetings, dear Ms. Parks! + $ greet --gender masculine + Greetings, dear Mr. what's-his-name! Since this example uses ``typer``, you could now also get an overview of the program's usage by calling it with the ``--help`` option, or configure completions via the ``--install-completion`` option. @@ -160,7 +160,7 @@ To just run the program without installing it permanently, use ``pipx run``, whi .. code-block:: console - $ pipx run --spec . greet --knight + $ pipx run --spec . greet --knight This syntax is a bit unpractical, however; as the name of the entry point we defined above does not match the package name, we need to state explicitly which executable script to run (even though there is only on in existence).