Replace all filtering parameters with one parameter that returns an enum #5
Labels
breaking change
Introduction of an incompatible API change
c:filtering
under consideration
Dev has not yet decided whether or how to implement
(Note: All new identifiers in this issue are working titles only.)
Eliminate
iterpath()
'sfilter*
andexclude*
arguments and replace them with a single argumentselect: Callable[[os.DirEntry], Operation] | None = None
.Operation
is here an enum with the following variants:INCLUDE
— Yield the entry and, if it's a directory, descend into itEXCLUDE
— Do not yield or descend into the directoryPRUNE
— Yield the entry, but (if it's a directory) do not descend into it (cf. Support yielding XOR descending into certain directories #4)DESCEND_ONLY
— Do not yield the entry, but (if it's a directory) still descend into it (cf. Support yielding XOR descending into certain directories #4)Problem: How would having more than two return values work with applying logical operators to selectors?
The text was updated successfully, but these errors were encountered: