Skip to content

Commit

Permalink
Improve the FilterMatcher docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
emnoor-reef committed Jan 30, 2024
1 parent 6389ec2 commit 3c472bb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion b2sdk/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,16 @@ def exclude(cls, pattern: str) -> Filter:
class FilterMatcher:
"""
Holds a list of filters and matches a string (i.e. file name) against them.
The order of filters matters. The *last* matching filter decides whether
the string is included or excluded. If no filter matches, the string is
included by default.
If the given list of filters contains only INCLUDE filters, then it is
assumed that all files are excluded by default.
assumed that all files are excluded by default. In this case, an additional
EXCLUDE filter is prepended to the list.
:param filters: list of filters
"""

def __init__(self, filters: Sequence[Filter]):
Expand Down

0 comments on commit 3c472bb

Please sign in to comment.