0
0
mirror of https://github.com/django/django.git synced 2024-11-29 22:56:46 +01:00

Removed unused default value None to matches_patterns().

An iterable is always passed.
This commit is contained in:
Jon Dufresne 2019-11-18 16:42:15 -08:00 committed by Carlton Gibson
parent 6b61b8b904
commit 13993e0f38

View File

@ -5,12 +5,12 @@ from django.conf import settings
from django.core.exceptions import ImproperlyConfigured from django.core.exceptions import ImproperlyConfigured
def matches_patterns(path, patterns=None): def matches_patterns(path, patterns):
""" """
Return True or False depending on whether the ``path`` should be Return True or False depending on whether the ``path`` should be
ignored (if it matches any pattern in ``ignore_patterns``). ignored (if it matches any pattern in ``ignore_patterns``).
""" """
return any(fnmatch.fnmatchcase(path, pattern) for pattern in (patterns or [])) return any(fnmatch.fnmatchcase(path, pattern) for pattern in patterns)
def get_files(storage, ignore_patterns=None, location=''): def get_files(storage, ignore_patterns=None, location=''):