本文整理汇总了Python中pants.option.ranked_value.RankedValue.get_names方法的典型用法代码示例。如果您正苦于以下问题:Python RankedValue.get_names方法的具体用法?Python RankedValue.get_names怎么用?Python RankedValue.get_names使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pants.option.ranked_value.RankedValue
的用法示例。
在下文中一共展示了RankedValue.get_names方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: register_options
# 需要导入模块: from pants.option.ranked_value import RankedValue [as 别名]
# 或者: from pants.option.ranked_value.RankedValue import get_names [as 别名]
def register_options(cls, register):
super(ExplainOptionsTask, cls).register_options(register)
register('--scope', help='Only show options in this scope.')
register('--name', help='Only show options with this name.')
register('--rank', choices=RankedValue.get_names(),
help='Only show options with at least this importance.')
register('--show-history', action='store_true', default=False,
help='Show the previous values options had before being overridden.')
register('--only-overridden', action='store_true', default=False,
help='Only show values that overrode defaults.')
示例2: register_options
# 需要导入模块: from pants.option.ranked_value import RankedValue [as 别名]
# 或者: from pants.option.ranked_value.RankedValue import get_names [as 别名]
def register_options(cls, register):
super(ExplainOptionsTask, cls).register_options(register)
register('--scope', help='Only show options in this scope.')
register('--name', help='Only show options with this name.')
register('--rank', choices=RankedValue.get_names(),
help='Only show options with at least this importance.')
register('--show-history', type=bool,
help='Show the previous values options had before being overridden.')
register('--only-overridden', type=bool,
help='Only show values that overrode defaults.')
register('--skip-inherited', type=bool, default=True,
help='Do not show inherited options, unless their values differ from their parents.')