Repository navigation
Update pre-commit hook astral-sh/ruff-pre-commit to v0.17.1 #408
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: typeshed_primer | |
| on: | |
| pull_request: | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| FORCE_COLOR: 1 | |
| CLICOLOR_FORCE: 1 # recognized by uv | |
| jobs: | |
| typeshed_primer: | |
| timeout-minutes: 5 | |
| runs-on: depot-ubuntu-24.04-4 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout docstring-adder on target branch | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ref: ${{ github.base_ref }} | |
| path: old_codemod | |
| persist-credentials: false | |
| - name: Checkout docstring-adder on PR branch | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| path: new_codemod | |
| persist-credentials: false | |
| - name: Checkout typeshed | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: python/typeshed | |
| path: typeshed | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0 | |
| with: | |
| # renovate: datasource=github-releases depName=astral-sh/uv | |
| version: "0.13.0" | |
| - name: Setup git | |
| run: | | |
| git config --global user.name stubdefaulter | |
| git config --global user.email '' | |
| - name: Codemod typeshed using target branch | |
| run: | | |
| uvx --python=3.15 --from=./old_codemod add-docstrings --stdlib-path ./typeshed/stdlib | |
| uvx --python=3.10 --from=./old_codemod add-docstrings --stdlib-path ./typeshed/stdlib | |
| uvx --directory=typeshed black stdlib || true | |
| git -C typeshed commit -a -m "With old stubdefaulter" | |
| - name: Codemod typeshed using PR branch | |
| run: | | |
| git -C typeshed checkout HEAD~1 -- stdlib | |
| git -C typeshed restore --staged stdlib | |
| uvx --python=3.15 --from=./new_codemod add-docstrings --stdlib-path ./typeshed/stdlib | |
| uvx --python=3.10 --from=./new_codemod add-docstrings --stdlib-path ./typeshed/stdlib | |
| uvx --directory=typeshed black stdlib || true | |
| - name: Get the diff between the two docstring-adder runs | |
| run: git -C typeshed diff | tee docstring-adder-diff.txt | |
| - name: Upload diff | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: docstring-adder-diff | |
| path: docstring-adder-diff.txt |