def _option_align(arg):
return directives.choice(arg, ("top", "middle", "bottom", "left", "center",
"right"))
python类choice()的实例源码
def _option_format(arg):
return directives.choice(arg, ('python', 'lisp'))
def _option_align(arg):
return directives.choice(arg, ("top", "middle", "bottom", "left", "center",
"right"))
def backlinks(arg):
value = directives.choice(arg, Contents.backlinks_values)
if value == 'none':
return None
else:
return value
def align(argument):
return directives.choice(argument, ('left', 'center', 'right'))
def align(argument):
# This is not callable as self.align. We cannot make it a
# staticmethod because we're saving an unbound method in
# option_spec below.
return directives.choice(argument, Image.align_values)
def align(argument):
return directives.choice(argument, Figure.align_h_values)
def align_spec(argument):
# type: (Any) -> bool
return directives.choice(argument, ('left', 'center', 'right'))
def backlinks(arg):
value = directives.choice(arg, Contents.backlinks_values)
if value == 'none':
return None
else:
return value
def align(argument):
return directives.choice(argument, ('left', 'center', 'right'))
def align(argument):
# This is not callable as self.align. We cannot make it a
# staticmethod because we're saving an unbound method in
# option_spec below.
return directives.choice(argument, Image.align_values)
def align(argument):
return directives.choice(argument, Figure.align_h_values)
def _option_format(arg):
return directives.choice(arg, ('python', 'doctest'))
def _option_align(arg):
return directives.choice(arg, ("top", "middle", "bottom", "left", "center",
"right"))
pygments_code_block_directive.py 文件源码
项目:deviation-manual
作者: DeviationTX
项目源码
文件源码
阅读 18
收藏 0
点赞 0
评论 0
def csharp_unicodelevel(argument):
return directives.choice(argument, ('none', 'basic', 'full'))
pygments_code_block_directive.py 文件源码
项目:deviation-manual
作者: DeviationTX
项目源码
文件源码
阅读 18
收藏 0
点赞 0
评论 0
def lhs_litstyle(argument):
return directives.choice(argument, ('bird', 'latex'))
pygments_code_block_directive.py 文件源码
项目:deviation-manual
作者: DeviationTX
项目源码
文件源码
阅读 20
收藏 0
点赞 0
评论 0
def raw_compress(argument):
return directives.choice(argument, ('gz', 'bz2'))
# Register Directive
# ------------------
# ::
parts.py 文件源码
项目:tf_aws_ecs_instance_draining_on_scale_in
作者: terraform-community-modules
项目源码
文件源码
阅读 16
收藏 0
点赞 0
评论 0
def backlinks(arg):
value = directives.choice(arg, Contents.backlinks_values)
if value == 'none':
return None
else:
return value
tables.py 文件源码
项目:tf_aws_ecs_instance_draining_on_scale_in
作者: terraform-community-modules
项目源码
文件源码
阅读 22
收藏 0
点赞 0
评论 0
def align(argument):
return directives.choice(argument, ('left', 'center', 'right'))
images.py 文件源码
项目:tf_aws_ecs_instance_draining_on_scale_in
作者: terraform-community-modules
项目源码
文件源码
阅读 24
收藏 0
点赞 0
评论 0
def align(argument):
# This is not callable as self.align. We cannot make it a
# staticmethod because we're saving an unbound method in
# option_spec below.
return directives.choice(argument, Image.align_values)