Skip to content

Commit 457a37e

Browse files
committed
Merge branch 'main' into zizmor
2 parents dae988d + 887d794 commit 457a37e

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

.github/workflows/publish.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ jobs:
6969
path: dist/
7070
- name: Install wheel
7171
run: |
72-
export path_to_file=$(find dist -type f -name "typing_extensions-*.whl")
72+
path_to_file="$(find dist -type f -name "typing_extensions-*.whl")"
73+
export path_to_file
7374
echo "::notice::Installing wheel: $path_to_file"
74-
python -m pip install --user $path_to_file
75+
python -m pip install --user "$path_to_file"
7576
python -m pip list
7677
- name: Run typing_extensions tests against installed package
7778
run: rm src/typing_extensions.py && python src/test_typing_extensions.py
@@ -97,10 +98,11 @@ jobs:
9798
path: dist/
9899
- name: Unpack and test source distribution
99100
run: |
100-
export path_to_file=$(find dist -type f -name "typing_extensions-*.tar.gz")
101+
path_to_file="$(find dist -type f -name "typing_extensions-*.tar.gz")"
102+
export path_to_file
101103
echo "::notice::Unpacking source distribution: $path_to_file"
102-
tar xzf $path_to_file -C dist/
103-
cd ${path_to_file%.tar.gz}/src
104+
tar xzf "$path_to_file" -C dist/
105+
cd "${path_to_file%.tar.gz}/src"
104106
python test_typing_extensions.py
105107
106108
test-sdist-installed:
@@ -124,9 +126,10 @@ jobs:
124126
path: dist/
125127
- name: Install source distribution
126128
run: |
127-
export path_to_file=$(find dist -type f -name "typing_extensions-*.tar.gz")
129+
path_to_file="$(find dist -type f -name "typing_extensions-*.tar.gz")"
130+
export path_to_file
128131
echo "::notice::Installing source distribution: $path_to_file"
129-
python -m pip install --user $path_to_file
132+
python -m pip install --user "$path_to_file"
130133
python -m pip list
131134
- name: Run typing_extensions tests against installed package
132135
run: rm src/typing_extensions.py && python src/test_typing_extensions.py
@@ -154,6 +157,6 @@ jobs:
154157
name: python-package-distributions
155158
path: dist/
156159
- name: Ensure exactly one sdist and one wheel have been downloaded
157-
run: test $(ls dist/*.tar.gz | wc -l) = 1 && test $(ls dist/*.whl | wc -l) = 1
160+
run: test "$(find dist/*.tar.gz | wc -l | xargs)" = 1 && test "$(find dist/*.whl | wc -l | xargs)" = 1
158161
- name: Publish distribution to PyPI
159162
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc

.github/workflows/third_party.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
github.repository == 'python/typing_extensions'
3636
|| github.event_name != 'schedule'
3737
steps:
38-
- run: true
38+
- run: "true"
3939

4040
pydantic:
4141
name: pydantic tests
@@ -100,7 +100,7 @@ jobs:
100100
run: |
101101
set -x
102102
cd typing_inspect
103-
uv pip install --system -r test-requirements.txt --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)
103+
uv pip install --system -r test-requirements.txt --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"
104104
- name: Install typing_extensions latest
105105
run: uv pip install --system "typing-extensions @ ./typing-extensions-latest"
106106
- name: List all installed dependencies
@@ -138,7 +138,7 @@ jobs:
138138
run: |
139139
set -x
140140
cd pycroscope
141-
uv pip install --system 'pycroscope[tests] @ .' --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)
141+
uv pip install --system 'pycroscope[tests] @ .' --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"
142142
- name: Install typing_extensions latest
143143
run: uv pip install --system "typing-extensions @ ./typing-extensions-latest"
144144
- name: List all installed dependencies
@@ -176,7 +176,7 @@ jobs:
176176
run: |
177177
set -x
178178
cd typeguard
179-
uv pip install --system "typeguard @ ." --group test --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)
179+
uv pip install --system "typeguard @ ." --group test --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"
180180
- name: Install typing_extensions latest
181181
run: uv pip install --system "typing-extensions @ ./typing-extensions-latest"
182182
- name: List all installed dependencies
@@ -220,8 +220,8 @@ jobs:
220220
run: |
221221
set -x
222222
cd typed-argument-parser
223-
uv pip install --system "typed-argument-parser @ ." --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)
224-
uv pip install --system pytest --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)
223+
uv pip install --system "typed-argument-parser @ ." --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"
224+
uv pip install --system pytest --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"
225225
- name: Install typing_extensions latest
226226
run: uv pip install --system "typing-extensions @ ./typing-extensions-latest"
227227
- name: List all installed dependencies
@@ -259,7 +259,7 @@ jobs:
259259
run: |
260260
set -x
261261
cd mypy
262-
uv pip install --system -r test-requirements.txt --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)
262+
uv pip install --system -r test-requirements.txt --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"
263263
uv pip install --system -e .
264264
- name: Install typing_extensions latest
265265
run: uv pip install --system "typing-extensions @ ./typing-extensions-latest"

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ repos:
2121
rev: 0.33.0
2222
hooks:
2323
- id: check-dependabot
24+
- id: check-github-workflows
25+
- id: check-readthedocs
2426
- repo: https://github.com/abravalheri/validate-pyproject
2527
rev: v0.24.1
2628
hooks:
@@ -30,6 +32,11 @@ repos:
3032
rev: v1.7.7
3133
hooks:
3234
- id: actionlint
35+
additional_dependencies:
36+
# actionlint has a shellcheck integration which extracts shell scripts in `run:` steps from GitHub Actions
37+
# and checks these with shellcheck. This is arguably its most useful feature,
38+
# but the integration only works if shellcheck is installed
39+
- "github.com/wasilibs/go-shellcheck/cmd/[email protected]"
3340
- repo: https://github.com/woodruffw/zizmor-pre-commit
3441
rev: v1.11.0
3542
hooks:

0 commit comments

Comments
 (0)