diff --git a/.config/copier/.copier-answers.python.yaml b/.config/copier/.copier-answers.python.yaml index f5e13a58..81701aee 100644 --- a/.config/copier/.copier-answers.python.yaml +++ b/.config/copier/.copier-answers.python.yaml @@ -1,7 +1,7 @@ ## This file is @generated by . # DO NOT EDIT! # prettier-ignore -_commit: v0.1.32 +_commit: v0.1.44 _src_path: gh:liblaf/copier-python answers_file_shared: .config/copier/.copier-answers.shared.yaml distribution_name: route-rules diff --git a/.config/copier/.copier-answers.shared.yaml b/.config/copier/.copier-answers.shared.yaml index c16b693f..864e085c 100644 --- a/.config/copier/.copier-answers.shared.yaml +++ b/.config/copier/.copier-answers.shared.yaml @@ -1,6 +1,6 @@ # This file is @generated by . # DO NOT EDIT! -_commit: v0.2.12 +_commit: v0.2.24 _src_path: gh:liblaf/copier-share author_email: 30631553+liblaf@users.noreply.github.com author_name: liblaf diff --git a/.config/linters/.ruff.toml b/.config/linters/.ruff.toml index ecf5d275..350223b1 100644 --- a/.config/linters/.ruff.toml +++ b/.config/linters/.ruff.toml @@ -34,6 +34,7 @@ ignore = [ "PLR2004", "RET504", "S101", + "S310", "S603", "S607", "T201", diff --git a/.config/mise/conf.d/50-python.toml b/.config/mise/conf.d/50-python.toml index 914fd0bd..2f8e25f9 100644 --- a/.config/mise/conf.d/50-python.toml +++ b/.config/mise/conf.d/50-python.toml @@ -22,15 +22,15 @@ run = ["rm --force --recursive '{{ config_root }}/.cache'", "zensical serve"] [tasks."gen:init"] description = "Generate lazy-loading __init__.py files from __init__.pyi stubs" -file = "https://raw.githubusercontent.com/liblaf/copier-python/c7a15e85128f819074f7658ed62acbe70a78a9be/mise-tasks/gen/init.py" +file = "https://cdn.jsdelivr.net/gh/liblaf/copier-python@e999e0b3fd92ddbdb79368750fad42d4c6388e18/mise-tasks/gen/init.py" [tasks."gen:ref-pages"] description = "Generate API reference pages from public Python modules" -file = "https://raw.githubusercontent.com/liblaf/copier-python/c7a15e85128f819074f7658ed62acbe70a78a9be/mise-tasks/gen/ref-pages.py" +file = "https://cdn.jsdelivr.net/gh/liblaf/copier-python@e999e0b3fd92ddbdb79368750fad42d4c6388e18/mise-tasks/gen/ref-pages.py" [tasks.install] description = "Install project dependencies from pixi.lock or uv.lock" -file = "https://raw.githubusercontent.com/liblaf/copier-python/c7a15e85128f819074f7658ed62acbe70a78a9be/mise-tasks/install.sh" +file = "https://cdn.jsdelivr.net/gh/liblaf/copier-python@e999e0b3fd92ddbdb79368750fad42d4c6388e18/mise-tasks/install.sh" [tasks.lint] description = "Run all linters" @@ -42,8 +42,8 @@ run = ["lint-imports", "ruff check --fix", "ruff format", "ty check --fix"] [tasks."lint:toml"] description = "Sort, format, and lint TOML files with toml-sort and tombi" -file = "https://raw.githubusercontent.com/liblaf/copier-python/c7a15e85128f819074f7658ed62acbe70a78a9be/mise-tasks/lint/toml.sh" +file = "https://cdn.jsdelivr.net/gh/liblaf/copier-python@e999e0b3fd92ddbdb79368750fad42d4c6388e18/mise-tasks/lint/toml.sh" [tasks.upgrade] description = "Upgrade project dependencies from pixi.lock or uv.lock" -file = "https://raw.githubusercontent.com/liblaf/copier-python/c7a15e85128f819074f7658ed62acbe70a78a9be/mise-tasks/upgrade.sh" +file = "https://cdn.jsdelivr.net/gh/liblaf/copier-python@e999e0b3fd92ddbdb79368750fad42d4c6388e18/mise-tasks/upgrade.sh" diff --git a/.config/mise/conf.d/50-shared.toml b/.config/mise/conf.d/50-shared.toml index 87a7c279..6f615a8c 100644 --- a/.config/mise/conf.d/50-shared.toml +++ b/.config/mise/conf.d/50-shared.toml @@ -2,6 +2,10 @@ # This file is @generated by . # DO NOT EDIT! +# Use jsdelivr.net instead of raw.githubusercontent.com to avoid HTTP 429 (Too Many +# Requests) rate limit errors + [tasks.copier-update] -description = "Recopy all configured Copier templates from their answers files." -file = "https://raw.githubusercontent.com/liblaf/copier-shared/229c877607592fdb64fd30c9fb5a511e86862304/mise-tasks/copier-update.sh" +description = "Reapply all Copier templates using their saved answers" +file = "https://cdn.jsdelivr.net/gh/liblaf/copier-shared@065e35a2e53df85a160950c67df0b33f09aed064/mise-tasks/copier-update.sh" +interactive = true diff --git a/.github/workflows/python-bench.yaml b/.github/workflows/python-bench.yaml index 424e57a3..e4789c5c 100644 --- a/.github/workflows/python-bench.yaml +++ b/.github/workflows/python-bench.yaml @@ -22,9 +22,9 @@ jobs: sessions: ${{ steps.collect.outputs.sessions }} steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - name: Setup uv - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 with: activate-environment: true - name: Install dependencies @@ -47,15 +47,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - name: Setup uv - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 with: activate-environment: true - name: Install dependencies run: uv sync --active --frozen --all-packages - name: Bench - uses: CodSpeedHQ/action@db35df748deb45fdef0960669f57d627c1956c30 # v4 + uses: CodSpeedHQ/action@88472375d0a4572cf70a9f1fe3a4e0ab8da1b924 # v5 with: run: nox --tags 'bench' - mode: instrumentation + mode: simulation,walltime,memory diff --git a/.github/workflows/python-docs.yaml b/.github/workflows/python-docs.yaml index d0f8bf44..e9a8672f 100644 --- a/.github/workflows/python-docs.yaml +++ b/.github/workflows/python-docs.yaml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: fetch-depth: 0 - id: config @@ -29,7 +29,7 @@ jobs: - name: Set environment variables run: echo 'SITE_URL=${{ steps.config.outputs.base_url }}' >> "$GITHUB_ENV" - name: Setup uv - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 with: activate-environment: true - name: Install dependencies diff --git a/.github/workflows/python-release.yaml b/.github/workflows/python-release.yaml index 218a70f8..4077b4a0 100644 --- a/.github/workflows/python-release.yaml +++ b/.github/workflows/python-release.yaml @@ -25,10 +25,10 @@ jobs: package-version: ${{ steps.build.outputs.package_version }} steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - id: build name: Build and inspect a Python package - uses: hynek/build-and-inspect-python-package@fe0a0fb1925ca263d076ca4f2c13e93a6e92a33e # v2 + uses: hynek/build-and-inspect-python-package@2abe76da66d0a6a4a227101f9348ee855797cfa5 # v3.0.1 with: attest-build-provenance-github: true @@ -50,7 +50,7 @@ jobs: name: ${{ needs.build.outputs.artifact-name }} path: dist - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1 + uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1 with: verbose: ${{ runner.debug == '1' }} print-hash: true @@ -70,7 +70,7 @@ jobs: name: ${{ needs.build.outputs.artifact-name }} path: dist - name: Upload release assets - uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3 + uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3 with: draft: false files: dist/* diff --git a/.github/workflows/python-test.yaml b/.github/workflows/python-test.yaml index 802d9d3e..d02ee1f3 100644 --- a/.github/workflows/python-test.yaml +++ b/.github/workflows/python-test.yaml @@ -24,9 +24,9 @@ jobs: sessions: ${{ steps.collect.outputs.sessions }} steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - name: Setup uv - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 with: activate-environment: true - name: Install dependencies @@ -49,11 +49,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: fetch-depth: 0 # I don't know why, but it is present in Codecov's documentation - name: Setup uv - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 with: activate-environment: true - name: Install dependencies @@ -62,13 +62,13 @@ jobs: run: nox --session '${{ matrix.session }}' - if: success() || failure() name: Upload coverage - uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6 + uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7 with: report_type: coverage use_oidc: true - if: success() || failure() name: Upload test results - uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6 + uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7 with: report_type: test_results use_oidc: true diff --git a/.github/workflows/shared-approve.yaml b/.github/workflows/shared-approve.yaml index abf1b01d..89808075 100644 --- a/.github/workflows/shared-approve.yaml +++ b/.github/workflows/shared-approve.yaml @@ -21,15 +21,16 @@ jobs: steps: - id: auth name: Auth - uses: liblaf/actions/auth@d510a5eaa5206b30ed1009660d04ef8082daf2d9 # v2 + uses: liblaf/actions/auth@f53e930a3c8515151fc60ca60623e766c0c85643 # v3 with: client-id: ${{ vars.APP_CLIENT_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - name: Approve - uses: liblaf/actions/approve@d510a5eaa5206b30ed1009660d04ef8082daf2d9 # v2 + uses: liblaf/actions/approve@f53e930a3c8515151fc60ca60623e766c0c85643 # v3 with: approve-token: ${{ steps.auth.outputs.token }} label: ${{ matrix.label }} + reviewer: ${{ steps.auth.outputs.committer-name }} strategy: matrix: label: diff --git a/.github/workflows/shared-copier-update.yaml b/.github/workflows/shared-copier-update.yaml index 821bf544..e22a349e 100644 --- a/.github/workflows/shared-copier-update.yaml +++ b/.github/workflows/shared-copier-update.yaml @@ -25,14 +25,14 @@ jobs: steps: - id: auth name: Auth - uses: liblaf/actions/auth@d510a5eaa5206b30ed1009660d04ef8082daf2d9 # v2 + uses: liblaf/actions/auth@f53e930a3c8515151fc60ca60623e766c0c85643 # v3 with: client-id: ${{ vars.APP_CLIENT_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - name: Install mise - uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4 + uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 # v4 - name: Install Copier run: pipx install --pip-args cookiecutter copier - name: Copier update diff --git a/.github/workflows/shared-mega-linter.yaml b/.github/workflows/shared-mega-linter.yaml index f99912aa..a5456e3f 100644 --- a/.github/workflows/shared-mega-linter.yaml +++ b/.github/workflows/shared-mega-linter.yaml @@ -33,15 +33,15 @@ jobs: steps: - id: auth name: Auth - uses: liblaf/actions/auth@d510a5eaa5206b30ed1009660d04ef8082daf2d9 # v2 + uses: liblaf/actions/auth@f53e930a3c8515151fc60ca60623e766c0c85643 # v3 with: client-id: ${{ vars.APP_CLIENT_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - id: lint name: MegaLinter - uses: liblaf/megalinter-custom-flavor-all@e4ff3731165d0b37dcf66ef40ddcd9e6c1825adf # main + uses: liblaf/megalinter-custom-flavor-all@4e698aefdb7056813167596e16c0d31b470be2e8 # main env: GITHUB_TOKEN: ${{ steps.auth.outputs.token }} MEGALINTER_CONFIG: https://raw.githubusercontent.com/liblaf/megalinter-custom-flavor-all/refs/heads/main/.mega-linter.yml @@ -60,10 +60,7 @@ jobs: cp --target-directory='${{ runner.temp }}' --verbose 'megalinter-reports/megalinter-report.md' sudo rm --force --recursive 'mega-linter.log' 'megalinter-reports' - id: pr - if: >- - steps.lint.outputs.has-updated-sources == 1 && (github.event_name == - 'push' || github.event.pull_request.head.repo.full_name == - github.repository) + if: steps.lint.outputs.has-updated-sources == 1 && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) name: Create PR uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8 with: @@ -93,12 +90,13 @@ jobs: steps: - id: auth name: Auth - uses: liblaf/actions/auth@d510a5eaa5206b30ed1009660d04ef8082daf2d9 # v2 + uses: liblaf/actions/auth@f53e930a3c8515151fc60ca60623e766c0c85643 # v3 with: client-id: ${{ vars.APP_CLIENT_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - name: Approve - uses: liblaf/actions/approve@d510a5eaa5206b30ed1009660d04ef8082daf2d9 # v2 + uses: liblaf/actions/approve@f53e930a3c8515151fc60ca60623e766c0c85643 # v3 with: approve-token: ${{ steps.auth.outputs.token }} pull: ${{ needs.mega-linter.outputs.pull-request-url }} + reviewer: ${{ steps.auth.outputs.committer-name }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 83a794d7..7275c7a0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ ci: repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.11 + rev: v0.16.0 hooks: - id: ruff-check args: @@ -52,7 +52,7 @@ repos: hooks: - id: actionlint - repo: https://github.com/rvben/rumdl-pre-commit - rev: v0.1.80 + rev: v0.2.43 hooks: - id: rumdl-fmt - repo: https://github.com/shellcheck-py/shellcheck-py diff --git a/__builtins__.pyi b/__builtins__.pyi index 6afdde8d..23b2818a 100644 --- a/__builtins__.pyi +++ b/__builtins__.pyi @@ -4,10 +4,10 @@ # ref: # ref: -from typing import overload, type_check_only +from typing import Protocol, overload, type_check_only @type_check_only -class _IceCreamDebugger: +class _IceCreamDebugger(Protocol): @overload def __call__(self, **kwargs) -> None: ... @overload