Fix BytesWarnings in fnmatch
This commit is contained in:
parent
a8f63c02ef
commit
682ca1e6e2
|
@ -35,7 +35,7 @@ def fnmatch(name, pat):
|
||||||
pat = os.path.normcase(pat)
|
pat = os.path.normcase(pat)
|
||||||
return fnmatchcase(name, pat)
|
return fnmatchcase(name, pat)
|
||||||
|
|
||||||
@functools.lru_cache(maxsize=250)
|
@functools.lru_cache(maxsize=250, typed=True)
|
||||||
def _compile_pattern(pat):
|
def _compile_pattern(pat):
|
||||||
if isinstance(pat, bytes):
|
if isinstance(pat, bytes):
|
||||||
pat_str = str(pat, 'ISO-8859-1')
|
pat_str = str(pat, 'ISO-8859-1')
|
||||||
|
|
Loading…
Reference in New Issue