当前位置: 首页>>代码示例>>Python>>正文


Python NailgunTask.setup_parser方法代码示例

本文整理汇总了Python中twitter.pants.tasks.nailgun_task.NailgunTask.setup_parser方法的典型用法代码示例。如果您正苦于以下问题:Python NailgunTask.setup_parser方法的具体用法?Python NailgunTask.setup_parser怎么用?Python NailgunTask.setup_parser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在twitter.pants.tasks.nailgun_task.NailgunTask的用法示例。


在下文中一共展示了NailgunTask.setup_parser方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setup_parser

# 需要导入模块: from twitter.pants.tasks.nailgun_task import NailgunTask [as 别名]
# 或者: from twitter.pants.tasks.nailgun_task.NailgunTask import setup_parser [as 别名]
  def setup_parser(cls, option_group, args, mkflag):
    NailgunTask.setup_parser(option_group, args, mkflag)

    flag = mkflag('override')
    option_group.add_option(flag, action='append', dest='ivy_resolve_overrides',
                            help='''Specifies a jar dependency override in the form:
                            [org]#[name]=(revision|url)

                            For example, to specify 2 overrides:
                            %(flag)s=com.foo#bar=0.1.2 \\
                            %(flag)s=com.baz#spam=file:///tmp/spam.jar
                            ''' % dict(flag=flag))

    report = mkflag("report")
    option_group.add_option(report, mkflag("report", negate=True), dest = "ivy_resolve_report",
                            action="callback", callback=mkflag.set_bool, default=False,
                            help = "[%default] Generate an ivy resolve html report")

    option_group.add_option(mkflag("open"), mkflag("open", negate=True),
                            dest="ivy_resolve_open", default=False,
                            action="callback", callback=mkflag.set_bool,
                            help="[%%default] Attempt to open the generated ivy resolve report "
                                 "in a browser (implies %s)." % report)

    option_group.add_option(mkflag("outdir"), dest="ivy_resolve_outdir",
                            help="Emit ivy report outputs in to this directory.")

    option_group.add_option(mkflag("cache"), dest="ivy_resolve_cache",
                            help="Use this directory as the ivy cache, instead of the " \
                                 "default specified in pants.ini.")
开发者ID:lxwuchang,项目名称:commons,代码行数:32,代码来源:ivy_resolve.py

示例2: setup_parser

# 需要导入模块: from twitter.pants.tasks.nailgun_task import NailgunTask [as 别名]
# 或者: from twitter.pants.tasks.nailgun_task.NailgunTask import setup_parser [as 别名]
  def setup_parser(cls, option_group, args, mkflag):
    NailgunTask.setup_parser(option_group, args, mkflag)

    option_group.add_option(mkflag("skip"), mkflag("skip", negate=True),
                            dest="checkstyle_skip", default=False,
                            action="callback", callback=mkflag.set_bool,
                            help="[%default] Skip checkstyle.")
开发者ID:dynamicguy,项目名称:commons,代码行数:9,代码来源:checkstyle.py

示例3: setup_parser

# 需要导入模块: from twitter.pants.tasks.nailgun_task import NailgunTask [as 别名]
# 或者: from twitter.pants.tasks.nailgun_task.NailgunTask import setup_parser [as 别名]
    def setup_parser(cls, option_group, args, mkflag):
        NailgunTask.setup_parser(option_group, args, mkflag)

        option_group.add_option(
            mkflag("warnings"),
            mkflag("warnings", negate=True),
            dest="scala_compile_warnings",
            default=True,
            action="callback",
            callback=mkflag.set_bool,
            help="[%default] Compile scala code with all configured warnings " "enabled.",
        )

        option_group.add_option(
            mkflag("plugins"),
            dest="plugins",
            default=None,
            action="append",
            help="Use these scalac plugins. Default is set in pants.ini.",
        )

        option_group.add_option(
            mkflag("partition-size-hint"),
            dest="scala_compile_partition_size_hint",
            action="store",
            type="int",
            default=-1,
            help="Roughly how many source files to attempt to compile together. Set to a large number "
            "to compile all sources together. Set this to 0 to compile target-by-target. "
            "Default is set in pants.ini.",
        )

        JvmDependencyCache.setup_parser(option_group, args, mkflag)
开发者ID:UrbanCompass,项目名称:commons,代码行数:35,代码来源:scala_compile.py

示例4: setup_parser

