Skip to content

[How to use] ignore (exclude) files from comparing #84

@liborjelinek

Description

@liborjelinek

Describe the problem

For example, I want to ignore all *.pyc (Python cache) files. Is it somehow possible?

It would be nice to, e.g., pass None instead of {"comparator": ..., "tolerance", ...} dict to ignore some paths.

Show what you tried to do.

# Something like a
compare_trees("dir1", "dir2", specific_args={"*.pyc": None}})

Or

compare_trees("dir1", "dir2", specific_args={"*.pyc": {"comparator": IgnoreComparator()}})

Or new kwarg ignore. E.g.,

compare_trees("dir1", "dir2", ignore=["*.pyc"])

Describe what you expected.

Ignoring *.pyc files

Error

Additional context

No response

dir_content_diff Version in Use

1.12.1

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions