本文整理汇总了Python中webkitpy.tool.multicommandtool.Command类的典型用法代码示例。如果您正苦于以下问题:Python Command类的具体用法?Python Command怎么用?Python Command使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Command类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self):
options = [
make_option("--bug-id", action="store", type="string", dest="bug_id", help="Specify bug id if no URL is provided in the commit log."),
make_option("--comment", action="store", type="string", dest="comment", help="Text to include in bug comment."),
make_option("--open", action="store_true", default=False, dest="open_bug", help="Open bug in default web browser (Mac only)."),
make_option("--update-only", action="store_true", default=False, dest="update_only", help="Add comment to the bug, but do not close it."),
]
Command.__init__(self, options=options)
示例2: __init__
def __init__(self):
options = [
make_option("--committer-minimum", action="store", dest="committer_minimum", type="int", default=10, help="Specify minimum patch count for Committer nominations."),
make_option("--reviewer-minimum", action="store", dest="reviewer_minimum", type="int", default=80, help="Specify minimum patch count for Reviewer nominations."),
make_option("--max-commit-age", action="store", dest="max_commit_age", type="int", default=9, help="Specify max commit age to consider for nominations (in months)."),
make_option("--show-commits", action="store_true", dest="show_commits", default=False, help="Show commit history with nomination suggestions."),
]
Command.__init__(self, options=options)
# FIXME: This should probably be on the tool somewhere.
self._committer_list = CommitterList()
示例3: __init__
def __init__(self):
self._sequence = StepSequence(self.steps)
Command.__init__(self, self._sequence.options())
示例4: test_parse_required_arguments
def test_parse_required_arguments(self):
self.assertEqual(Command._parse_required_arguments("ARG1 ARG2"), ["ARG1", "ARG2"])
self.assertEqual(Command._parse_required_arguments("[ARG1] [ARG2]"), [])
self.assertEqual(Command._parse_required_arguments("[ARG1] ARG2"), ["ARG2"])
# Note: We might make our arg parsing smarter in the future and allow this type of arguments string.
self.assertRaises(Exception, Command._parse_required_arguments, "[ARG1 ARG2]")
示例5: __init__
def __init__(self, **kwargs):
Command.__init__(self, "help text", **kwargs)
self.execute_count = 0
示例6: __init__
def __init__(self, **kwargs):
Command.__init__(self, **kwargs)
示例7: __init__
def __init__(self):
options = [
make_option("--httpd-port", action="store", type="int", default=8127, help="Port to use for the HTTP server"),
make_option("--no-show-results", action="store_false", default=True, dest="show_results", help="Don't launch a browser with the rebaseline server"),
]
Command.__init__(self, options=options)
示例8: __init__
def __init__(self):
options = [
steps.Options.changelog_count,
]
Command.__init__(self, options=options)