6d43ebe9a67526f4522c08e65cd7a8748b7b2fa2,src/python/pants/engine/target.py,Target,__init__,#,241

Before Change


        aliases_to_field_types = {field_type.alias: field_type for field_type in self.field_types}
        for alias, value in unhydrated_values.items():
            if alias not in aliases_to_field_types:
                raise ValueError(
                    f"Unrecognized field `{alias}={value}` for target {address} with target "
                    f"type `{self.alias}`."
                )
            field_type = aliases_to_field_types[alias]
            self.field_values[field_type] = field_type(value, address=address)
        // For undefined fields, mark the raw value as None.
        for field_type in set(self.field_types) - set(self.field_values.keys()):

After Change


        aliases_to_field_types = {field_type.alias: field_type for field_type in self.field_types}
        for alias, value in unhydrated_values.items():
            if alias not in aliases_to_field_types:
                raise TargetDefinitionException(
                    address,
                    f"Unrecognized field `{alias}={value}`. Valid fields for the target type "
                    f"`{self.alias}`: {sorted(aliases_to_field_types.keys())}.",
                )
            field_type = aliases_to_field_types[alias]
            self.field_values[field_type] = field_type(value, address=address)
        // For undefined fields, mark the raw value as None.
        for field_type in set(self.field_types) - set(self.field_values.keys()):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 5

Instances


Project Name: pantsbuild/pants
Commit Name: 6d43ebe9a67526f4522c08e65cd7a8748b7b2fa2
Time: 2020-03-18
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/engine/target.py
Class Name: Target
Method Name: __init__


Project Name: pantsbuild/pants
Commit Name: 6d43ebe9a67526f4522c08e65cd7a8748b7b2fa2
Time: 2020-03-18
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/engine/target_test.py
Class Name: HaskellGhcExtensions
Method Name: hydrate


Project Name: pantsbuild/pants
Commit Name: 6d43ebe9a67526f4522c08e65cd7a8748b7b2fa2
Time: 2020-03-18
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/rules/targets.py
Class Name: PythonBinarySources
Method Name: validate_snapshot


Project Name: pantsbuild/pants
Commit Name: 6d43ebe9a67526f4522c08e65cd7a8748b7b2fa2
Time: 2020-03-18
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/rules/targets.py
Class Name: Timeout
Method Name: hydrate


Project Name: pantsbuild/pants
Commit Name: 6d43ebe9a67526f4522c08e65cd7a8748b7b2fa2
Time: 2020-03-18
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/rules/targets.py
Class Name: PythonSources
Method Name: validate_snapshot