(data: Dict[str, Any])
| 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': |
no outgoing calls
no test coverage detected