dir_content_diff.util¶
Some utils used by the dir-content-diff
package.
Functions
|
Format a difference message. |
|
Ensure that the given extension string begins with a dot. |
- dir_content_diff.util.diff_msg_formatter(ref, comp, reason=None, diff_args=None, diff_kwargs=None, load_kwargs=None, format_data_kwargs=None, filter_kwargs=None, format_diff_kwargs=None, sort_kwargs=None, concat_kwargs=None, report_kwargs=None)¶
Format a difference message.
- Parameters:
ref (str) – The path to the reference file.
comp (str) – The path to the compared file.
reason (bool or str) – If the reason is False, False is returned. If it is a str, a formatted message is returned.
diff_args (list) – (optional) The args used for the comparison.
diff_kwargs (list) – (optional) The kwargs used for the comparison.
load_kwargs (dict) – The kwargs used for loading the data.
format_data_kwargs (dict) – The kwargs used for formatting the data.
filter_kwargs (dict) – The kwargs used for filtering the differences.
format_diff_kwargs (dict) – The kwargs used for formatting the differences.
sort_kwargs (dict) – The kwargs used for sorting the differences.
concat_kwargs (dict) – The kwargs used for concatenating the differences.
report_kwargs (dict) – The kwargs used for reporting the differences.
- Returns:
False or the difference message.