MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / check

Method check

mod/project/node/dbutil/executor.py:32–41  ·  view source on GitHub ↗
(data: Dict[str, Any])

Source from the content-addressed store, hash-verified

30
31 @staticmethod
32 def check(data: Dict[str, Any]) -> str:
33 if "script_type" not in data or not data["script_type"]:
34 return "脚本类型不能为空"
35 if not data["script_type"] in ["python", "shell"]:
36 return "脚本类型错误, 请选择python或shell"
37 if "content" not in data or not data["content"]:
38 return "脚本内容不能为空"
39 if "name" not in data or not data["name"]:
40 return "脚本名称不能为空"
41 return ""
42
43 @classmethod
44 def from_dict(cls, data: Dict[str, Any]) -> 'Script':

Callers 4

create_scriptMethod · 0.45
modify_scriptMethod · 0.45
create_flow_templateMethod · 0.45
modify_flow_templateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected