docs(workflows): init step docstring lists the 'py' script type (#3655)

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>
This commit is contained in:
Ali jawwad
2026-07-22 23:54:53 +05:00
committed by GitHub
parent 9fb467f8de
commit 3356161d88
2 changed files with 9 additions and 1 deletions

View File

@@ -59,7 +59,7 @@ class InitStep(StepBase):
Extra options for the integration (e.g. ``"--skills"`` or
``"--commands-dir .myagent/cmds"``).
``script``
Script type, ``sh`` or ``ps``.
Script type, ``sh``, ``ps``, or ``py``.
``force``
Merge/overwrite without confirmation when the directory is not
empty.

View File

@@ -1935,6 +1935,14 @@ def _force_gate_stdin(monkeypatch, *, tty: bool):
class TestInitStep:
"""Test the init step type."""
def test_docstring_lists_every_valid_script_type(self):
# The `script` field docstring must not contradict the step's own
# VALID_SCRIPT_TYPES (which includes 'py'); validate() accepts all three.
from specify_cli.workflows.steps.init import InitStep, VALID_SCRIPT_TYPES
for script_type in VALID_SCRIPT_TYPES:
assert f"``{script_type}``" in InitStep.__doc__
def test_builds_here_argv_and_bootstraps(self, tmp_path):
from specify_cli.workflows.steps.init import InitStep
from specify_cli.workflows.base import StepContext, StepStatus