188e5d1e1d2a30c5989aa586b74503cde7a3d48e,src/python/pants/backend/project_info/tasks/dependencies.py,Dependencies,__init__,#Dependencies#,39
Before Change
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.is_internal_only = self.get_options().internal_only
self.is_external_only = self.get_options().external_only
if self.is_internal_only and self.is_external_only:
raise TaskError("At most one of --internal-only or --external-only can be selected.")
After Change
super().__init__(*args, **kwargs)
opts = self.get_options()
type_configured = not opts.is_default("type")
if type_configured:
self.dependency_type = opts.type
return
else:
if opts.internal_only and opts.external_only:
raise TaskError("At most one of --internal-only or --external-only can be selected.")
if opts.internal_only:
self.dependency_type = DependencyType.SOURCE
elif opts.external_only:
self.dependency_type = DependencyType.THIRD_PARTY
else:
self.dependency_type = DependencyType.SOURCE_AND_THIRD_PARTY
def console_output(self, unused_method_argument):
opts = self.get_options()
deprecated_conditional(
lambda: opts.is_default("type") and not opts.internal_only and not opts.external_only,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: pantsbuild/pants
Commit Name: 188e5d1e1d2a30c5989aa586b74503cde7a3d48e
Time: 2020-01-21
Author: ericarellano@me.com
File Name: src/python/pants/backend/project_info/tasks/dependencies.py
Class Name: Dependencies
Method Name: __init__
Project Name: pantsbuild/pants
Commit Name: 7ea504b1a94a93e84364db882b9b064644b69055
Time: 2015-03-19
Author: benjyw@gmail.com
File Name: src/python/pants/backend/jvm/tasks/jvm_compile/scala/zinc_utils.py
Class Name: ZincUtils
Method Name: _plugin_args
Project Name: pantsbuild/pants
Commit Name: 8fa56a612e66522fee1beca0757517ec19b921ac
Time: 2016-08-07
Author: benjyw@gmail.com
File Name: src/python/pants/backend/jvm/subsystems/java.py
Class Name: Java
Method Name: __init__