def convert(self, value, param, ctx: click.Context) -> int:
"""
Convert method that makes this class usable as a click type.
"""
if isinstance(value, self):
return value
self.fail("{} is no valid time span".format(value), param, ctx)
评论列表
文章目录