MCPcopy Index your code
hub / github.com/github/spec-kit / validate

Method validate

src/specify_cli/workflows/steps/init/__init__.py:292–309  ·  view source on GitHub ↗
(self, config: dict[str, Any])

Source from the content-addressed store, hash-verified

290 return (result.exit_code, stdout, stderr)
291
292 def validate(self, config: dict[str, Any]) -> list[str]:
293 errors = super().validate(config)
294 script = config.get("script")
295 if script is not None and not isinstance(script, str):
296 errors.append(
297 f"Init step {config.get('id', '?')!r}: 'script' must be a string "
298 f"({' or '.join(repr(s) for s in VALID_SCRIPT_TYPES)})."
299 )
300 elif (
301 isinstance(script, str)
302 and "{{" not in script
303 and script not in VALID_SCRIPT_TYPES
304 ):
305 errors.append(
306 f"Init step {config.get('id', '?')!r}: 'script' must be "
307 f"{' or '.join(repr(s) for s in VALID_SCRIPT_TYPES)}."
308 )
309 return errors

Calls 1

getMethod · 0.45