本文整理匯總了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.')