mirror of
https://github.com/github/spec-kit.git
synced 2026-08-03 06:26:30 +08:00
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:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user