From d9753ec0667b8a8eec1c8e1174e9406c99f7af4d Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 23 Nov 2014 10:57:25 -0500 Subject: fnmatch doesn't seem to use dollar any more --- coverage/files.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'coverage/files.py') diff --git a/coverage/files.py b/coverage/files.py index 1ed7276e..03df1a71 100644 --- a/coverage/files.py +++ b/coverage/files.py @@ -253,11 +253,10 @@ class PathAliases(object): pattern = abs_file(pattern) pattern += pattern_sep - # Make a regex from the pattern. fnmatch always adds a \Z or $ to + # Make a regex from the pattern. fnmatch always adds a \Z to # match the whole string, which we don't want. regex_pat = fnmatch.translate(pattern).replace(r'\Z(', '(') - if regex_pat.endswith("$"): - regex_pat = regex_pat[:-1] + # We want */a/b.py to match on Windows too, so change slash to match # either separator. regex_pat = regex_pat.replace(r"\/", r"[\\/]") -- cgit v1.2.1