# 需要导入模块: from twitter.pants.tasks.nailgun_task import NailgunTask [as 别名]
# 或者: from twitter.pants.tasks.nailgun_task.NailgunTask import setup_parser [as 别名]
  def setup_parser(cls, option_group, args, mkflag):
    NailgunTask.setup_parser(option_group, args, mkflag)

    option_group.add_option(mkflag("warnings"), mkflag("warnings", negate=True),
                            dest="scala_compile_warnings", default=True,
                            action="callback", callback=mkflag.set_bool,
                            help="[%default] Compile scala code with all configured warnings "
                                 "enabled.")
开发者ID:ilsanbao,项目名称:commons,代码行数:10,代码来源:scala_compile.py

示例5: setup_parser

# 需要导入模块: from twitter.pants.tasks.nailgun_task import NailgunTask [as 别名]
# 或者: from twitter.pants.tasks.nailgun_task.NailgunTask import setup_parser [as 别名]
  def setup_parser(subcls, option_group, args, mkflag):
    NailgunTask.setup_parser(option_group, args, mkflag)

    option_group.add_option(mkflag('warnings'), mkflag('warnings', negate=True),
                            dest=subcls._language+'_compile_warnings',
                            default=True,
                            action='callback',
                            callback=mkflag.set_bool,
                            help='[%default] Compile with all configured warnings enabled.')

    option_group.add_option(mkflag('partition-size-hint'),
                            dest=subcls._language+'_partition_size_hint',
                            action='store',
                            type='int',
                            default=-1,
                            help='Roughly how many source files to attempt to compile together. Set to a large number '
                                 'to compile all sources together. Set this to 0 to compile target-by-target. '
                                 'Default is set in pants.ini.')

    option_group.add_option(mkflag('missing-deps'),
                            dest=subcls._language+'_missing_deps',
                            choices=['off', 'warn', 'fatal'],
                            default='warn',
                            help='[%default] One of off, warn, fatal. '
                                 'Check for missing dependencies in ' +  subcls._language + 'code. '
                                 'Reports actual dependencies A -> B where there is no '
                                 'transitive BUILD file dependency path from A to B.'
                                 'If fatal, missing deps are treated as a build error.')

    option_group.add_option(mkflag('missing-direct-deps'),
                            dest=subcls._language+'_missing_direct_deps',
                            choices=['off', 'warn', 'fatal'],
                            default='off',
                            help='[%default] One of off, warn, fatal. '
                                 'Check for missing direct dependencies in ' + subcls._language + ' code. '
                                 'Reports actual dependencies A -> B where there is no direct '
                                 'BUILD file dependency path from A to B. '
                                 'This is a very strict check, as in practice it is common to rely on '
                                 'transitive, non-direct dependencies, e.g., due to type inference or when '
                                 'the main target in a BUILD file is modified to depend on other targets in '
                                 'the same BUILD file as an implementation detail. It may still be useful '
                                 'to set it to fatal temorarily, to detect these.')

    option_group.add_option(mkflag('unnecessary-deps'),
                            dest=subcls._language+'_unnecessary_deps',
                            choices=['off', 'warn', 'fatal'],
                            default='off',
                            help='[%default] One of off, warn, fatal. '
                                 'Check for declared dependencies in ' +  subcls._language + ' code '
                                 'that are not needed. This is a very strict check. For example, '
                                 'generated code will often legitimately have BUILD dependencies that '
                                 'are unused in practice.')
开发者ID:alfss,项目名称:commons,代码行数:54,代码来源:jvm_compile.py

示例6: setup_parser

# 需要导入模块: from twitter.pants.tasks.nailgun_task import NailgunTask [as 别名]
# 或者: from twitter.pants.tasks.nailgun_task.NailgunTask import setup_parser [as 别名]
  def setup_parser(cls, option_group, args, mkflag):
    NailgunTask.setup_parser(option_group, args, mkflag)

    option_group.add_option(mkflag("warnings"), mkflag("warnings", negate=True),
                            dest="java_compile_warnings", default=True,
                            action="callback", callback=mkflag.set_bool,
                            help="[%default] Compile java code with all configured warnings "
                                 "enabled.")

    option_group.add_option(mkflag("partition-size-hint"), dest="java_compile_partition_size_hint",
      action="store", type="int", default=-1,
      help="Roughly how many source files to attempt to compile together. Set to a large number to compile "\
           "all sources together. Set this to 0 to compile target-by-target. Default is set in pants.ini.")
开发者ID:samitny,项目名称:commons,代码行数:15,代码来源:java_compile.py

示例7: setup_parser

