Skip to content

Commit f687cd0

Browse files
jawwad-aliclaude
andcommitted
docs(workflows): init step docstring lists the 'py' script type
The InitStep `script` field docstring claimed only 'sh' or 'ps', but the step's own VALID_SCRIPT_TYPES = tuple(SCRIPT_TYPE_CHOICES.keys()) is ('sh', 'ps', 'py') and validate() accepts all three (its error message is built from VALID_SCRIPT_TYPES). Update the docstring to list 'py' too, so it no longer contradicts the same class's validate() authority. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 8db7228 commit f687cd0

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/specify_cli/workflows/steps/init/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class InitStep(StepBase):
5959
Extra options for the integration (e.g. ``"--skills"`` or
6060
``"--commands-dir .myagent/cmds"``).
6161
``script``
62-
Script type, ``sh`` or ``ps``.
62+
Script type, ``sh``, ``ps``, or ``py``.
6363
``force``
6464
Merge/overwrite without confirmation when the directory is not
6565
empty.

tests/test_workflows.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,6 +1935,14 @@ def _force_gate_stdin(monkeypatch, *, tty: bool):
19351935
class TestInitStep:
19361936
"""Test the init step type."""
19371937

1938+
def test_docstring_lists_every_valid_script_type(self):
1939+
# The `script` field docstring must not contradict the step's own
1940+
# VALID_SCRIPT_TYPES (which includes 'py'); validate() accepts all three.
1941+
from specify_cli.workflows.steps.init import InitStep, VALID_SCRIPT_TYPES
1942+
1943+
for script_type in VALID_SCRIPT_TYPES:
1944+
assert f"``{script_type}``" in InitStep.__doc__
1945+
19381946
def test_builds_here_argv_and_bootstraps(self, tmp_path):
19391947
from specify_cli.workflows.steps.init import InitStep
19401948
from specify_cli.workflows.base import StepContext, StepStatus

0 commit comments

Comments
 (0)