def get_style(style=STYLE):
"""Load Pygments custom style."""
def getattrs(obj, names):
return reduce(getattr, names.split('_'), obj)
return {getattrs(pygments.token, k): (v,) * 2 for k, v in style.items()}
评论列表
文章目录