Specification entry
DiffObjectSpecificationEntry
Bases: ABC
Source code in src/officialeye/_internal/diffobject/specification_entry.py
apply_diff(current_value, diff_value, diff_mode)
abstractmethod
Calculates a new value for an entry, based on currently available value, some provided value, and a way of combining them.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
current_value | any | The current value assigned to the entry, or None if there is no such value. | required |
diff_value | any | A new value provided for this entry. | required |
diff_mode | str | How the two values are to be combined to form a new value. | required |
Returns:
Type | Description |
---|---|
any | The new value obtained by combining current_value with diff_value using diff_mode. |
Raises:
Type | Description |
---|---|
DiffObjectException | If the difference mode cannot be applied to the present entry, for example, due to its type. |