# 需要导入模块: from twitter.pants.tasks.nailgun_task import NailgunTask [as 别名]
# 或者: from twitter.pants.tasks.nailgun_task.NailgunTask import setup_parser [as 别名]
  def setup_parser(cls, option_group, args, mkflag):
    NailgunTask.setup_parser(option_group, args, mkflag)

    option_group.add_option(mkflag("warnings"), mkflag("warnings", negate=True),
                            dest="java_compile_warnings", default=True,
                            action="callback", callback=mkflag.set_bool,
                            help="[%default] Compile java code with all configured warnings "
                                 "enabled.")

    option_group.add_option(mkflag("flatten"), mkflag("flatten", negate=True),
                            dest="java_compile_flatten",
                            action="callback", callback=mkflag.set_bool,
                            help="[%default] Compile java code for all dependencies in a "
                                 "single compilation.")
开发者ID:rodzyn0688,项目名称:commons,代码行数:16,代码来源:java_compile.py

示例8: setup_parser

# 需要导入模块: from twitter.pants.tasks.nailgun_task import NailgunTask [as 别名]
# 或者: from twitter.pants.tasks.nailgun_task.NailgunTask import setup_parser [as 别名]
  def setup_parser(cls, option_group, args, mkflag):
    NailgunTask.setup_parser(option_group, args, mkflag)

    option_group.add_option(mkflag('warnings'), mkflag('warnings', negate=True),
                            dest='scala_compile_warnings', default=True,
                            action='callback', callback=mkflag.set_bool,
                            help='[%default] Compile scala code with all configured warnings '
                                 'enabled.')

    option_group.add_option(mkflag('plugins'), dest='plugins', default=None,
      action='append', help='Use these scalac plugins. Default is set in pants.ini.')

    option_group.add_option(mkflag('partition-size-hint'), dest='scala_compile_partition_size_hint',
      action='store', type='int', default=-1,
      help='Roughly how many source files to attempt to compile together. Set to a large number ' \
           'to compile all sources together. Set this to 0 to compile target-by-target. ' \
           'Default is set in pants.ini.')

    JvmDependencyCache.setup_parser(option_group, args, mkflag)
开发者ID:benhuang-zh,项目名称:commons,代码行数:21,代码来源:scala_compile.py

示例9: setup_parser

# 需要导入模块: from twitter.pants.tasks.nailgun_task import NailgunTask [as 别名]
# 或者: from twitter.pants.tasks.nailgun_task.NailgunTask import setup_parser [as 别名]
  def setup_parser(subcls, option_group, args, mkflag):
    NailgunTask.setup_parser(option_group, args, mkflag)

    option_group.add_option(mkflag('missing-deps'),
                            dest=subcls._language+'_missing_deps',
                            choices=['off', 'warn', 'fatal'],
                            # TODO(Benjy): Change to fatal after we iron out all outstanding missing deps.
                            default='warn',
                            help='[%default] One of off, warn, fatal. '
                                 'Check for missing dependencies in ' +  subcls._language + 'code. '
                                 'Reports actual dependencies A -> B where there is no '
                                 'transitive BUILD file dependency path from A to B.'
                                 'If fatal, missing deps are treated as a build error.')

    option_group.add_option(mkflag('missing-direct-deps'),
                            dest=subcls._language+'_missing_direct_deps',
                            choices=['off', 'warn', 'fatal'],
                            default='off',
                            help='[%default] One of off, warn, fatal. '
                                 'Check for missing direct dependencies in ' + subcls._language + ' code. '
                                 'Reports actual dependencies A -> B where there is no direct '
                                 'BUILD file dependency path from A to B. '
                                 'This is a very strict check, as in practice it is common to rely on '
                                 'transitive, non-direct dependencies, e.g., due to type inference or when '
                                 'the main target in a BUILD file is modified to depend on other targets in '
                                 'the same BUILD file as an implementation detail. It may still be useful '
                                 'to set it to fatal temorarily, to detect these.')

    option_group.add_option(mkflag('unnecessary-deps'),
                            dest=subcls._language+'_unnecessary_deps',
                            choices=['off', 'warn', 'fatal'],
                            default='off',
                            help='[%default] One of off, warn, fatal. '
                                 'Check for declared dependencies in ' +  subcls._language + ' code '
                                 'that are not needed. This is a very strict check. For example, '
                                 'generated code will often legitimately have BUILD dependencies that '
                                 'are unused in practice.')
开发者ID:bollwang,项目名称:commons,代码行数:39,代码来源:jvm_compile.py


注:本文中的twitter.pants.tasks.nailgun_task.NailgunTask.setup_parser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。