Skip to content

Commit cfac3ae

Browse files
committed
Allow update-examples.sh to take an optional PEP filename argument
1 parent ebc8cb0 commit cfac3ae

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

scripts/update-examples.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
#!/bin/sh
22

3+
PEP=${1:-pep.rst}
4+
35
scripts/py2rst.py tests/test_qblike_2.py --start "Begin PEP section" --end "End PEP section" \
4-
| scripts/rst_replace_section.py pep.rst pep827-qb-impl -i
6+
| scripts/rst_replace_section.py "$PEP" pep827-qb-impl -i
57

68

79
scripts/py2rst.py tests/test_dataclass_like.py --start "Begin PEP section: dataclass like" --end "End PEP section" \
8-
| scripts/rst_replace_section.py pep.rst pep827-init-impl -i
10+
| scripts/rst_replace_section.py "$PEP" pep827-init-impl -i
911

1012
scripts/py2rst.py tests/test_fastapilike_2.py --start "Begin PEP section: Automatically deriving FastAPI CRUD models" --end "End PEP section" \
11-
| scripts/rst_replace_section.py pep.rst pep827-fastapi-impl -i
13+
| scripts/rst_replace_section.py "$PEP" pep827-fastapi-impl -i
1214

1315
scripts/py2rst.py tests/test_nplike.py --start "Begin PEP section" --end "End PEP section" \
14-
| scripts/rst_replace_section.py pep.rst pep827-numpy-impl -i
16+
| scripts/rst_replace_section.py "$PEP" pep827-numpy-impl -i

0 commit comments

Comments
 (0)