82fc6ca6dc64d0f0963eef6660898898a5fb16fb,src/python/pants/engine/target.py,Field,__init__,#Field#Any#,72
Before Change
// is only implemented so that we have a common deprecation mechanism.
def __init__(self, raw_value: Optional[Any], *, address: Address) -> None:
if self.deprecated_removal_version and not address.is_file_target and raw_value is not None:
if not self.deprecated_removal_hint:
raise ValueError(
f"You specified `deprecated_removal_version` for {self.__class__}, but not "
"the class property `deprecated_removal_hint`."
)
warn_or_error(
removal_version=self.deprecated_removal_version,
deprecated_entity_description=f"the {repr(self.alias)} field",
hint=(
After Change
@final
def __init__(self, raw_value: Optional[Any], *, address: Address) -> None:
self._check_deprecated(raw_value, address)
self.value = self.compute_value(raw_value, address=address)
@classmethod
def compute_value(cls, raw_value: Optional[Any], *, address: Address) -> ImmutableValue:
Convert the `raw_value` into `self.value`.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: pantsbuild/pants
Commit Name: 82fc6ca6dc64d0f0963eef6660898898a5fb16fb
Time: 2020-11-23
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/engine/target.py
Class Name: Field
Method Name: __init__
Project Name: mlflow/mlflow
Commit Name: 89efc292314531350d01ebeeafc5cac49ba647ab
Time: 2018-08-29
Author: mani@databricks.com
File Name: mlflow/projects/_project_spec.py
Class Name: EntryPoint
Method Name: compute_parameters
Project Name: biolab/orange3
Commit Name: ee27c11166d39aafb9bf6196a037346c73ed2ae6
Time: 2015-02-20
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/preprocess/transformation.py
Class Name: Transformation
Method Name: __call__