本文整理汇总了Python中twitter.pants.base.Target.resolve_all方法的典型用法代码示例。如果您正苦于以下问题:Python Target.resolve_all方法的具体用法?Python Target.resolve_all怎么用?Python Target.resolve_all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类twitter.pants.base.Target
的用法示例。
在下文中一共展示了Target.resolve_all方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _link_java_cycles
# 需要导入模块: from twitter.pants.base import Target [as 别名]
# 或者: from twitter.pants.base.Target import resolve_all [as 别名]
def _link_java_cycles(self, java_sources):
if java_sources:
self.java_sources = list(Target.resolve_all(maybe_list(java_sources, Target), JavaLibrary))
else:
self.java_sources = []
# We have circular java/scala dep, add an inbound dependency edge from java to scala in this
# case to force scala compilation to precede java - since scalac supports generating java stubs
# for these cycles and javac does not this is both necessary and always correct.
for java_target in self.java_sources:
java_target.update_dependencies([self])
示例2: java_sources
# 需要导入模块: from twitter.pants.base import Target [as 别名]
# 或者: from twitter.pants.base.Target import resolve_all [as 别名]
def java_sources(self):
if self._raw_java_sources is not None:
self._java_sources = list(Target.resolve_all(maybe_list(self._raw_java_sources, Target),
JavaLibrary))
self._raw_java_sources = None
# TODO(John Sirois): reconsider doing this auto-linking.
# We have circular java/scala dep, add an inbound dependency edge from java to scala in this
# case to force scala compilation to precede java - since scalac supports generating java
# stubs for these cycles and javac does not this is both necessary and always correct.
for java_target in self._java_sources:
java_target.update_dependencies([self])
return self._java_sources