MCPcopy
hub / github.com/django/django / matches_patterns

Function matches_patterns

django/contrib/staticfiles/utils.py:8–13  ·  view source on GitHub ↗

Return True or False depending on whether the ``path`` should be ignored (if it matches any pattern in ``ignore_patterns``).

(path, patterns)

Source from the content-addressed store, hash-verified

6
7
8def matches_patterns(path, patterns):
9 """
10 Return True or False depending on whether the ``path`` should be
11 ignored (if it matches any pattern in ``ignore_patterns``).
12 """
13 return any(fnmatch.fnmatchcase(path, pattern) for pattern in patterns)
14
15
16def get_files(storage, ignore_patterns=None, location=""):

Callers 3

post_processMethod · 0.90
_post_processMethod · 0.90
get_filesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected