mirror of
https://github.com/python/cpython.git
synced 2025-08-26 11:45:20 +00:00
gh-133306: Use \z instead of \Z in fnmatch.translate() and glob.translate() (GH-133338)
This commit is contained in:
parent
cb3174113e
commit
add0ca9ea0
7 changed files with 96 additions and 94 deletions
|
@ -316,7 +316,7 @@ def translate(pat, *, recursive=False, include_hidden=False, seps=None):
|
|||
if idx < last_part_idx:
|
||||
results.append(any_sep)
|
||||
res = ''.join(results)
|
||||
return fr'(?s:{res})\Z'
|
||||
return fr'(?s:{res})\z'
|
||||
|
||||
|
||||
@functools.lru_cache(maxsize=512)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue