gh-133306: Use \z instead of \Z in fnmatch.translate() and glob.translate() (GH-133338)

This commit is contained in:
Serhiy Storchaka 2025-05-03 17:58:21 +03:00 committed by GitHub
parent cb3174113e
commit add0ca9ea0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 96 additions and 94 deletions

View file

@ -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)