alecthomas / alecthomas/voluptuous
Switch suggestion
Đang mở
- Ngôn ngữ chính
- Python
- Star
- 1.9k
- Fork
- 237
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
ChatGPT suggested that this was valid -- it looks wonderful:
```
from voluptuous import Schema, Required, All, Length, Switch, Invalid
# Define the schema with Switch
schema = Schema({
'issuetype': str,
Switch('issuetype', {
'Feature Request': Schema({
Required('feature_details'): All(str, Length(min=10)),
}),
'Bug': Schema({
Required('bug_report'): All(str, Length(min=5)),
}),
}),
})
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.