DeepDiff: Deep Difference and search of any Python object/data. DeepHash: Hash of any object based on its contents. Delta: Use deltas to reconstruct objects by adding deltas together.
Description:
The to_flat_dicts function in the delta.py file has parameters include_action_in_path and report_type_changes that are defined but not used in the function call to self.to_flat_rows. This results in the parameters being ineffective.
Steps to Reproduce:
Define a Delta object.
Call the to_flat_dicts method with custom values for include_action_in_path and report_type_changes.
Observe that the custom values are not passed to the self.to_flat_rows method.
Expected Behavior:
The include_action_in_path and report_type_changes parameters should be passed to the self.to_flat_rows method within the to_flat_dicts function.
Actual Behavior:
The parameters include_action_in_path and report_type_changes are not passed to the self.to_flat_rows method, making them ineffective.
Code:
def to_flat_dicts(self, include_action_in_path=False, report_type_changes=True) -> List[FlatDeltaRow]:
return [
i._asdict() for i in self.to_flat_rows(include_action_in_path=False, report_type_changes=True)
]
Suggested Fix:
Pass the include_action_in_path and report_type_changes parameters to the self.to_flat_rows method.
def to_flat_dicts(self, include_action_in_path=False, report_type_changes=True) -> List[FlatDeltaRow]:
return [
i._asdict() for i in self.to_flat_rows(include_action_in_path=include_action_in_path, report_type_changes=report_type_changes)
]
Bug Report
Description: The
to_flat_dicts
function in thedelta.py
file has parametersinclude_action_in_path
andreport_type_changes
that are defined but not used in the function call toself.to_flat_rows
. This results in the parameters being ineffective.Steps to Reproduce:
Delta
object.to_flat_dicts
method with custom values forinclude_action_in_path
andreport_type_changes
.self.to_flat_rows
method.Expected Behavior: The
include_action_in_path
andreport_type_changes
parameters should be passed to theself.to_flat_rows
method within theto_flat_dicts
function.Actual Behavior: The parameters
include_action_in_path
andreport_type_changes
are not passed to theself.to_flat_rows
method, making them ineffective.Code:
Suggested Fix:
Pass the
include_action_in_path
andreport_type_changes
parameters to theself.to_flat_rows
method.Environment: