def debug_type(s):
# I am certain there's a better way to get click to do this...
global DEBUGS
debugs = [sp.strip() for sp in re.split(r"[ ,;]+", s)]
debugs = [d for d in debugs if d]
for d in debugs:
if d not in VALID_DEBUGS:
raise click.BadOptionUsage(f"--debug={d}?? Choose from {', '.join(VALID_DEBUGS)}")
DEBUGS = debugs
return debugs
评论列表
文章目录