Match Python glob's argument signature.

This commit is contained in:
Ethan Dalool 2020-01-28 17:40:30 -08:00
parent 2af2389b8d
commit f599d7e394

View file

@ -18,8 +18,8 @@ def fix(pattern):
pattern = re.sub(r'(\[|\])', r'[\1]', pattern)
return pattern
def glob(pattern):
return python_glob.glob(fix(pattern))
def glob(pathname, *, recursive=False):
return python_glob.glob(fix(pathname), recursive=recursive)
def fnmatch(name, pat):
return python_fnmatch.fnmatch(name, fix(pat))