| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The DiffLevel string representation hardcodes the t1 and t2 labels, e.g. <root['a'] t1:1, t2:2>. These parameters let callers rename them to something meaningful such as before/after, which is clearer when the two compared objects have distinct roles. The labels default to t1/t2 so existing output is unchanged, and they only affect the tree view repr, not the text view or the comparison. Closes qlustered#531
| Back | FazBrowse Home | New Git URL |
This adds t1_name and t2_name parameters to DeepDiff so the t1/t2 labels in the tree view's string representation can be renamed, as suggested in #531.
Right now the DiffLevel repr hardcodes those labels:
With the new parameters you can give the two objects meaningful names:
Notes on the implementation:
Added tests in tests/test_model.py covering the custom labels, propagation to nested levels, the unchanged defaults, and that the text view is unaffected. Also updated the tree view docs, the parameter reference, CHANGELOG.md, and AUTHORS.md.
Closes #531